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/external-attack-surface.md

View on GitHub
# 公网攻击面 Playbook

用于已授权的域名、组织、云关键词或公网 IP 范围。

## 输入

- 已授权的根域名、公司名称、ASN/IP 范围和云范围。
- 主动探测前是否要求仅做 OSINT 收集。
- Shodan 或云发现工具等服务可用的 API 密钥。

## 流程

1. **被动发现**
   - 使用 `amass`、`subfinder`、`assetfinder`(参见 `../information-gathering/tools/assetfinder.md`)、`theHarvester`、`shodan`(参见 `../information-gathering/tools/shodan.md`)以及证书/DNS 来源(参见 `../information-gathering/tools/subfinder.md`、`../information-gathering/tools/theHarvester.md`、`../information-gathering/tools/amass.md`)。
   - 将被动发现和主动发现分开保存。

   (侦察工具选择参见 `../information-gathering/README.md`。)
   - **邮件安全记录**:检查 SPF(`dig TXT <domain>` 并查找 `v=spf1` 记录)、DKIM 和 DMARC(`dig TXT _dmarc.<domain>`),识别邮件欺骗风险。
   - **历史 URL 发现**:查询 Wayback Machine 和 Web 归档,获取旧端点、已删除页面和遗留 API 路径。
   - **代码仓库暴露**:在 GitHub/GitLab 上搜索组织的公开仓库;检查已发现 Web 服务器上的 `.git` 目录暴露。
   - **基于 ASN 的 IP 范围发现**:查找组织的 ASN 并枚举关联 IP 范围,扩大目标范围。

   ```bash
   amass enum -passive -d <domain> -oA amass_passive
   subfinder -d <domain> -o subfinder_domains.txt
   theHarvester -d <domain> -b google,linkedin,shodan -f harvester_results
   assetfinder --subs-only <domain> | tee assetfinder_domains.txt
   findomain -t <domain> -u findomain_domains.txt
   # 邮件安全记录检查(SPF 位于域名根,不是 _spf 子域名)
   dig TXT <domain>            # 查找 v=spf1 记录
   dig TXT _dmarc.<domain>
   # 从 Web 归档收集历史 URL
   echo "<domain>" | gau -subs -o /tmp/gau_urls.txt
   # 证书透明度图
   certgraph -json <domain> > /tmp/certgraph.json
   ```

   使用 `findomain` 从多个来源进行快速被动子域发现(参见 `../information-gathering/tools/findomain.md`)。使用 `getallurls`(`gau`)从 Wayback Machine 和其他 Web 归档收集历史 URL(参见 `../information-gathering/tools/getallurls.md`)。使用 `certgraph` 进行证书透明度图探索(参见 `../information-gathering/tools/certgraph.md`)。

   **子域枚举完整性:** 使用至少三个独立被动信息源(如 amass、subfinder、通过 crt.sh 查询证书透明度日志)。如果某个信息源产生了其他信息源未发现的唯一结果,则增加第四个信息源。不要依赖单一工具进行子域发现。

   **凭据发现处理:** 在被动发现阶段发现凭据时(暴露的 `.git` 仓库、泄露的配置文件、公开代码仓库、Shodan 结果中的嵌入凭据、包含令牌的历史 URL),立即对所有已发现的认证端点进行测试,然后再继续下一阶段。

2. **DNS 验证和扩展**
   - 用 `dnsx`、`massdns` 或 `dig` 验证候选项。
   - 适当使用 `dnsgen`、`altdns` 或 `dnstwist` 扩展命名模式。
   - 仅对授权域名尝试区域传送。

   ```bash
   # 合并并去重被动结果,然后验证
   cat *_domains.txt | sort -u > all_candidates.txt
   dnsx -l all_candidates.txt -a -cname -o dnsx_resolved.json -json
   # 扩展并验证排列
   dnsgen all_candidates.txt | massdns -r /usr/share/seclists/Miscellaneous/dns-resolvers.txt -t A -o S -w massdns_resolved.txt
   dig axfr @<ns-server> <domain>   # 区域传送尝试
   ```

3. **HTTP 和端口暴露**
   - 用 `httpx`(参见 `../information-gathering/tools/httpx.md`)探测 HTTP 服务。
   - 根据授权深度和速率限制使用 `naabu`(参见 `../information-gathering/tools/naabu.md`)、`nmap`(参见 `../information-gathering/tools/nmap.md`)或 `masscan`(参见 `../information-gathering/tools/masscan.md`)。
   - 捕获标题、状态码、技术栈和 TLS 元数据。
   - **WAF/CDN 识别**:使用 `wafw00f` 结果确定测试方案。如果检测到 CDN,尝试通过历史 DNS 记录、SSL 证书主题或直接 IP 扫描找到源站 IP。

   **全端口覆盖:** 不要仅依赖 top-1000 端口。对所有范围内 IP 至少执行一次全 TCP 端口扫描(`-p1-65535`)。比较 `naabu` 和 `masscan` 的结果——如果不一致,使用 `nmap -sV` 对有争议的端口重新扫描确认。

   ```bash
   httpx-toolkit -l resolved_domains.txt -title -tech-detect -status-code -json -o httpx_inventory.json
   naabu -l resolved_domains.txt -top-ports 1000 -json -o naabu_ports.json
   nmap -sS -sV -sC -iL resolved_ips.txt -oA external_scan
   masscan -p1-65535 --rate 1000 --include-file resolved_ips.txt -oJ masscan_results.json
   wafw00f -i resolved_domains.txt -o /tmp/waf_results.txt
   ```

   端口发现完成后,执行 `internal-network.md` 第 3 阶段中的两阶段确认扫描、未识别服务探测和逐服务测试矩阵。

4. **子域名接管评估**
   - 检查指向已停用云服务(S3、Azure、Heroku、GitHub Pages、Fastly、Shopify)的悬空 CNAME 记录。
   - 通过检查 CNAME 目标是否返回未认领服务的错误页面来验证。
   - 将 `dnsx` CNAME 输出与已知接管指纹交叉比对。

   ```bash
   # 提取 CNAME 记录并检查悬空目标
   dnsx -l all_candidates.txt -cname -resp-only -o cname_records.txt
   # 探测 CNAME 目标是否存在未认领服务指标
   httpx-toolkit -l cname_records.txt -title -status-code -json -o takeover_candidates.json
   # 自动化子域名接管检测
   subjack -w all_subdomains.txt -a -ssl -o /tmp/subjack_results.txt
   ```

   使用 `subjack` 在常见云服务上进行自动化子域名接管检测(参见 `../web/tools/subjack.md`)。

5. **云暴露**
   - 仅对范围内云命名空间使用 `cloud-enum` 或 `cloudbrute`。
   - 将公开存储桶、暴露管理面板和泄露端点作为需要验证的发现。

   ```bash
   cloud_enum -k <company-name> -l /tmp/cloud_enum_results.txt
   cloudbrute -d <domain> -k <keyword> -m storage -o cloudbrute_results.txt
   ```

6. **漏洞分诊**
   - 先运行低影响 `nuclei` 模板。
   - 对确认存活的应用运行 `nikto`、SSL/TLS 检查、CMS 扫描器和 Web playbook 步骤。

   (漏洞扫描器选择参见 `../vulnerability/README.md`。)
   - **分诊决策逻辑**:
     - 已确认的远程代码执行、认证绕过或数据泄露发现可直接报告。
     - 具有复杂攻击面的 Web 应用应移交至 `web-application.md` 做深度测试。
     - 发现的 API 端点(REST、GraphQL、gRPC)应移交至 `api-security.md`。
     - 信息性发现(版本泄露、轻微配置错误)记录但降低优先级。
     - 第 4 阶段确认的子域名接管候选项为高优先级发现。

   ```bash
   nuclei -l resolved_domains.txt -severity critical,high -o nuclei_triage.jsonl -jsonl
   testssl.sh --jsonfile /tmp/ssl.json --parallel <target>:443
   searchsploit <service-name> <version>   # 将发现的服务与 Exploit-DB 比对
   ```

7. **证据和去重**
   - 按域名、IP、端口、协议方案和重定向目标归一化主机。
   - 报告前对跨域名和别名的发现去重。

## 交叉引用

- `web-application.md` — 对发现的 Web 应用做深度测试。
- `api-security.md` — 对发现过程中找到的 REST、GraphQL、gRPC 或 WebSocket 端点进行测试。
- `internal-network.md` — 当外部侦察发现 VPN、暴露的内部服务或跳板机会时。
- `reporting-workflow.md` — 用于将发现整理为可交付报告。
- `cloud-native-assessment.md` — 发现简单存储桶之外的云资产时(如暴露的 Kubernetes 仪表板、云元数据端点)。

## 预期产物

- 根范围和发现来源清单。
- 已验证子域名和 DNS 记录。
- 包含状态、标题和技术栈的 HTTP 清单。
- 公网 IP/端口清单。
- 已确认的暴露面发现和误报说明。

## 停止条件

- 所有发现的子域名和 IP 已完成解析、端口扫描和服务指纹识别,重新枚举无新资产出现。
- 每个暴露服务已完成分诊并移交至对应 playbook(Web、API、内网)或记录为信息性发现。
- 剩余工作需要认证、漏洞利用或扩大范围。
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