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/web-application.md

View on GitHub
# Web 应用 Playbook

用于已授权的 Web 应用、API、CMS 目标,或侦察中发现的 HTTP 服务。

## 输入

- Base URL、允许的主机、认证信息(如有)。
- 测试深度、速率限制、禁止路径,以及是否允许主动利用。
- OpenAPI、GraphQL schema、Postman 集合或示例请求等 API 定义。

## 流程

1. **基线清单**
   - 使用 `httpx`(参见 `../information-gathering/tools/httpx.md`)、`whatweb`(参见 `../information-gathering/tools/whatweb.md`)和 `wafw00f`(参见 `../information-gathering/tools/wafw00f.md`)建立基线。
   - 记录重定向、Cookie、响应头、TLS 详情、WAF 指标和技术栈。

   (侦察工具选择参见 `../information-gathering/README.md`。)
   - **TLS 密码套件审计**:运行 `sslscan`(参见 `../vulnerability/tools/sslscan.md`)或 `testssl.sh`(参见 `../vulnerability/tools/testssl.sh.md`)枚举所有接受的密码套件,并检查已知 TLS 攻击(ROBOT、DROWN、CCS 注入、Ticketbleed、Heartbleed)——不要仅依赖手动 `openssl s_client` 版本检查。标记 3DES、RC4、非 PFS 套件及缺失 TLS 1.3 支持。
   - **通配符证书→子域名枚举**:如果 TLS 证书包含通配符 SAN(如 `*.example.com`),通过 DNS 查询枚举子域名,并逐一探测是否存在独立服务或不同响应状态码。
   - **CORS 源站侦察**:如果 `Access-Control-Allow-Origin` 头指定了具体源站(如 `https://app.example.com`),探测该源站的响应头、CSP 指令、Cookie 和技术栈——其响应元数据常常泄露 API 端点、内部架构或未授权路径。对返回 HTTP 200 且有实际内容的源站运行 `nikto` 和 `nuclei` 扫描。
   - **证书透明度搜索**:通过 `crt.sh` 查询历史证书以发现 DNS 枚举遗漏的子域名。逐一探测发现的子域名——不同的 HTTP 状态码(200、403、400 vs 默认 404)表明存在独立路由的服务,需单独测试。

   ```bash
   httpx-toolkit -l urls.txt -title -tech-detect -status-code -json -o httpx_inventory.json
   whatweb -a 3 <target-url> --log-json=/tmp/whatweb.json
   wafw00f <target-url> -o /tmp/waf_result.txt
   ```

2. **爬取和端点发现**
   - 使用 `katana`(参见 `../web/tools/katana.md`)、`gospider`(参见 `../web/tools/gospider.md`)、`hakrawler`(参见 `../information-gathering/tools/hakrawler.md`)、ZAP 或 mitmproxy 捕获结果爬取。
   - 使用 `ffuf`、`gobuster`、`feroxbuster` 和 `dirsearch`,并选择合适字典。
   - 使用 `arjun` 做参数发现(参见 `../web/tools/arjun.md`)。
   - 如果发现 GraphQL、OpenAPI、gRPC、WebSocket 或 API 密集型行为,切换到 `api-security.md` 做 API 专项测试。

   (Web 工具选择参见 `../web/README.md`。)
   - **前端 JS 静态分析**:下载目标加载的所有 JavaScript 文件(检查 HTML 源码中的 `<script src=...>` 标签),搜索其中硬编码的 API 端点、内部 URL、子域名、Token 和密钥,以便发现暴力枚举和爬取无法触及的内部服务和攻击面。

     ```bash
     # 下载 JS 文件
     curl -sk https://<target>/main.js -o /tmp/main.js
     # 搜索 URL、API 路径、子域名和密钥
     grep -oE 'https?://[a-zA-Z0-9._:/-]+' /tmp/main.js | sort -u
     grep -iE '(api[_-]?key|secret|token|password|authorization)' /tmp/main.js
     ```

   - **目标 IP 全端口扫描**:测试 Web 应用时不要仅扫描 80/443。对目标 IP 执行全 TCP 端口扫描以发现额外服务——非标准端口上的 HTTP、管理面板、调试接口或数据库服务可能暴露在外。

   使用 `ffuf` 或 `feroxbuster` 配合适当的字典进行目录枚举(参见 `../web/tools/ffuf.md` 和 `../web/tools/feroxbuster.md`)。

   ```bash
   katana -u <target-url> -d 3 -jc -kf all -silent -o katana_urls.txt
   ffuf -u <target-url>/FUZZ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt -mc 200,301,302,403 -o ffuf_dirs.json -of json
   arjun -u <target-url> -oJ arjun_params.json
   ```

   **端点清单完整性:** 进入测试前,编制所有已发现端点和参数的去重列表。如果爬取和暴力枚举对一个非简单应用仅产出不到 10 个唯一端点,则需使用更多字典、更深爬取深度、技术栈专属路径和不同文件扩展名重试。此清单驱动后续所有测试。

   **管理界面发现:** 当目录枚举发现数据库管理界面(phpMyAdmin、Adminer、pgAdmin)、服务仪表板(Kibana、Grafana、Redis Commander)或应用管理面板时,立即用凭据工作列表中的所有凭据测试。这些界面通常接受在网络层被限制但通过 Web UI 不受限的数据库或应用凭据。

   **未授权端点发现:** 不要假设全局认证的 API 不存在未授权端点。CSP `report-uri` 指令、CORS 引用的源站、错误处理器、健康检查和回调 URL 常常绕过认证。当任何端点返回非 401 响应(包括 200、400、403),将其视为独立攻击面,执行完整测试矩阵(注入、SSRF、速率限制、方法枚举),无论其响应体看起来是否"空"或"静态"。

3. **自动化 DAST**
   - 早期运行 `nuclei` 和 `nikto` 检查已知 CVE 和常见配置错误。
   - 使用 ZAP baseline/API 扫描做被动和 API 方向检查。
   - 仅在明确授权时使用 ZAP full 扫描。

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

   使用 JSON 输出运行 `nikto`(参见 `../web/tools/nikto.md` 了解包含 HTML/CSV 报告在内的变体)。
   使用漏洞分析分类中的 `nuclei` 做模板化检查(见 `../vulnerability/tools/nuclei.md`)。

   ```bash
   nikto -h <target-url> -Format json -o /tmp/nikto.json
   # 先定位 nuclei 模板目录(路径因 Kali 版本而异)
   TMPL=$(find ~ -name "nuclei-templates" -type d 2>/dev/null | head -1)
   nuclei -u <target-url> -t "$TMPL/http/misconfiguration/" \
     -t "$TMPL/http/exposures/" -t "$TMPL/http/technologies/" \
     -severity critical,high,medium -o /tmp/nuclei_web.jsonl -jsonl
   ```

   **零发现应对:** 如果两个扫描器均报告零发现,不得直接接受。使用扩展范围重跑(如 nuclei 追加 `http/cves/` 和 `http/vulnerabilities/` 模板路径、nikto 加 `-Tuning 123`),并记录复查结果。对于 nuclei,添加 `-v` 确认模板是否已加载且请求是否已发送——静默零输出通常意味着模板路径未正确解析或目标不可达。通过检查详细输出中是否有非空响应数据来验证扫描器是否到达了应用。

4. **定向漏洞测试**
   - 识别候选参数后用 `sqlmap` 测试 SQL 注入。
   - 根据观察到的功能测试 XSS、SSTI、SSRF、路径穿越、文件上传、命令注入、JWT、CORS 和认证逻辑。
   - 对 SSTI 候选点使用 `sstimap`(参见 `../web/tools/sstimap.md`),指纹匹配时使用 `wpscan`(参见 `../web/tools/wpscan.md`)或 `joomscan`(参见 `../web/tools/joomscan.md`)等 CMS 专项工具。在选择 CMS 专项扫描器前先运行 `cmseek` 识别 CMS(参见 `../web/tools/cmseek.md`)。

   (注入和漏洞测试工具选择参见 `../web/README.md`。当确认的漏洞需要获取 shell 时,利用路径选择参见 `../exploitation/README.md`。)

     ```bash
     cmseek -u <target-url>
     ```

   - **命令注入**:使用 `commix` 进行系统化 OS 命令注入测试(参见 `../web/tools/commix.md`)。

     ```bash
     commix --url "http://target/page?param=INJECT_HERE" --level=3 --batch
     ```

   - **文件上传测试**:测试文件类型限制、上传文件名中的路径穿越、多态文件(如 GIF 头部 + PHP)以及上传大小限制。
   - **反序列化**:识别参数或 cookie 中的序列化对象;使用已知 gadget 链(Java/PHP/.NET)进行测试。对 PHP 反序列化漏洞,使用 `phpggc` 生成 gadget 链(见 `../web/tools/phpggc.md`)。对 CBC 模式加密的 cookie/令牌进行 Padding Oracle 攻击,使用 `padbuster`(见 `../web/tools/padbuster.md`)。
   - **HTTP 请求走私**:在前端和后端服务器不同的场景下,测试 CL/TE 和 TE/CL 混淆。
   - **SSRF**:测试 URL 和文件参数是否可访问内网、云元数据(`http://169.254.169.254`)以及内部服务枚举。
   - **XXE**:测试 XML 输入是否存在外部实体注入;如果内联响应未反射,尝试带外获取。
   - **安全响应头分析**:
     - 检查缺失的响应头:`Content-Security-Policy`、`Strict-Transport-Security`、`X-Frame-Options`、`X-Content-Type-Options`、`Referrer-Policy`、`Permissions-Policy`。
     - 检查 CORS 配置:发送不同的 `Origin` 请求头,检测通配符或过于宽松的策略。
     - 使用 `crlfuzz` 测试 CRLF 注入。
   - **跨服务配置一致性对比**:当多个服务共享相同基础设施(如 API、前端、企业 API 在同一 IP 或通配符证书下)时,对比它们的 TLS 密码套件、安全头部、CORS 策略和认证要求。不一致之处往往暴露最薄弱环节——前端缺少 TLS 1.3 而 API 支持,或内部 API 无需认证而公共 API 强制认证。
   - **CSP 源站验证**:如果目标设置了包含外部脚本源的 `Content-Security-Policy`,验证每个允许的域名是否可解析且不存在子域名接管风险。CSP 允许域名的 NXDOMAIN 结果意味着 CSP 绕过风险。

   在识别出的参数上运行 `sqlmap` 并使用 `--batch --dbs`(参见 `../web/tools/sqlmap.md` 了解完整参数,包括混淆脚本、level/risk 和 OS shell)。

   运行 `dalfox` 进行 XSS 检测(参见 `../web/tools/dalfox.md`)。

   如果检测到模板引擎,使用 `sstimap` 测试 SSTI(参见 `../web/tools/sstimap.md`)。

   如果确认是 WordPress,运行 `wpscan` 并进行用户/插件/主题枚举(参见 `../web/tools/wpscan.md` 了解 API 令牌和暴力破解选项)。

   **逐端点覆盖:** 第 2 步清单中的每个端点必须针对所有适用的漏洞类型(注入、XSS、SSRF、访问控制、文件上传、反序列化)进行测试——不仅仅是"看起来可注入"的端点。当 sqlmap 等工具在默认设置下报告零发现时,需提升灵敏度(如 `--level=5 --risk=3`)后才可接受阴性结果。明确记录已测试和未测试的端点。

5. **认证测试**
   - 保持会话处理和速率限制。
   - 需要请求重放、证据捕获或令牌处理时,将工具流量经过 ZAP 或 mitmproxy。

   (Web 测试工具选择参见 `../web/README.md`。)
   - 获得会话后,手工检查以下认证和授权测试点:
     - **认证缺陷**:会话固定、令牌熵不足、敏感操作缺少重认证。
     - **JWT 缺陷**:`alg:none`、弱密钥、`kid` 注入——使用 `jwt_tool` 验证(参见 `../web/tools/jwt_tool.md`)。
     - **IDOR / BOLA**:跨角色替换对象 ID,验证响应差异。
     - **CORS 配置错误**:发送 `Origin: https://evil.com`,检查响应中是否有反射的请求头。
     - **CSRF**:确认令牌绑定;测试有无 `SameSite` cookie 属性时的行为差异。
     - **权限提升**:使用低权限账号访问管理员或高权限端点。
     - **强制浏览**:不携带 cookie 或使用过期令牌访问需认证的路径。

   ```bash
   # 通过认证的代理会话路由 sqlmap
   sqlmap -u "<url>" --proxy http://127.0.0.1:8080 --cookie="session=<token>"
   # JWT 分析——先运行 playbook 扫描,再运行全部测试
   jwt_tool <token> -M pb
   jwt_tool <token> -M at
   ```
   使用 `mitmdump` 捕获流量(参见 `../web/tools/mitmproxy.md` 了解监听参数和导出格式)。

   **凭据发现处理:** 在 Web 测试中发现凭据时(配置文件、备份归档、错误信息、源代码、默认凭据),立即对所有已发现的认证端点——管理面板、API、数据库和 SSH——进行测试,然后再继续下一个测试阶段。

6. **WebSocket 测试**
   - 如果在爬取或流量捕获中发现 WebSocket 端点:

   (Web 测试工具选择参见 `../web/README.md`。)
     - 测试握手认证:是否可以在没有有效凭据的情况下连接?
     - 测试每条消息的授权:发送针对其他用户资源的消息。
     - 测试 WebSocket 消息中的注入(SQL、命令、XSS payload)。
     - 监控 WebSocket 帧中是否泄露敏感数据。
   - 参见 `../web/tools/websocat.md` 了解基于 CLI 的 WebSocket 交互。

7. **业务逻辑测试**
   - **竞态条件**:对关键操作(账号创建、余额转账、投票)发送并发请求,检查是否存在重复处理。
   - **流程绕过**:跳过多步骤流程中的步骤(如在结账中从第 1 步直接跳到第 3 步),验证服务端强制执行。
   - **价格/数量篡改**:修改电商请求中的价格、数量或折扣值,确认服务端验证。
   - **优惠券/折扣滥用**:测试优惠券复用、叠加、负值,以及是否可应用于排除商品。

8. **密钥和源码工件**
   - 仅在源码、代码仓库、归档文件或工件明确位于范围内时使用 `gitleaks`。
   - 如果源码可用,移交至 `source-code-audit.md` 进行静态分析。

   ```bash
   gitleaks dir --redact -f json -r /tmp/gitleaks_report.json <repo-dir>
   ```

## 交叉引用

- `external-attack-surface.md` — 在 Web 测试中发现更多子域或相关基础设施时。
- `internal-network.md` — 当 Web 应用位于需要更广泛网络评估的内网时。
- `password-audit.md` — 用于破解捕获的密码哈希或测试凭据强度。
- `source-code-audit.md` — 当应用源码可用于静态分析时。
- `reporting-workflow.md` — 用于将发现整理为可交付报告。
- `api-security.md` — 当需要 GraphQL、REST API、gRPC 或 WebSocket 测试时。

## 预期产物

- URL 和端点清单。
- 参数列表和有价值的请求样本。
- 截图和 HTTP 证据。
- 机器可读和人类可读的扫描器报告。
- 带复现请求的已确认发现。

## 停止条件

1. **端点覆盖:** 清单中的所有端点均已针对所有适用漏洞类型完成测试,并记录了每个端点的结果(阳性或阴性)。"已测试"意味着每个输入字段都被测试过——不是每个端点只发一个请求。
2. **跨资源授权:** 对含用户资源的端点,用其他用户的 ID/路径测试过。只访问自己的资源不能确认隔离性。
3. **扫描器验证:** DAST 扫描器零发现的结果已通过扩展范围或手工验证复查。
4. **输入深度:** 不同输入上下文(HTML 反射、数据库存储、重定向、邮件渲染)分别测试——一个上下文的发现不保证其他上下文安全。
5. **范围边界:** 高风险主动利用需要额外批准,或认证/速率限制/WAF 控制阻止继续安全自动化。
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: 194kUpdated Claude CodeCodexVerifiedInstall