pentest-recon — Penetration Testing Information Gathering (Reconnaissance)
- 攻击大类:C42 网络扫描与枚举
Workflow
1. Passive Collection (no contact with the target)
Basic domain information
- WHOIS lookup (domain registration information)
- DNS history (SecurityTrails, ViewDNS)
- ICP filing lookup (Tianyancha, MIIT ICP registration)
- Search engine operators (Google/Baidu dorking)
Subdomain enumeration
# amass (passive)
amass enum -passive -d target.com
# subfinder
subfinder -d target.com
# oneforall (Chinese-origin tool)
python3 oneforall.py --target target.com run
# CRT.sh certificate transparency
curl -s "https://crt.sh/?q=%25.target.com&output=json" | jq -r '.[].name_value'
GitHub/Gitee leaks
gitleaksscanning public repositories- GitHub Search API to look for sensitive keywords
theHarvester -d target.com -b allshodan search hostname:target.com
Fingerprinting & tech stack
whatweb -v https://target.com
fingerprintx -target 1.2.3.4 -ports 80,443,8080
# Co-hosted site lookup: ZOOMEYE / FOFA / SHODAN
2. Active Collection (contacting the target)
Port scanning
# nmap quick scan of the top 100 ports
nmap -sV --top-ports 100 -Pn -T4 -oA nmap_top100 target.com
# All ports + service detection
nmap -p- -sV -Pn -T4 -oA nmap_full target.com
# UDP ports
nmap -sU --top-ports 50 -Pn -T4 target.com
# NSE vulnerability detection
nmap --script vuln -sV -Pn target.com
Directory/file enumeration
# ffuf (recommended)
ffuf -w /usr/share/wordlists/dirb/common.txt -u https://target.com/FUZZ -mc 200,204,301,302,307,401,403
# Backup file scanning
ffuf -w /usr/share/wordlists/dirb/common.txt -u https://target.com/FUZZ.bak -mc 200
# dirb
dirb https://target.com /usr/share/dirb/wordlists/common.txt
C segment / co-hosted sites
- Zoomeye / FOFA / Shodan to search the target IP range
nmap -sn 192.168.1.0/24
3. Social Engineering (optional)
maltego # correlation analysis
theHarvester -d target.com -b all # emails/subdomains
# LinkedIn / Maimai employee information
# SPF/DKIM/DMARC configuration checks
Output Template
After collection finishes, output a structured reconnaissance report:
Target:
IP range:
Domain list:
Open ports:
Fingerprinting results:
Sensitive paths/files:
Leaked information:
Next-step recommendations: