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/rfid-nfc.md

View on GitHub
# RFID/NFC 与硬件访问 Playbook

用于授权的 RFID/NFC、Proxmark3、PC/SC 智能卡、令牌、物理凭据、嵌入式设备或 USB 安全评估。

## 输入

- 授权的卡片/令牌类型、读卡器硬件、物理位置和保管规则。
- 允许动作:识别、读取、转储、密钥测试、模拟、克隆、写入或 APDU 测试。
- 写操作、破坏性测试和凭据处理的安全限制。
- 范围澄清:是否包含固件提取、嵌入式设备测试或 USB 评估。

## 环境

- 使用可直接访问 USB 读卡器的物理 Kali 主机或虚拟机。
- 除非读卡器已完成透传并验证,否则不要使用 Docker。
- 默认只执行只读操作,直到明确确认进一步授权。

## 流程

1. **读卡器和卡片清单**
   - 识别读卡器、卡片类型、UID/ATR、频率和协议。
   - 根据硬件使用 `proxmark3`、`libnfc` 工具、`opensc-tool` 或 `pkcs15-tool`。

   (RFID/NFC 工具选择参见 `../rfid-nfc/README.md`。)

2. **只读采集**
   - 收集公开元数据、证书、ATR、标签类型和获批转储。
   - 保存原始转储和命令日志,并记录保管链说明。

3. **卡片类型识别和策略**
   - 清单完成后,确定卡片类型并选择对应的测试策略:
     - **MIFARE Classic** — 用 `proxmark3 hf mf chk` 测试默认密钥,如授权则进行 `darkside` 或 `nested` 攻击。
     - **HID iCLASS** — 用 `proxmark3 hf iclass` 进行标准密钥测试。
     - **DESFire/EV1** — 仅限只读枚举;加密机制在未授权情况下阻止密钥恢复。
     - **EM4100/T5577 (LF)** — 用 `proxmark3 lf search` 进行识别,如授权则进行克隆评估。
   - 使用以下决策树选择后续步骤:
     1. 卡片已识别?如否,用 `proxmark3 auto` 或 `nfc-list` 重试。

   ```bash
   nfc-list                              # 列出 NFC 设备和附近标签
   ```
     2. 找到默认密钥?如是,进行完整读取。如否,评估密钥恢复攻击是否在范围内。
     3. 授权写入/克隆?如是,进入阶段 6。如否,止步于只读结果。

   ```bash
   # 自动识别卡片类型
   pm3 -- auto
   # LF 卡片搜索
   pm3 -- lf search
   # MIFARE Classic 默认密钥检查
   pm3 -- hf mf chk --1k -f /usr/share/proxmark3/dictionaries/mfc_default_keys.dic
   # MIFARE Classic darkside 攻击(未找到默认密钥时,需要授权)
   pm3 -- hf mf darkside
   # MIFARE Classic nested 攻击(需要至少一个已知密钥)
   pm3 -- hf mf nested --1k --blk 0 -a -k <known-key>
   # HID iCLASS 标准密钥测试
   pm3 -- hf iclass dump --ki 0
   # DESFire 枚举(只读)
   pm3 -- hf mfdes info
   ```

4. **受控测试**
   - 仅在明确授权时运行密钥检查、MIFARE 测试、APDU 脚本、模拟、克隆或写入。
   - 出现卡片错误、异常状态变化或读卡器不稳定时立即停止。

   **逐卡类型密钥覆盖:** 对第 2 阶段识别的每种卡类型都测试默认密钥,而不仅仅是找到的第一张卡。对于 MIFARE Classic,对所有扇区运行完整的默认密钥字典(不仅仅是扇区 0)。如果授权了 darkside 或 nested 攻击,对每张默认密钥检查失败的卡片都尝试这些攻击。
   - Proxmark3 密钥测试和模拟(仅限授权范围):

   ```bash
   # MIFARE Classic——测试默认密钥
   pm3 -- hf mf chk --1k -f /usr/share/proxmark3/dictionaries/mfc_default_keys.dic
   # MIFARE Classic——使用已知密钥完整读取
   pm3 -- hf mf dump --1k
   # 模拟已保存的卡片转储
   pm3 -- hf mf sim --1k -u <UID>
   ```

   - 使用 `opensc-tool` 或 `pcsc_scan` 进行 PC/SC APDU 脚本交互:

   ```bash
   pcsc_scan                             # 枚举已连接的智能卡
   opensc-tool --send-apdu 00A4040000   # 发送原始 APDU(SELECT)
   ```

   使用 `scriptor` 与智能卡进行交互式 APDU 命令交换(见 `../rfid-nfc/tools/scriptor.md`)。

   - 使用 `pkcs15-tool` 枚举智能卡证书和密钥:

   ```bash
   pkcs15-tool --list-certificates
   pkcs15-tool --list-keys
   ```

5. **证据处理**
   - 将转储、密钥、证书和标识符视为敏感数据。
   - 报告中明确说明数据是只读获取、派生、克隆还是写入的。

6. **重放和克隆评估**(如明确授权写入/克隆操作)
   - 测试捕获的卡片数据是否可以重放或克隆到空白卡片。
   - 记录门禁系统是否检测到重复卡片使用。
   - 此阶段展示物理安全的实际影响。

   ```bash
   # 将 MIFARE Classic 转储克隆到空白卡片(需要写入授权)
   pm3 -- hf mf restore --1k
   # 将 LF EM4100 ID 克隆到 T5577 卡片
   pm3 -- lf em 410x clone --id <card-id>
   # 对门禁系统测试克隆卡片并记录结果
   ```

   风险关卡:如果门禁系统在检测到重复卡片使用时触发警报,立即停止。将检测能力记录为正面安全发现。

7. **固件和嵌入式设备测试**
   - 仅在范围内且明确授权物理设备访问时执行。
   - 识别设备电路板上的 UART、JTAG 和 SPI 接口。
   - 提取固件用于离线分析。
   - 注意:这需要对设备电路板的物理访问权限和明确授权。

   ```bash
   # 识别 UART/JTAG/SPI 引脚(手动硬件步骤,然后连接)
   # 使用 flashrom 提取固件(SPI flash)
   flashrom -p linux_spi:dev=/dev/spidev0.0 -r firmware_dump.bin
   # 使用 binwalk 提取/分析固件
   binwalk -e firmware_dump.bin
   # 搜索硬编码凭据和证书
   strings firmware_dump.bin | grep -iE 'password|passwd|secret|key|cert'
   binwalk --signature firmware_dump.bin
   ```

   风险关卡:除非明确授权进行破坏性测试,否则不要写入 flash 或修改固件。

8. **USB/HID 安全评估**
   - 仅在范围内执行。记录 USB 端口访问控制。
   - 测试目标系统是否限制 USB 大容量存储。
   - 测试 USB HID 设备是否被过滤或阻止。
   - 注意:实际的 BadUSB payload 测试需要当前工具清单中没有的专用工具。此阶段仅覆盖评估和文档记录。

   ```bash
   # 检查 USB 设备枚举
   lsusb
   # 检查 dmesg 中的 USB 设备连接事件
   dmesg | tail -20
   # 记录 USB 策略(观察大容量存储是否自动挂载)
   ```

   风险关卡:未经明确授权和专用工具,不要部署 USB 攻击 payload。

## 交叉引用

- `wireless-assessment.md` — 蓝牙近距离估算,用于物理访问关联。
- `reporting-workflow.md` — 证据打包和报告生成。

## 预期产物

- 读卡器型号、卡片/令牌标识符、协议、频率和 ATR/UID 数据。
- 卡片类型分类和适用攻击策略文档。
- 命令日志、获批转储、哈希和证书元数据。
- 重放/克隆测试结果和门禁检测评估(如已授权)。
- 固件分析发现:硬编码凭据、证书、有价值的字符串(如在范围内)。
- USB 安全态势记录(如在范围内)。
- 明确记录已执行或未执行的读取/写入/克隆/模拟操作。

## 停止条件

- 授权的卡片/令牌已按批准深度识别和测试。
- 卡片类型策略已评估并记录。
- 后续测试需要写入、克隆、模拟、破坏性 APDU 或处理超范围凭据。
- 固件或 USB 测试已完成或不在范围内。
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