# Pentest Recon

> Penetration testing information gathering (passive + active reconnaissance). Trigger: recon, footprinting, subdomains, port scanning, fingerprinting, social engineering, GitHub leaks, and similar scenarios.

- Skill: `dangeroussong/pentest-recon` (Agent Skill)
- Install (CLI): `npx get-skill add dangeroussong/pentest-recon`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dangeroussong/pentest-recon/raw
- Safety review: pending (external: skill-scanner PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: DangerousSONG (https://skillmd.com/u/dangeroussong)
- Updated: 2026-11-19
- Page: https://skillmd.com/skills/dangeroussong/pentest-recon

---


# 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**
```bash
# 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**
- `gitleaks` scanning public repositories
- GitHub Search API to look for sensitive keywords
- `theHarvester -d target.com -b all`
- `shodan search hostname:target.com`

**Fingerprinting & tech stack**
```bash
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**
```bash
# 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**
```bash
# 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)

```bash
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:
```

