Command injection rce

From vigolium/vigolium · View interactive version

Command injection rce is an AI agent skill from the GitHub repository vigolium/vigolium. 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 payload

How to use this skill

Skill file

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

target= (traceroute), file= (image conversion, PDF render,

zip/tar), filter=, format= (ffmpeg, imagemagick), name= on a

user-management endpoint that shells out.

;, |, &, &&, ||, ` `, $(...), \n`.

ffmpeg, ImageMagick, node, python, php) in the stack

trace or response body.

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:

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:

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":

to survive DNS encoding; expect truncation).

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:

always critical regardless of what you leaked.

injection in /api/render filter parameter; OAST callback + reads

/etc/passwd"`.

metacharacter, the OAST callback timestamp, and one masked line of

the follow-on demo (e.g., "first /etc/passwd line: root:x:0:0:...").

Pitfalls

proof — networking jitter and shared rate limiters cause similar

delays. Require an OAST callback before claiming RCE.

may be all you get. Note that explicitly in the finding.

injection via filenames or annotation fields — these surfaces are

less obvious than cmd=; check filenames.

--config=/etc/passwd against a tool that reads --config files.

Still report as CWE-77 / CWE-78 if it leaks data.

before reporting — sometimes the payload encoding garbled the data

in transit and what you have is just truncated noise, not proof.

Output expectations

one masked line of leaked data.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.