Skip to content

x-glacier/kali-pentest / kali-pentest-zh

kali-pentest-zh

Flagged

通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。

FileKindSize
SKILL.mdskill md15.6 KB
references/cloud-native/README.mdmarkdown4.2 KB
references/cloud-native/tools/azurehound.mdmarkdown4.0 KB
references/cloud-native/tools/docker-bench-security.mdmarkdown1.9 KB
references/cloud-native/tools/kube-bench.mdmarkdown1.7 KB
references/cloud-native/tools/kubescape.mdmarkdown1.7 KB
references/cloud-native/tools/pacu.mdmarkdown3.0 KB
references/cloud-native/tools/peirates.mdmarkdown6.4 KB
references/cloud-native/tools/prowler.mdmarkdown1.5 KB
references/cloud-native/tools/scoutsuite.mdmarkdown1.2 KB
references/environment/README.mdmarkdown1.4 KB
references/environment/docker-mode-networking.mdmarkdown2.2 KB
references/environment/docker-mode-persistent-container.mdmarkdown3.8 KB
references/environment/docker-mode.mdmarkdown2.0 KB
references/environment/local-mode.mdmarkdown946 B
references/environment/server-mode.mdmarkdown4.1 KB
references/environment/state-files.mdmarkdown2.3 KB
references/exploitation/README.mdmarkdown9.6 KB
references/exploitation/tools/chisel.mdmarkdown3.2 KB
references/exploitation/tools/coercer.mdmarkdown2.5 KB
references/exploitation/tools/dns2tcp.mdmarkdown3.8 KB
references/exploitation/tools/evil-winrm.mdmarkdown2.9 KB
references/exploitation/tools/evilginx2.mdmarkdown2.2 KB
references/exploitation/tools/getsploit.mdmarkdown2.0 KB
references/exploitation/tools/gophish.mdmarkdown6.1 KB
references/exploitation/tools/impacket.mdmarkdown10.9 KB
references/exploitation/tools/iodine.mdmarkdown3.5 KB
references/exploitation/tools/ligolo-ng.mdmarkdown3.3 KB
references/exploitation/tools/metasploit.mdmarkdown11.0 KB
references/exploitation/tools/mitm6.mdmarkdown2.6 KB
references/exploitation/tools/msfconsole.mdmarkdown3.9 KB
references/exploitation/tools/msfvenom.mdmarkdown8.5 KB
references/exploitation/tools/mssqlpwner.mdmarkdown2.5 KB
references/exploitation/tools/netcat.mdmarkdown4.4 KB
references/exploitation/tools/odat.mdmarkdown3.0 KB
references/exploitation/tools/proxytunnel.mdmarkdown2.2 KB
references/exploitation/tools/routersploit.mdmarkdown2.9 KB
references/exploitation/tools/searchsploit.mdmarkdown4.7 KB
references/exploitation/tools/setoolkit.mdmarkdown1015 B
references/exploitation/tools/smbclient.mdmarkdown2.8 KB
references/exploitation/tools/socat.mdmarkdown2.8 KB
references/exploitation/tools/veil.mdmarkdown2.9 KB
references/forensics/README.mdmarkdown8.8 KB
references/forensics/tools/bulk-extractor.mdmarkdown4.5 KB
references/forensics/tools/chainsaw.mdmarkdown2.6 KB
references/forensics/tools/chkrootkit.mdmarkdown2.6 KB
references/forensics/tools/dc3dd.mdmarkdown2.9 KB
references/forensics/tools/dcfldd.mdmarkdown3.2 KB
references/forensics/tools/ddrescue.mdmarkdown3.6 KB
references/forensics/tools/exiftool.mdmarkdown2.5 KB
references/forensics/tools/foremost.mdmarkdown2.4 KB
references/forensics/tools/hashdeep.mdmarkdown3.5 KB
references/forensics/tools/plaso.mdmarkdown3.7 KB
references/forensics/tools/regripper.mdmarkdown3.4 KB
references/forensics/tools/rkhunter.mdmarkdown3.4 KB
references/forensics/tools/scalpel.mdmarkdown2.6 KB
references/forensics/tools/sleuthkit.mdmarkdown4.0 KB
references/forensics/tools/ssdeep.mdmarkdown3.1 KB
references/forensics/tools/steghide.mdmarkdown2.8 KB
references/forensics/tools/stegseek.mdmarkdown2.5 KB
references/forensics/tools/tcpdump.mdmarkdown2.8 KB
references/forensics/tools/tcpflow.mdmarkdown3.4 KB
references/forensics/tools/testdisk.mdmarkdown3.0 KB
references/forensics/tools/tshark.mdmarkdown3.0 KB
references/forensics/tools/volatility.mdmarkdown5.0 KB
references/forensics/tools/yara.mdmarkdown3.3 KB
references/information-gathering/README.mdmarkdown15.6 KB
references/information-gathering/tools/altdns.mdmarkdown1.9 KB
references/information-gathering/tools/amass.mdmarkdown9.1 KB
references/information-gathering/tools/arp-scan.mdmarkdown1.9 KB
references/information-gathering/tools/assetfinder.mdmarkdown1.9 KB
references/information-gathering/tools/autorecon.mdmarkdown2.9 KB
references/information-gathering/tools/certgraph.mdmarkdown3.3 KB
references/information-gathering/tools/cloud-enum.mdmarkdown2.1 KB
references/information-gathering/tools/cloudbrute.mdmarkdown2.1 KB
references/information-gathering/tools/dig.mdmarkdown2.3 KB
references/information-gathering/tools/dmitry.mdmarkdown2.0 KB
references/information-gathering/tools/dnsenum.mdmarkdown1.7 KB
references/information-gathering/tools/dnsgen.mdmarkdown1.5 KB
references/information-gathering/tools/dnsmap.mdmarkdown1.8 KB
references/information-gathering/tools/dnsrecon.mdmarkdown2.7 KB
references/information-gathering/tools/dnstwist.mdmarkdown3.0 KB
references/information-gathering/tools/dnsx.mdmarkdown2.8 KB
references/information-gathering/tools/eyewitness.mdmarkdown2.4 KB
references/information-gathering/tools/fierce.mdmarkdown2.5 KB
references/information-gathering/tools/finalrecon.mdmarkdown2.4 KB
references/information-gathering/tools/findomain.mdmarkdown2.5 KB
references/information-gathering/tools/fping.mdmarkdown2.3 KB
references/information-gathering/tools/getallurls.mdmarkdown2.4 KB
references/information-gathering/tools/gowitness.mdmarkdown4.8 KB
references/information-gathering/tools/h8mail.mdmarkdown3.9 KB
references/information-gathering/tools/hakrawler.mdmarkdown2.3 KB
references/information-gathering/tools/hosthunter.mdmarkdown2.6 KB
references/information-gathering/tools/httprobe.mdmarkdown2.1 KB
references/information-gathering/tools/httpx.mdmarkdown4.6 KB
references/information-gathering/tools/ldeep.mdmarkdown4.9 KB
references/information-gathering/tools/masscan.mdmarkdown3.8 KB
references/information-gathering/tools/massdns.mdmarkdown1.9 KB
references/information-gathering/tools/metagoofil.mdmarkdown3.0 KB
references/information-gathering/tools/naabu.mdmarkdown2.7 KB
references/information-gathering/tools/nbtscan.mdmarkdown2.2 KB
references/information-gathering/tools/netdiscover.mdmarkdown2.6 KB
references/information-gathering/tools/nmap.mdmarkdown8.4 KB
references/information-gathering/tools/p0f.mdmarkdown2.1 KB
references/information-gathering/tools/recon-ng.mdmarkdown6.6 KB
references/information-gathering/tools/sherlock.mdmarkdown3.7 KB
references/information-gathering/tools/shodan.mdmarkdown3.6 KB
references/information-gathering/tools/spiderfoot.mdmarkdown2.7 KB
references/information-gathering/tools/subfinder.mdmarkdown2.5 KB
references/information-gathering/tools/sublist3r.mdmarkdown1.9 KB
references/information-gathering/tools/theHarvester.mdmarkdown2.9 KB
references/information-gathering/tools/trufflehog.mdmarkdown3.1 KB
references/information-gathering/tools/wafw00f.mdmarkdown1.9 KB
references/information-gathering/tools/whatweb.mdmarkdown5.1 KB
references/information-gathering/tools/whois.mdmarkdown2.0 KB
references/password/README.mdmarkdown11.8 KB
references/password/tools/brutespray.mdmarkdown2.8 KB
references/password/tools/cewl.mdmarkdown2.1 KB
references/password/tools/changeme.mdmarkdown3.0 KB
references/password/tools/chntpw.mdmarkdown2.5 KB
references/password/tools/crowbar.mdmarkdown2.6 KB
references/password/tools/crunch.mdmarkdown2.7 KB
references/password/tools/fcrackzip.mdmarkdown2.3 KB
references/password/tools/gpp-decrypt.mdmarkdown2.6 KB
references/password/tools/hashcat.mdmarkdown4.6 KB
references/password/tools/hashid.mdmarkdown2.1 KB
references/password/tools/hydra.mdmarkdown4.4 KB
references/password/tools/john.mdmarkdown3.2 KB
references/password/tools/kerbrute.mdmarkdown2.8 KB
references/password/tools/medusa.mdmarkdown3.3 KB
references/password/tools/name-that-hash.mdmarkdown3.2 KB
references/password/tools/ncrack.mdmarkdown3.3 KB
references/password/tools/netexec.mdmarkdown3.2 KB
references/password/tools/patator.mdmarkdown2.2 KB
references/password/tools/pdfcrack.mdmarkdown2.9 KB
references/password/tools/rainbowcrack.mdmarkdown2.9 KB
references/password/tools/responder.mdmarkdown2.7 KB
references/playbooks/README.mdmarkdown8.1 KB
references/playbooks/active-directory.mdmarkdown14.0 KB
references/playbooks/api-security.mdmarkdown18.6 KB
references/playbooks/cloud-native-assessment.mdmarkdown17.6 KB
references/playbooks/external-attack-surface.mdmarkdown8.1 KB
references/playbooks/forensics-triage.mdmarkdown11.7 KB
references/playbooks/internal-network-protocols.mdmarkdown6.5 KB
references/playbooks/internal-network.mdmarkdown14.4 KB
references/playbooks/mobile-application.mdmarkdown9.8 KB
references/playbooks/password-audit.mdmarkdown9.0 KB
references/playbooks/post-exploitation.mdmarkdown11.4 KB
references/playbooks/reporting-workflow.mdmarkdown6.3 KB
references/playbooks/rfid-nfc.mdmarkdown7.2 KB
references/playbooks/source-code-audit.mdmarkdown8.4 KB
references/playbooks/voip-ics.mdmarkdown17.3 KB
references/playbooks/web-application.mdmarkdown14.7 KB
references/playbooks/wireless-assessment.mdmarkdown9.6 KB
references/post-exploitation/README.mdmarkdown11.0 KB
references/post-exploitation/tools/bloodhound.mdmarkdown4.8 KB
references/post-exploitation/tools/bloodhound.py.mdmarkdown4.0 KB
references/post-exploitation/tools/bloodyad.mdmarkdown4.1 KB
references/post-exploitation/tools/certipy-ad.mdmarkdown3.2 KB
references/post-exploitation/tools/dnscat2.mdmarkdown3.5 KB
references/post-exploitation/tools/dploot.mdmarkdown4.2 KB
references/post-exploitation/tools/havoc.mdmarkdown3.8 KB
references/post-exploitation/tools/hekatomb.mdmarkdown3.0 KB
references/post-exploitation/tools/krbrelayx.mdmarkdown7.3 KB
references/post-exploitation/tools/lapsdumper.mdmarkdown2.4 KB
references/post-exploitation/tools/linpeas.mdmarkdown3.6 KB
references/post-exploitation/tools/linux-exploit-suggester.mdmarkdown2.8 KB
references/post-exploitation/tools/lsassy.mdmarkdown2.8 KB
references/post-exploitation/tools/mimikatz.mdmarkdown4.2 KB
references/post-exploitation/tools/powershell-empire.mdmarkdown4.0 KB
references/post-exploitation/tools/powersploit.mdmarkdown5.5 KB
references/post-exploitation/tools/proxychains.mdmarkdown2.1 KB
references/post-exploitation/tools/pspy.mdmarkdown2.8 KB
references/post-exploitation/tools/pwncat.mdmarkdown6.4 KB
references/post-exploitation/tools/sliver.mdmarkdown1.4 KB
references/post-exploitation/tools/sshuttle.mdmarkdown3.2 KB
references/post-exploitation/tools/winpeas.mdmarkdown3.0 KB
references/reporting/README.mdmarkdown2.5 KB
references/reporting/tools/pandoc.mdmarkdown3.2 KB
references/reporting/tools/report-template.mdmarkdown8.5 KB
references/reverse-engineering/README.mdmarkdown5.6 KB
references/reverse-engineering/tools/apktool.mdmarkdown1.8 KB
references/reverse-engineering/tools/binwalk.mdmarkdown3.0 KB
references/reverse-engineering/tools/checksec.mdmarkdown3.5 KB
references/reverse-engineering/tools/dex2jar.mdmarkdown3.2 KB
references/reverse-engineering/tools/frida.mdmarkdown2.4 KB
references/reverse-engineering/tools/ghidra-headless.mdmarkdown3.0 KB
references/reverse-engineering/tools/jadx.mdmarkdown2.2 KB
references/reverse-engineering/tools/ldd.mdmarkdown1.9 KB
references/reverse-engineering/tools/nm.mdmarkdown2.3 KB
references/reverse-engineering/tools/objdump.mdmarkdown2.5 KB
references/reverse-engineering/tools/objection.mdmarkdown3.0 KB
references/reverse-engineering/tools/rabin2.mdmarkdown2.3 KB
references/reverse-engineering/tools/radare2.mdmarkdown1.3 KB
references/reverse-engineering/tools/readelf.mdmarkdown2.3 KB
references/reverse-engineering/tools/ropper.mdmarkdown4.1 KB
references/reverse-engineering/tools/strings.mdmarkdown2.3 KB
references/reverse-engineering/tools/xxd.mdmarkdown2.3 KB
references/rfid-nfc/README.mdmarkdown2.7 KB
references/rfid-nfc/tools/libnfc.mdmarkdown2.2 KB

references/playbooks/voip-ics.md

View on GitHub
# 专项协议 Playbook

用于授权的 VoIP、SIP/IAX、语音 VLAN、ICS/OT、PLC、Modbus、IPMI/BMC 或其他高敏感协议测试。

## 输入

- 精确 IP、端口、协议、设备类型、维护窗口和负责人联系方式。
- 禁写规则、呼叫/注册限制、锁定策略和最大请求速率。
- 授权范围是被动审查、发现、只读验证还是主动测试。
- 每台目标设备的 OT 安全分类(如 ICS/OT 在范围内)。
- VLAN 跳转或本地交换机端口测试的物理访问要求和授权。

## 流程

### 决策树

完成阶段 1 后,根据发现的协议选择对应分支:

- **在任意主机检测到 SIP/IAX** → 阶段 2(VoIP 发现)→ 阶段 3(VoIP 安全测试)
- **在任意主机检测到 Modbus/S7/BACnet/DNP3** → 阶段 4(ICS/OT 发现)→ 阶段 5(ICS/OT 只读评估)
- **在任意主机检测到 IPMI/SNMP/打印机管理** → 阶段 6(IPMI/BMC 和网络基础设施)
- **已授权二层测试** → 阶段 7(二层协议测试)
- **所有发现** → 阶段 8(证据、风险评估和升级)

可能同时适用多个分支。例如,同时存在 VoIP 和 ICS 设备的站点应先完成阶段 2-3 和阶段 4-5,再进入阶段 8。始终以阶段 8 结束。

---

1. **阶段 1:安全、范围和协议清点**

   在开始任何主动测试之前,确认授权并识别存在哪些专项协议。

   - 验证授权范围文件列出了每个目标 IP、端口和协议。确认每个设备负责人的停止条件、维护窗口和紧急联系方式。
   - 审查每台设备的关键性级别。连接物理过程的 OT/ICS 设备属于安全关键设备。VoIP 基础设施可能属于业务关键设备。在继续之前将每个目标分类为安全关键、业务关键或标准。
   - 优先使用被动方法:审查客户提供的现有网络拓扑图、镜像抓包、SPAN 端口数据和资产清单。
   - 使用 ICS 和 VoIP NSE 脚本运行服务检测,在授权范围内识别专项协议。使用保守时序以避免干扰脆弱设备。

   ```bash
   # 使用专项协议脚本进行服务检测(保守时序)
   nmap -sV -sC --script "sip-methods,sip-enum-users" -p 5060,5061 -T3 -oA /tmp/sip_scan <target-range>

   # ICS/OT 协议发现
   nmap -sV --script "modbus-discover,s7-info" -p 102,502 -T2 -oA /tmp/ics_tcp_scan <ot-range>
   nmap -sV -sU --script bacnet-info -p 47808 -T2 -oA /tmp/bacnet_scan <ot-range>

   # IPMI、SNMP 和管理接口的广泛服务扫描
   nmap -sV -sU -p 161,623,1900 -T3 -oA /tmp/mgmt_scan <target-range>
   ```

   关于初始网络发现和主机枚举,参见[内部网络 Playbook](internal-network.md) 阶段 1-3。

   风险门控:在确认范围文件并完成设备关键性分类之前,不得进入任何主动测试阶段。如果任何设备被标记为安全关键,须确认 OT 负责人已批准对该特定设备进行主动扫描。

2. **阶段 2:VoIP 发现和枚举**

   在授权范围内发现和枚举 SIP 和 IAX 服务。

   (VoIP/ICS 工具选择参见 `../voip-ics/README.md`。)

   - **SIP 设备发现**:使用 `svmap` 在目标范围内识别 SIP 设备。指定 SIP 端口并将请求速率控制在授权限制内。
   - **SIP 分机枚举**:识别 SIP 主机后,使用 `svwar` 枚举有效分机。使用常见分机号段字典或客户提供的定向列表。
   - **SIP 注册测试**:检查哪些分机接受注册请求。这可以揭示可能使用弱密码或默认凭据的分机。
   - **IAX 枚举**:如果发现 Asterisk IAX2 服务(UDP/4569),使用 `enumiax` 枚举 IAX 用户名。

   ```bash
   # 子网内 SIP 主机发现
   svmap <target-range> -p 5060

   # 对已发现主机枚举 SIP 分机
   svwar -e 100-999 <sip-host> -m REGISTER

   # 使用字典枚举 SIP 分机
   svwar -d /usr/share/wordlists/sipvicious/extensions.txt <sip-host>

   # 使用 sippts 进行 SIP 扫描和分机枚举
   sippts scan -i <target-ip> -r 5060-5080
   sippts exten -i <target-ip> -e 100-999

   # Asterisk 目标的 IAX 用户名枚举
   enumiax -d /usr/share/wordlists/metasploit/unix_users.txt <iax-host>
   ```

   参见 `../voip-ics/tools/sipvicious.md` 了解 `svmap`/`svwar`/`svcrack` 参数详情,参见 `../voip-ics/tools/sippts.md` 了解 SIP Pentest Tools Suite 选项,参见 `../voip-ics/tools/enumiax.md` 了解 IAX 枚举选项。

   决策点:如果发现具有注册功能的 SIP 分机,继续到阶段 3 进行安全测试。如果仅发现被动 SIP 服务(例如无用户注册的中继),记录发现并跳到阶段 8。

3. **阶段 3:VoIP 安全测试**

   测试 VoIP 认证、VLAN 隔离和媒体加密。此阶段的凭据攻击需要明确批准。

   **逐服务覆盖:** 测试所有发现的 SIP 主机和分机,而不仅仅是第一个。对每台 SIP 主机:验证认证强度、检查 TLS 与未加密信令、评估 RTP 加密。对于 VLAN 跳转,测试每个具有本地访问权限的交换机端口,而不仅仅是一个。将每台主机 × 测试项记录为通过/失败/跳过。

   - **SIP 认证测试**:使用 `svcrack` 对已发现分机测试 SIP 凭据。从默认/常用密码开始。完整暴力破解需要明确的书面批准,且必须遵守锁定策略。
   - **语音 VLAN 跳转**:使用 `voiphopper` 测试数据 VLAN 上的攻击者是否可以跳转到语音 VLAN。需要授权的本地交换机端口访问。测试 CDP、LLDP-MED 和基于 DHCP 的 VLAN 发现。
   - **RTP 流分析**:如果有数据包捕获,检查语音媒体使用的是 SRTP(加密)还是未加密的 RTP。未加密的 RTP 允许窃听通话。
   - **SIP TLS 验证**:检查 SIP 信令使用的是 TLS(端口 5061)还是未加密的 UDP/TCP(端口 5060)。未加密的 SIP 会暴露凭据和通话元数据。

   ```bash
   # 对特定分机进行 SIP 凭据测试(需要批准)
   svcrack -u <extension> -d /usr/share/wordlists/rockyou.txt <sip-host> -p 5060

   # 通过 CDP 嗅探发现语音 VLAN
   voiphopper -i eth0 -c 0

   # 发现 VLAN ID 后进行语音 VLAN 跳转
   voiphopper -i eth0 -v <vlan-id>

   # 在捕获文件中检查未加密的 RTP
   tshark -r /tmp/voip_capture.pcap -Y "rtp" -T fields -e rtp.ssrc -e rtp.p_type | head -20

   # 检查 SIP over TLS
   nmap -sV -p 5061 --script ssl-enum-ciphers <sip-host>
   ```

   参见 `../voip-ics/tools/sipvicious.md` 了解 `svcrack` 选项,参见 `../voip-ics/tools/voiphopper.md` 了解 VLAN 跳转模式,参见 `../forensics/tools/tshark.md` 了解数据包分析。

   关于更深入的凭据测试工作流,参见[密码审计 Playbook](password-audit.md)。

   风险门控:SIP 凭据暴力破解需要明确的书面批准。VLAN 跳转需要授权的本地交换机端口访问。如果任何生产通话被中断或 PBX 出现不稳定迹象,立即停止。

4. **阶段 4:ICS/OT 发现**

   识别 ICS/OT 设备和协议。在超出被动扫描的任何交互之前,按安全关键性对每个发现的设备进行分类。

   - **Modbus 发现**:使用 nmap NSE 脚本和 `plcscan` 扫描 TCP/502 上的 Modbus 服务。识别设备类型、固件版本和 Modbus 单元 ID。
   - **S7comm 枚举**:扫描 TCP/102 上的 Siemens S7 PLC。`s7-info` NSE 脚本可获取模块类型、序列号、固件版本和工厂标识。
   - **BACnet 发现**:扫描 UDP/47808 上的 BACnet/IP 设备。`bacnet-info` NSE 脚本可获取设备实例、固件、应用软件版本和对象名称。
   - **DNP3 识别**:扫描 TCP/20000 上的 DNP3 服务。通过源地址和目标地址识别 DNP3 外站。
   - **设备分类**:发现完成后,在继续之前将每台设备分为三类:(a) 安全关键(连接到可能造成危害的物理过程),(b) 仅监控(显示数据的历史记录服务器、HMI),(c) IT 相邻(工程工作站、跳板机)。

   ```bash
   # Modbus 设备发现
   nmap -sV --script modbus-discover -p 502 -T2 -oA /tmp/modbus_scan <ot-range>

   # Siemens S7 PLC 枚举
   nmap -sV --script s7-info -p 102 -T2 -oA /tmp/s7_scan <ot-range>

   # BACnet 设备发现
   nmap -sV -sU --script bacnet-info -p 47808 -T2 -oA /tmp/bacnet_scan <ot-range>

   # DNP3 服务识别
   nmap -sV -p 20000 -T2 -oA /tmp/dnp3_scan <ot-range>

   # 使用 plcscan 进行 PLC 发现(Python 2 脚本——在 Python 3 上会失败;参见工具文档)
   python plcscan.py <ot-target>
   ```

   参见 `../voip-ics/tools/plcscan.md` 了解 PLC 发现选项,参见 `../information-gathering/tools/nmap.md` 了解 NSE 脚本用法。

   风险门控:未对每台已发现设备进行分类前,不得进入阶段 5。安全关键设备(控制物理执行器的 PLC、安全仪表系统)的任何交互(包括只读查询)都需要 OT 负责人批准。如果设备无法分类,按安全关键对待。

5. **阶段 5:ICS/OT 只读评估**

   对 ICS/OT 设备执行只读评估。此阶段不允许任何形式的写操作。

   - **Modbus 寄存器读取**:使用 `modbus`(Kali 中的 Python 二进制,而非 Ruby gem)读取 Modbus 设备的保持寄存器和输入寄存器。记录寄存器值、数据类型和设备响应。使用 `-s`/`--slave-id` 指定阶段 4 中识别的 Modbus 单元 ID。
   - **PLC 识别和固件检查**:将阶段 4 中发现的固件版本与已知漏洞数据库进行交叉比对。检查是否存在已停止维护的固件或具有已发布 CVE 的版本。
   - **历史记录服务器和 HMI 访问测试**:如果历史记录数据库或 HMI Web 界面在范围内,测试它们是否可以在无认证或使用默认凭据的情况下访问。历史记录服务器通常会暴露揭示运营细节的过程数据。
   - **IT/OT 网络分段验证**:验证 IT 和 OT 网络之间是否存在适当的分段。检查 IT 主机是否可以直接访问 OT 设备、防火墙规则是否适当限制流量,以及两个区域之间是否存在 DMZ。

   ```bash
   # 从 Modbus 设备读取从地址 100 开始的 10 个保持寄存器(只读)
   modbus -s 1 <ot-host>:502 h@100/10

   # 读取输入寄存器(i@),开启详细输出
   modbus -s 1 -v <ot-host>:502 i@0/20

   # 读取一块保持寄存器并保存快照用于记录
   modbus -s 1 <ot-host>:502 h@0/100 > /tmp/modbus_snapshot.txt

   # 将固件版本与 CVE 数据库比对
   searchsploit "siemens s7" -j > /tmp/s7_cves.json
   searchsploit "modbus" -j > /tmp/modbus_cves.json

   # 测试 IT 到 OT 的分段
   nmap -sn -T2 <ot-range>           # IT 主机能否到达 OT?
   traceroute -T -p 502 <ot-host>    # 流量经过什么路径?
   ```

   参见 `../voip-ics/tools/modbus-cli.md` 了解寄存器寻址格式和数据类型。参见 `../exploitation/tools/searchsploit.md` 了解漏洞数据库查询。

   严格规则:此阶段为只读。只读取寄存器(`h@`/`i@`)。绝不下发写入访问规格(带值的 `w@`/`c@`)或任何改变设备状态的命令。如果寄存器读取导致异常设备行为,立即停止并通知 OT 负责人。即使是安全关键设备上的读操作也必须经过明确批准。

6. **阶段 6:IPMI/BMC 和网络基础设施**

   测试带外管理接口、SNMP 服务和其他网络基础设施管理协议。

   - **IPMI 枚举**:扫描 UDP/623 上的 IPMI 服务。使用 `ipmitool` 检查未认证访问、获取系统信息和测试默认凭据。IPMI cipher zero(未认证访问)属于 Critical 级别发现。
   - **IPMI 哈希转储**:如果发现 IPMI 2.0,测试 RAKP 认证哈希泄露漏洞(允许在不认证的情况下进行离线密码破解)。
   - **SNMP community string 测试**:使用 `onesixtyone` 对已发现的 SNMP 服务暴力破解 community string。默认字符串 `public` 和 `private` 通常未被更改。
   - **SNMP 枚举**:使用 `snmpwalk` 枚举敏感 OID,包括系统信息、网络接口、路由表、运行进程、已安装软件和 ARP 表。SNMPv1/v2c community string 以明文传输。
   - **打印机和 MFP 测试**:如果网络打印机或多功能打印机在范围内,检查未认证的 Web 界面、默认凭据、PJL/PCL 访问和已存储的打印作业。

   ```bash
   # IPMI 服务发现
   nmap -sU -p 623 --script ipmi-version -T3 -oA /tmp/ipmi_scan <target-range>

   # IPMI 系统信息(如果可访问)
   ipmitool -I lanplus -H <bmc-host> -U ADMIN -P ADMIN chassis status
   ipmitool -I lanplus -H <bmc-host> -U ADMIN -P ADMIN user list 1

   # IPMI cipher zero 检查(未认证访问)
   nmap -sU -p 623 --script ipmi-cipher-zero <bmc-host>

   # IPMI 密码审计(需要批准)
   nmap -sU -p 623 --script ipmi-brute <bmc-host>

   # SNMP community string 暴力破解
   onesixtyone -c /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt -i /tmp/snmp_hosts.txt -o /tmp/snmp_communities.txt

   # 使用发现的 community string 进行 SNMP 枚举
   snmpwalk -v2c -c <community> <host> 1.3.6.1.2.1.1          # 系统信息
   snmpwalk -v2c -c <community> <host> 1.3.6.1.2.1.25.4.2.1.2 # 运行进程
   snmpwalk -v2c -c <community> <host> 1.3.6.1.2.1.25.6.3.1.2 # 已安装软件

   # 打印机 Web 界面检查
   nmap -sV -p 80,443,9100 --script http-title <printer-ip>
   ```

   参见 `../vulnerability/tools/onesixtyone.md` 了解 community string 暴力破解选项,参见 `../vulnerability/tools/snmpwalk.md` 了解 SNMP 枚举参数。关于凭据测试工作流,参见[密码审计 Playbook](password-audit.md)。

   风险门控:IPMI 凭据测试必须遵守锁定策略。如果 SNMPv3 带认证正在使用中,未经明确批准不得尝试绕过。打印机测试应避免修改配置或发送打印作业。

7. **阶段 7:二层协议测试**

   在已授权且网络段支持的情况下测试二层协议安全性。

   - 使用 `yersinia` 进行协议专项测试(见 `../voip-ics/tools/yersinia.md`):

   ```bash
   # CDP/LLDP 信息收集
   yersinia cdp -attack 0 -interface <iface>
   # DTP VLAN 中继协商测试
   yersinia dtp -attack 1 -interface <iface>
   # STP 根桥声明测试(高风险——确认授权)
   yersinia stp -attack 4 -interface <iface>
   ```

   - 风险门控:STP 和 DHCP 攻击可能中断生产网络。仅在明确授权和受控测试窗口内执行。
   - 记录所有二层发现,包括接口、协议和影响评估。

8. **阶段 8:证据、风险评估和升级**

   汇总所有发现,评估风险,并立即升级安全关键问题。

   - **协议清单**:按主机、端口、协议、设备类型、固件版本和关键性分类记录每个已发现的专项协议实例。
   - **网络分段评估**:总结专项协议网段(语音 VLAN、OT 网络、管理网络)与通用 IT 网络之间的分段状况。记录任何缺失的分段边界。
   - **按关键性汇编发现**:将发现组织为四个严重性层级:
     - **Critical**:对安全关键 OT 设备的未认证访问、IPMI cipher zero、敏感通话的未加密 RTP、IT 网络可访问的可写 Modbus 寄存器。
     - **High**:VoIP 基础设施的默认凭据、带写 community string 的 SNMPv1/v2c、缺失的 IT/OT 分段、具有已知 CVE 的未打补丁 PLC 固件。
     - **Medium**:无 TLS 的 SIP、使用默认 `public` community string 的 SNMP(只读)、可行的语音 VLAN 跳转、弱密码的 IPMI。
     - **Low**:通过 SNMP 系统描述的信息泄露、SIP 服务器版本 banner、揭示内部命名规范的 BACnet 设备名称。
   - **立即升级**:安全关键发现需要立即升级给 OT 负责人和项目负责人。不要等到最终报告。例如:对 PLC 的未认证写访问、从 IT 网络可达的安全仪表系统、对控制物理过程的设备的活跃利用路径。
   - **已排除测试文档**:记录每项未执行的主动测试及其原因(例如:"应 OT 负责人要求排除 Modbus 写测试"、"SIP 暴力破解未获授权")。

   ```bash
   # 汇总所有扫描结果
   ls -la /tmp/*_scan* /tmp/modbus_snapshot* /tmp/snmp_* /tmp/voip_*

   # 从 nmap 结果生成合并的主机/端口/服务清单
   grep "open" /tmp/*_scan*.gnmap | sort -u > /tmp/specialized_protocol_inventory.txt

   # 打包证据用于报告
   tar czf /tmp/specialized_protocols_evidence.tar.gz /tmp/*_scan* /tmp/modbus_snapshot* /tmp/snmp_* /tmp/voip_* 2>/dev/null
   ```

## 交叉引用

- `internal-network.md` — 网络分段测试。
- `password-audit.md` — 破解捕获的 SNMP community string、SIP 凭据和 IPMI 哈希。
- `reporting-workflow.md` — 报告结构和交付。

## 预期产物

- 按主机、端口、协议、设备类型、固件版本和关键性级别整理的协议清单。
- VoIP 评估:SIP 主机列表、分机枚举结果、凭据测试结果(附批准证据)、VLAN 跳转结果、RTP 加密状态。
- ICS/OT 评估:带固件版本的 PLC/RTU 设备列表、Modbus 寄存器快照(只读)、分段测试结果、CVE 交叉比对输出。
- IPMI/基础设施评估:BMC 主机列表、密码/认证发现、已发现的 SNMP community string、敏感 OID 枚举输出。
- 语音、OT、管理和 IT 网段之间的网络分段分析。
- 已排除测试列表及每项的理由。
- 安全说明、触发的停止条件和紧急联系日志。

## 停止条件

- 所有范围内协议的获批发现和只读验证已完成。
- 后续工作需要对 OT 设备写操作、实时通话拦截、PLC 固件修改或设备状态变更。
- 在 OT 或 VoIP 基础设施上观察到任何设备不稳定、告警、延迟增加或异常行为。
- 凭据攻击已达到批准的尝试限制或时间预算。
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 196kUpdated Claude CodeCodexVerifiedInstall