x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/reverse-engineering/tools/rabin2.md
View on GitHub# rabin2 (radare2)
- **Category**: Reverse Engineering / Binary Metadata Extraction
- **Risk Level**: 🟡 Medium
---
## 描述
radare2 框架中的一个独立 CLI 工具,用于从二进制文件中提取元数据、安全特性、导入表、导出表、字符串和节区信息。无需进入 radare2 交互式 shell,即可快速完成一次性二进制分析。
## 安装
```bash
apt install radare2
```
## 参数说明
| 参数 | 说明 |
|-----------|-------------|
| `-I` | 二进制信息——架构、位数、canary、pic、nx、加密、剥离状态 |
| `-i` | 列出导入项(从外部库调用的函数) |
| `-E` | 列出导出项(二进制文件提供的函数) |
| `-s` | 列出符号 |
| `-z` | 列出数据节区中发现的字符串 |
| `-S` | 列出带有权限和大小的节区 |
| `-l` | 列出链接的库 |
| `-R` | 列出重定位 |
| `-qq` | 安静模式——仅输出值(用于脚本处理) |
| `-j` | JSON 输出(用于机器解析) |
## 常用命令
```bash
# 快速安全分诊(canary、pic、nx 检查)
rabin2 -I /usr/bin/target
# 脚本化:提取关键安全特性
rabin2 -I -j /usr/bin/target | jq '{arch: .arch, canary: .canary, pic: .pic, nx: .nx, relro: .relro, stripped: .stripped}'
# 列出导入的函数(查找危险调用)
rabin2 -i /usr/bin/target | grep -iE "system|exec|popen|strcpy"
# 列出链接的库
rabin2 -l /usr/bin/target
# 提取字符串
rabin2 -z /usr/bin/target | head -30
# 检查系统上所有 SUID 二进制文件
find / -perm -4000 -type f 2>/dev/null | while read f; do echo "=== $f ===" && rabin2 -I "$f" 2>/dev/null; done
```
## 注意事项
1. `rabin2 -I` 是获取二进制文件完整安全快照的最快方式——它在一个命令中报告 canary、pic、nx 和 relro 状态。
2. `radare2` 还提供了交互式逆向工程 shell(`r2 /bin/target`),不在本工具范围内;仅使用 `rabin2` 和 `r2 -q -c` 一次执行命令。
3. 对于剥离后的二进制文件,`rabin2 -I` 报告 `stripped: true`——预期 `-s` 或 `-i` 不会返回符号信息。
4. JSON 输出(`-j`)是 Agent 消费的首选格式——通过管道传入 `jq` 进行过滤。
---
## 官方参考
- [radare2 GitHub](https://github.com/radareorg/radare2)
- [rabin2 Manual](https://book.rada.re/tools/rabin2/intro.html)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |