1. Info gathering
whois < domai n > # Domain registrar info
2. Port scanning
nmap -sS -Pn -p 1-1000 < i p > # Fast TCP port scan
nmap -Pn -A -sV -sC -p 80,443 < i p > # Port service discovery
3. Network host discovering
netdiscover -i < net-interfac e > # Passive/active ARP scan
arp-scan -l # Fast ARP scan
4. DNS records gathering
Good results gives msf auxiliary/gather/enum_dns
but it is worth checking out other tools as the results may vary.
# Types: ANY, A, AA, AAA, AAAA, TXT, AXFR (zone transfer), MS, NS, CNAME
dig < typ e > < domai n > @ < dns-i p >
dnsrecon -d < domai n > -a -n < dns-i p >
nslookup < domai n >
host < domai n >
5. Subdomains / vhost discovering
There are situations where there is no DNS server. Then you have to brute force simply routing to the target ip manually (using the proxy parameter). Probably all sub-domains will then respond with code 200. Our correct one may have a slightly different body or different response code.
5.1. DNS server bruteforcing
gobuster dns -d < domai n > -r < dns-serve r > -w < wordlis t >
5.2. Bruteforcing with wfuzz
wfuzz
-u http://FUZZ.url.com
-w < wordlis t >
-H " Header: value " # Extra headers
-p < target-i p > :80:HTTP # Proxy config
-c # Output with colors
5.3. Bruteforcing with ffuf
ffuf
-u http://FUZZ.url.com
-w < wordlis t >
-H " Header: value " # Extra headers
-b " Cookie=value; " # Extra cookies
-x http:// < target-i p > :80 # Proxy config
-timeout < second s > # HTTP request timeout
-ac # Auto-calibrate filtering
5.4. VHOSTs discovering
It works even without DNS service.
gobuster vhost -u < ur l > -w < wordlis t >
6. Google dorks
List of interesting dorks for pentesters.
"search phrase" # Search exact phrase
filetype:pdf # Search filetype == pdf
site:my.site.com # Limit to this site
-site:my.site.com # Exclude this site
intitle:MyTitle # With specific phrase in title
inurl:example # With specific phrase in URL
7. Other search engines
8. Recon-NG
recon-ng -w < workspac e > # Start with :workspace loaded
# Recon-ng command line
workspaces create < workspac e > # Create workspace
db schema # Show db
db insert domains # Add domain
dashboard # Summary of collected data
show < tabl e > # Show table content
marketplace
search < keywor d > # Search for module by keyword
info < modul e > # Get info about module
install < modul e > # Install module
remove < modul e > # Uninstall module
modules search # List installed modules
modules load < modul e > # Load module to memory
CTRL + C # Unload module
options list # List module's options
options set < optio n > < valu e > # Set module's option
info # Get full module's info
run # Execute module