Reconnaissance
Last updated
Last updated
Recon is the process by which you collect more information about your target, such as subdomains, links, open ports, hidden directories, service information, etc. In this page, I will explain my web recon methodology.
for bug hunters, this approach may not work with all targets, as each target has its own scope. Some companies will list all their assets in scope
while others will list specific domains or subdomains. I will cover broader scopes to address all points.
Always use WHOIS data to verify each step. WHOIS provides information about domain name registrations, helping you confirm if an asset (like an IP or subdomain) belongs to your target.
An acquisition means the company has bought another company, and the new assets they now own, like websites or apps, are included in the bug bounty program for testing. This includes all the companies under the control of the main company.
How to Collect Acquisitions? The best website for this is Crunchbase. By searching for the company name, you can find all the acquisitions they have made. Collect this information and add it to your target scope and start recon on them.
This involves various steps:
An Autonomous System Number (ASN) is a globally unique identifier that defines a group of one or more IP prefixes run by one or more networks. These ASNs will help track down external IPs belonging to the organization you are engaging with. Keep in mind that not all assets will be identified by these ASNs due to cloud environments like Azure, AWS, etc.
Best Way to Collect ASNs: well, the best way here is to conduct a manual search for your target ASN and collect them from various websites. You can also use bgp.net.
ASNs contain ranges of IP addresses (CIDRs). To get IP ranges from an ASN, use the following command:
Now you have all the ranges (CIDRs).
To convert CIDRs to IP addresses :
Create a script to run this command for all your ranges. this command performs a ping sweep using Nmap to discover live hosts in the specified IP range.
Note: While this method is fast, it may not be the most effective. Some hosts might appear down due to firewalls blocking ping (ICMP) requests or other types of probes. To address this, we can use masscan (which is faster than Nmap) to perform a port scan across all the CIDRs :
Make a script to run it for all your ranges. You can increase or decrease the --rate=250000
(the number of packets sent per second) based on your network proficiency.
Now you have all the IPs; save them in IPs.txt
. For better organization, we should put every IP running services in a single file.
You can use the following Python script to organize the IPs based on the services they run:
What i do after that is extracting the IPs running HTTP/S services that are accessible through a browser, usually on ports 80, 443, 8080, 8443, 8000, 8888, and 5000, and put them in a one file. You can then run httpx
on these IPs and keep the results organized.
and in Attack Victors by port page, i will exaplin all the other services and their potential vulnerabilities.
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.
To get the most out of Subfinder, go to its and add your API keys at the end of the config.yaml
file from these platforms:
Just sign up for accounts on these sites, and you can get your API keys from the settings section. Keep in mind that these API keys are free but have a limited number of requests, so change them out now and then.
Once you’ve added the APIs, run Subfinder again and see how much more you uncover compared to before!
Amass is a powerful tool for network mapping and external asset discovery. It combines both passive and active techniques to uncover subdomains linked to a target.
For passive enumeration, you can run the following command:
This command will gather subdomains without actively probing the target.
For active enumeration, which includes brute-forcing and resolving IP addresses, use:
This command not only discovers subdomains but also gathers source information and performs IP resolution, providing a more comprehensive view of your target.
By leveraging Amass, you'll be able to effectively uncover a wide range of subdomains, significantly enhancing your reconnaissance efforts!
it can find domains and subdomains related to a given domain, and find the subdaomins of the subdaomins :
there is also some good websites like crt.sh and subdomainfinder