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/internal-network.md

View on GitHub
# 内网 Playbook

用于已授权的内网网段、实验室网络,或起点为 IP、CIDR、已知主机的全面渗透测试任务。

## 输入

- 已授权的 IP/CIDR 和排除主机。
- 允许的扫描窗口、速率限制和侵入式测试限制。
- Kali 执行模式,以及 Kali 到目标的网络可达性。

## 流程

1. **连通性和路由**
   - 用 `ip route`、`ping`、`arp` 或协议专项检查验证 Kali 能访问目标网段。
   - 如果 Docker 无法访问宿主机 OS 可访问的主机,按 `../environment/docker-mode-networking.md` 处理。

   ```bash
   ip route            # 确认默认网关和子网路由
   ping -c 3 <target>  # 基本可达性
   arp -a              # 检查本地主机的 ARP 表
   ```

2. **主机发现**
   - 先使用低噪声发现:`nmap -sn`、`fping`、本地 LAN 使用 `arp-scan`,仅在已授权时使用 `masscan`。
   - 包含 IPv6 主机发现。许多内网启用了 IPv6 但未纳入监控,使其成为有价值的攻击面。
   - 保存存活主机列表供后续阶段使用。

   使用 `nmap -sn` 进行 ping 扫描,或使用 `arp-scan` 进行本地 LAN 扫描(参见 `../information-gathering/tools/nmap.md` 了解主机发现参数;参见 `../information-gathering/README.md` 了解工具选择)。

   ```bash
   arp-scan --localnet                     # 基于 ARP,仅 LAN,非常快
   fping -a -g <CIDR> 2>/dev/null > live_hosts.txt
   # IPv6 主机发现
   nmap -6 -sn <prefix>                    # 在已知前缀上进行 IPv6 ping 扫描
   ping6 ff02::1%<interface>               # 链路本地全节点组播
   # 从 MAC 地址推导目标 IPv6(同一 LAN):先发送组播 ping,再查看邻居表
   ip -6 neigh | grep <target-mac>         # 组播 ping 后查找目标的 link-local 地址
   ```

   **零发现应对:** 如果未发现存活主机,验证网络连通性(阶段 1),拓宽发现方式(增加 ARP 扫描、对常用端口做 TCP SYN、IPv6 组播),并检查主机防火墙是否阻止了 ICMP。不得在主机列表为空的情况下进入阶段 3。

3. **端口和服务映射**
   - 先做 Top 端口 TCP 发现,再对存活/关键主机做全 TCP。
   - 随后用 `nmap` 做服务/版本检测和安全 NSE 脚本检查。
   - 按深度执行 UDP 扫描:
     - Standard:`nmap -sU --top-ports 20`(覆盖 SNMP/161、DNS/53、NTP/123、TFTP/69、IPMI/623、NetBIOS/137)。
     - Deep:`nmap -sU --top-ports 100` 或基于已发现 TCP 服务的针对性扫描。
     - 始终对基础设施设备(路由器、交换机、BMC)扫描 UDP/161 和 UDP/623。

   使用 Top 端口 TCP + 版本检测扫描存活主机(参见 `../information-gathering/tools/nmap.md` 了解端口范围、时序和输出格式变体;参见 `../information-gathering/README.md` 了解工具选择)。

   ```bash
   nmap -sV -sC --top-ports 1000 -oA quick_tcp -iL live_hosts.txt
   nmap -sV -p- -oA full_tcp <key-host>
   ```

   **两阶段确认扫描(必须执行):** 高速扫描(`--min-rate 2000`)在 Docker Desktop 或网络拥塞时可能丢包,导致端口被静默遗漏。高速扫描完成后,必须使用低速重试扫描对所有开放端口进行确认,方可继续:

   ```bash
   # 第一阶段:高速全端口发现
   nmap -sT -Pn -p- --min-rate 2000 -oA /tmp/scan_fast <target>
   # 提取已发现端口
   PORTS=$(grep '/open/' /tmp/scan_fast.gnmap | grep -oP '\d+/open' | cut -d/ -f1 | sort -u | tr '\n' ',' | sed 's/,$//')
   # 第二阶段:低速确认 + 版本 + 脚本
   nmap -sT -Pn -p "$PORTS" --min-rate 200 --max-retries 5 -sV -sC -oA /tmp/scan_confirm <target>
   ```

   **零发现应对:** 如果已确认存活的主机显示零个开放端口,使用 `-sT -Pn -p-`(全 TCP 连接扫描,跳过主机发现)重试。检查是否有透明防火墙或 IDS 丢弃探测包。如果仍然零端口,将该主机记录为完全过滤状态并继续处理下一台主机。

   **未识别服务强制探测(必须执行):** 当 nmap 无法识别服务(标注为 `unknown`、`tcpwrapped` 或添加 `?` 后缀)时,继续前必须进行探测:

   ```bash
   # 第 1 步:TLS 证书元数据
   openssl s_client -connect <ip>:<port> </dev/null 2>/dev/null | openssl x509 -noout -subject -dates
   # 第 2 步:ALPN 协商(尝试已知协议)
   openssl s_client -alpn h2 -connect <ip>:<port> </dev/null 2>/dev/null | grep -E 'ALPN|Protocol'
   openssl s_client -alpn http/1.1 -connect <ip>:<port> </dev/null 2>/dev/null | grep -E 'ALPN|Protocol'
   # 第 3 步:banner 捕获
   nc -w3 <ip> <port> 2>/dev/null | head -c 512 | xxd | head
   curl -sk https://<ip>:<port>/ -o /dev/null -w '%{http_code}\n'
   ```

   完成以上所有步骤后,才可将服务标注为"未能识别"。

   **脚本结果验证:** 当 nmap NSE 脚本报告模糊或包含错误的结果(部分成功、超时警告、PASV 不匹配、意外错误码)时,使用手动协议交互或第二个工具进行验证。不要基于未完全成功的脚本将服务测试标记为完成。

   **逐服务测试矩阵:** 识别每个服务后,在进入下一个服务之前完成所有适用项:

   | 测试项 | 必须完成的范围 |
   |--------|----------------|
   | 精确版本识别(minor 版本级别) | 所有服务 |
   | CVE 评估,包括版本范围核查 | 所有服务 |
   | 匿名 / 未认证访问测试 | 所有服务 |
   | 协议级深度探测(RPC 端点、ALPN、命名管道、握手) | 所有服务 |
   | 凭据攻击:fasttrack 字典 + 目标相关词 | 所有认证服务 |
   | 配置安全检查(签名、加密等级、访问控制) | 所有服务 |
   | 攻击链分析:当前弱点能否与其他发现组合? | 所有发现 |

   **重复/辅助端口的简化矩阵:** 对于动态 RPC 端点(49152-65535)、已测试服务的辅助监听器(如 5985 已测试时的 47001 WinRM)、或同一服务在多个端口上的情况,仅确认服务身份和版本——跳过完整矩阵。

   对每个服务同时记录已确认发现和已测试但无发现的阴性结果。

   **本地绑定服务:** 当服务基于源 IP 拒绝连接(如 MySQL `Host not allowed`、PostgreSQL pg_hba 拒绝),标记为"本地绑定——获取 Shell 后重新测试"。维护一个延迟测试列表。获取初始访问后(阶段 8),返回此列表从被攻陷主机测试每个服务。

   **AD 域发现:** 当服务扫描期间发现 AD 域信息(域名、计算机名、通过 RID 循环枚举的用户账户),记录下来用于 `active-directory.md` 切换,但在切换前继续完成每服务测试矩阵。

   **CVE 评估流程:** 对每个已识别版本的服务:(1) `searchsploit <service> <version>` 进行离线 Exploit-DB 检索,(2) `getsploit <service> <version>` 进行在线多数据库搜索,(3) `nuclei -tags cve` 对服务进行模板化 CVE 检测,(4) 手动检查 NVD 和厂商安全公告以获取近期或未收录的 CVE,(5) 对于具有插件生态的应用框架(WordPress、Joomla、Drupal),使用 CMS 专用扫描器(`wpscan`、`joomscan`、`droopescan`)——searchsploit 和 nuclei 可能无法覆盖第三方插件漏洞。

4. **网络基础设施和分段**
   - 通过 SNMP 和管理接口枚举网络设备(路由器、交换机、防火墙)。
   - 测试 VLAN 分段——确定是否可以到达授权网段之外的 VLAN。
   - 在发现的管理接口上测试网络设备默认凭据。
   - 内部 DNS 枚举:尝试区域传输和反向 DNS 扫描。

   ```bash
   # DNS 区域传输尝试
   dig axfr @<dns-server> <domain>
   # 对 /24 进行反向 DNS 扫描
   nmap -sL <CIDR> | grep '(' | awk '{print $5}'
   # 网络设备 SNMP 枚举
   snmpwalk -v2c -c public <router-ip> 1.3.6.1.2.1.4.20  # IP 地址表
   snmpwalk -v2c -c public <switch-ip> 1.3.6.1.2.1.17    # 桥接/VLAN 表
   ```

5. **协议枚举**

   将发现的服务路由到对应的 playbook 或协议参考文档:

   - HTTP/HTTPS:根据服务类型区分处理后再决定是否切换 playbook:
     - 自定义 Web 应用或 CMS(未知应用、WordPress、Joomla 等):切换到 `web-application.md`。
     - 已知产品的 Web UI(Jenkins、Grafana、Cockpit、phpMyAdmin、Kibana 等):仅测试版本 + 已知 CVE + 默认/已发现凭据 + 产品专项错误配置。不执行完整的 `web-application.md` 工作流。
     - 静态或默认页面(Apache/Nginx 欢迎页、目录列表):仅目录枚举 + 技术指纹。
   - API 密集型 HTTP、OpenAPI、GraphQL、gRPC 或 WebSocket:切换到 `api-security.md`。判断标准:HTTP 服务返回 `application/json` 内容类型、暴露 `/api-docs`、`/swagger`、`/openapi.json` 或 `/graphql` 端点,或 `whatweb`/`httpx` 识别到 API 框架(Express、FastAPI、Spring Boot、Django REST)。
   - Kubernetes、Docker API、镜像仓库、云元数据:切换到 `cloud-native-assessment.md`。
   - SIP、IAX、VoIP、ICS/OT、PLC、Modbus:切换到 `voip-ics.md`。
   - 其他所有协议(SMB、MSRPC、SNMP、Kerberos、LDAP、RDP、WinRM、SSH、FTP、数据库、邮件、NFS、IPMI、Redis/NoSQL):按 `internal-network-protocols.md` 执行。

   **Playbook 切换:** 当发现的服务触发切换到另一个 playbook 时,完成该 playbook 的工作流后返回此处继续处理下一个服务。

   **凭据发现处理:** 在任何阶段发现凭据时(FTP/SMB 上的备份文件、配置页面、nmap 脚本输出、SNMP community string),立即将其加入凭据工作列表。在进入下一阶段前,对所有已发现的认证服务(SSH、FTP、数据库、Web 登录、API)测试每个凭据。不要将凭据测试推迟到阶段 7——已发现的凭据可能在当前阶段解锁更深层的枚举。

   **覆盖要求:** 对于每个发现的服务,在标记为已测试之前完成阶段 3 的完整每服务测试矩阵。不要跳过看起来无关紧要的协议——系统地测试它们。

6. **漏洞评估**
   - 对非 HTTP 服务进行已知漏洞扫描:`nuclei` 网络模板、SSL/TLS 配置检查(`testssl.sh`/`sslscan`)、协议专项漏洞 NSE 脚本。
   - 仅在 Deep 扫描、已初始化且已授权时使用 GVM/OpenVAS。
   - 注意 LLMNR/NBT-NS/mDNS 投毒暴露:如果这些协议在网络中处于活动状态,`responder` 可以被动捕获凭据。捕获的哈希应转交 `password-audit.md` 进行离线破解。

   (漏洞扫描器选择参见 `../vulnerability/README.md`。)

   ```bash
   # 对发现的 Web 服务做快速 CVE 扫描
   httpx-toolkit -l live_hosts.txt -p 80,443,8080,8443 -o web_urls.txt
   nuclei -l web_urls.txt -severity critical,high -o nuclei_critical.jsonl -jsonl
   # 关键主机的 SSL/TLS
   testssl.sh --jsonfile /tmp/ssl_<ip>.json <ip>:443
   # 被动凭据捕获(仅限已授权网络)
   responder -I <interface> -A   # 分析模式——仅监听,不投毒
   ```

7. **凭据检查**
   - 本阶段覆盖主动凭据测试——默认凭据、密码喷洒和暴力破解。在早期阶段自然发现的凭据应已按照凭据发现处理指令完成测试。
   - 仅在授权的锁定策略内测试默认凭据和已知凭据。
   - 使用 `netexec` 对发现的服务进行多协议默认凭据测试。
   - 对哈希破解、密码喷洒或暴力破解,切换到 `password-audit.md`。

   (凭据工具选择参见 `../password/README.md`。)

   ```bash
   # 使用 nxc 进行多协议凭据测试
   nxc smb <CIDR> -u 'administrator' -p 'admin'        # SMB 默认凭据
   nxc winrm <CIDR> -u <user> -p <password>            # WinRM 访问
   nxc ssh <CIDR> -u root -p root                      # SSH 默认凭据
   nxc mssql <CIDR> -u sa -p 'sa'                      # MSSQL 默认凭据
   nxc ldap <CIDR> -u <user> -p <password>             # LDAP 绑定测试
   nxc smb <CIDR> -u 'administrator' -p 'admin' --local-auth   # 本地账户(非域)
   ```

8. **漏洞利用和后渗透**
   - 只利用已确认漏洞,且必须先获得明确批准。利用路径选择参见 `../exploitation/README.md`(已知 CVE、Web 漏洞、有效凭据、隧道/跳板路径决策树)。
   - 如果获得初始访问,切换到 `post-exploitation.md`,并对新发现的范围内网络重新开始侦察。在一台主机上完成后渗透后,返回此处从被攻陷主机测试延迟服务,并利用新发现的凭据继续攻击剩余目标。
   - 存在多条利用路径时,按以下优先级排序:可靠性(成熟漏洞利用 > PoC)、隐蔽性(凭据登录 > RCE)、可逆性(登录 > 代码执行)。

   ```bash
   # 获得 shell 后:稳定化、枚举、提权
   python3 -c 'import pty; pty.spawn("/bin/bash")'    # TTY 升级
   ./linpeas.sh > /tmp/linpeas_<target>.txt           # Linux 提权枚举
   ./winpeas.exe > C:\Temp\winpeas_<target>.txt       # Windows 提权枚举
   # 验证利用成功:确认访问级别和网络位置
   id && hostname && ip addr show
   ```

## 交叉引用

- `internal-network-protocols.md` — 阶段 5 的协议专项测试流程(核心组成部分——对于非 HTTP 协议测试必须阅读)。
- `active-directory.md` — 域枚举、Kerberoasting、AS-REP roasting 和 AD 提权路径。
- `web-application.md` — 对发现的 HTTP/HTTPS 端点进行 Web 服务测试。
- `api-security.md` — 对发现的 REST、GraphQL、gRPC 或 WebSocket 服务进行 API 测试。
- `cloud-native-assessment.md` — 当发现 Kubernetes API、Docker 守护进程或云服务端点时。
- `voip-ics.md` — 当发现 VoIP/SIP、ICS/OT/Modbus 或 IPMI/BMC 服务时。
- `password-audit.md` — 对捕获的 NTLM、NTLMv2 和 Kerberos 哈希进行破解。
- `post-exploitation.md` — 获取初始访问权限后的后渗透活动。
- `wireless-assessment.md` — 在内网中发现无线接入点或蓝牙设备时。
- `reporting-workflow.md` — 证据打包和报告生成。

## 预期产物

- 存活主机列表(IPv4 和 IPv6)。
- Nmap `-oA` 输出和解析后的开放端口摘要。
- 按主机整理的服务清单。
- 网络基础设施地图(路由器、交换机、VLAN、DNS 区域)。
- 带严重等级和证据的漏洞扫描输出。
- 带锁定安全说明的凭据测试结果。
- 捕获的哈希和凭据产物(如适用)。

## 停止条件

- 所有范围内存活主机都有服务清单。
- Standard 深度的漏洞和协议检查已完成。
- 网络分段和基础设施枚举已记录。
- 继续推进需要侵入式利用或范围外跳板转发。
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