Automation of the reconnaissance phase during Web Application Penetration Testing II

Karol Mazurek
System Weakness
Published in
8 min readMar 21, 2021

--

This article is a continuation of the previous one available in this link.
After the first phase of reconnaissance, subdomains enumeration, you should have a lot of information about the company you are attacking.

The next step is to select one subdomain and perform a detailed reconnaissance strictly on it. You’ll learn about the path and query enumeration tools in this article. You will also learn how to use them and automate the entire process. Described research is based on the OWASP methodology and the methodology in the book “Hack Tricks” by Carlos Polop.

Generally speaking, if the penetration test coverage is limited to one subdomain, we are interested in the following resources:

  1. Protocols (scheme)
  2. Host (IP && ports)
  3. Paths (directories && files)
  4. Queries (parameters names && values)
Source: own study

Before starting work, launch a new project in Burp Suite and turn off an interception, as shown in the screenshot below:

Then prepare appropriate catalogs to which the reconnaissance results will be saved (most of the results from the tools used will be held in the “recon.txt” file). Resolve the IP addresses of the targeted domain and set the appropriate variables on which we will operate. Set your target domain in the first line in place of “$domain” variable as shown below.

Tools used:

  • dig

The tester’s first task is to check for opened ports on the resolved IP addresses of the targeted subdomain. Then perform OS detection, version detection, script scanning, and traceroute. Restrict the scan to opened ports only.
Save results in a text format and a format for grep — this will be useful for other tools like BruteSpray.

Tools used:

  • nmap

The screenshot below shows how you can automate this process using bash:

--

--

Published in System Weakness

System Weakness is a publication that specialises in publishing upcoming writers in cybersecurity and ethical hacking space. Our security experts write to make the cyber universe more secure, one vulnerability at a time.

Responses (1)

Write a response