Scanning Open Ports/Services
Open ports can reveal HTTP servers operating on non-standard ports, wich might be overlooked in standard scans.
1. Scanning open ports with Masscan
2. Detecting HTTP services with HTTPX
While Masscan
reveals open ports, it does not specifies wich of these ports are running HTTP services. To determine this, HTTPX
can be applied to the output file of Masscan
.
The following command search for TCP ports in Masscan
output file and then formats each IP address and Port to be used by HTTPX
.
3. Scanning for Service Versions
We have already identified the web servers on each IP address, the next step would be to perform a service version scan. For this task, Nmap
is the right choice.
3.1. Manul testing
For each HTTPX
hit we can run a service scan with Nmap:
3.2. Automated testing
The optimal approach is to chain the HTTPX
result with Nmap
, i.e. to perform only a service scan on those detected ports hosting HTTP services.
In this manner, we do not extend the scanning time by scanning ports that are of no interest to us.
Underconstruction automation
Tools
Masscan -> https://github.com/robertdavidgraham/masscan
Last updated
Was this helpful?