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

 

 


Tema destacado: Estamos en la red social de Mastodon


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking Wireless
| | |-+  Bypass portal cautivo o algun bug
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] 2 Ir Abajo Respuesta Imprimir
Autor Tema: Bypass portal cautivo o algun bug  (Leído 13,823 veces)
chanopineiro2

Desconectado Desconectado

Mensajes: 3


Ver Perfil
Bypass portal cautivo o algun bug
« en: 24 Febrero 2013, 14:18 pm »

Hola, soy nuevo por aqui y queria ver si alguien me puede echar una mano.
Tengo una wifi abierta que cuando te conectas te asigna una ip del rango 10.240.1.0 y al abrir el navegador te lleva a un portal cautivo (captive portal) en la ip 10.240.1.253 donde te pide usuario y pass. Como es obvio ya probé sin resultado varios logins.
La pregunta es si habrá algun modo de saltarse el portal cautivo o de encontrar algun bug o intentar explotar, no se si con sql injection otro tipo de exploits.
Revisando el codigo fuente de la pagina de login:

Código
  1. <!-- ret_code:0 -->
  2.  
  3. <html>
  4. <head>
  5. <title>Captive Portal</title>
  6. <link rel="stylesheet" type="text/css" href="portal.css">
  7.  
  8. <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
  9. <meta HTTP-EQUIV="Expires" CONTENT="-1">
  10. <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  11. </head>
  12. <body style="width: 100%; height: 100%; text-align:center; ">
  13. <form method="post" action="authUser.php">
  14. <!-- hidden variables -->
  15. <input type="hidden" name="wlan" value="3">
  16. <input type="hidden" name="cp_type" value="5">
  17. <input type="hidden" name="hFromPage" id="hFromPage" value="login.php">
  18. <input type="hidden" name="hURL" id="hURL" value="127.0.0.1">
  19. <input type="hidden" name="hToken" id="hToken" value="BPd8x6_Iz1EQyZMKhAVh1Q!!">
  20. <input type="hidden" name="dest" id="dest" value="www.google.es/">
  21. <input type="hidden" name="useIndex" id="useIndex" value="0">
  22. <!-- end of hidden variables -->
  23.  
  24. <!-- panel -->
  25. <div style="position:relative; width: 800px; margin: 0px auto; ">
  26. <div style="width:790px;height:550px;text-align:left; margin: 0px auto; ">
  27.  
  28. <div style="text-align:center;margin-bottom: 5px;top:100px;left:0px;width:790px;overflow: hidden; position:absolute;display:none;"></div>
  29. <div id="" style="top:150px;left:0px;width:790px;height:100px;z-index:1000;overflow: hidden; position:absolute;">
  30. <table width="100%" align="center">
  31. <tr><td width="50%" align="right" style="font-weight:bold;"><span id="loginLabel" style="">Login:</span></td>
  32. <td><input id="uName" name="uName" type="text" size="20" maxlength="255"></td>
  33. <td width="50%"></td>
  34. </tr>
  35.  
  36.  
  37. <tr><td align="right" style="font-weight:bold;"><span id="passwordLabel">Password:</span></td>
  38. <td><input id="uPwd" name="uPwd" type="password" size="20" maxlength="255"></td>
  39. <td></td>
  40. </tr>
  41.  
  42.  
  43. <tr><td></td>
  44. <td align="center"><input name="subBtn" id="subBtn" type="submit" value="Submit" onclick="return goLogin();"></td>
  45. <td></td>
  46. </tr>
  47.  
  48. </table>
  49. </div>
  50.  
  51.  
  52. </div>
  53. </div>
  54. <!-- end of panel -->
  55.  
  56. <!-- client scripts -->
  57. <script language="javascript">
  58. window.onload = function()
  59. {
  60. if(document.getElementById("uName") && document.getElementById("uName").style.display=="") {
  61.   document.getElementById("uName").focus();
  62. } else if(document.getElementById("subBtn")&& document.getElementById("subBtn").style.display=="") {
  63.   document.getElementById("subBtn").focus();
  64. }
  65.  
  66. }
  67.  
  68. /* ======================================================================== */
  69. function goLogin()
  70. {
  71. var userInput = document.getElementById("uName");
  72. if(userInput && userInput.style.display=="" && userInput.value=="") {
  73.   var userLabel = document.getElementById("loginLabel") ? document.getElementById("loginLabel").innerHTML : "User";
  74.   alert(userLabel+ " is required");
  75.   return false;
  76. }
  77. if(document.getElementById("subBtn") && document.getElementById("subBtn").style.display=="") {
  78.   document.getElementById("subBtn").style.cursor = "wait";
  79.   document.getElementById("subBtn").disabled = true;
  80. }
  81.        document.forms[0].submit();
  82. }
  83.  
  84. /* ======================================================================== */
  85. function popURL(strURL)
  86. {
  87. window.name = "firstChantryPortalPage";
  88. var strFeat = "height=300,width=300,top=150,left=250,resizable=no,scrollbars=no,menubar=no,toolbar=no,location=no,status=no";
  89. window.location.href = strURL;
  90. var newPopWin = window.open("popLogin.php?ow=firstChantryPortalPage","ChantryPopupLogin",strFeat);
  91. newPopWin.focus();
  92. }
  93.  
  94. </script>
  95.  
  96. </form>
  97.  
  98. </body>
  99. </html>
  100.  
  101.  
  102.  
  103.  


Me encuentro con authUser.php que accedo a el mediante 10.240.1.253/authUser.php me lleva a otra pagina que me dice Portal central y puedo ver mi tiempo en la pagina y me dice que no hay limite de tiempo para mi sesion, sin embargo no consigo navegar.
Os dejo el codigo fuente de authUser.php por si a alguien le dice algo mas, de donde conseguir una BBDD de usuarios/pass o algo por el estilo.


Código
  1. <html>
  2. <head>
  3. <title>Captive Portal</title>
  4.  
  5. <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
  6. <meta HTTP-EQUIV="Expires" CONTENT="-1">
  7. <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  8. </head>
  9. <body style="width: 100%; height: 100%; text-align:center; ">
  10. <div style="position:relative; width: 800px; margin: 0px auto; ">
  11. <form  id="indexForm" name="indexForm" method="post" action="index.php">
  12. <input type="hidden" name="wlan" value="0">
  13. <input type="hidden" name="dest" value="">
  14. <input type="hidden" name="act" value="">
  15.  
  16. <div style="width:790px;height:550px; text-align:left; margin: 0px auto;">
  17.  
  18. <div style=";top:45px;left:10px;width:130px;height:30px;overflow: hidden; position:absolute;"><font style='font-size: 12pt; font-weight: bold;'>Portal Central</font></div>
  19. <div style=";top:100px;left:150px;width:130px;height:25px;overflow: hidden; position:absolute; "><input type='button' onclick='submitForm("logoff")' value='Logoff session' style='width:130;height:25; ' ></div>
  20.  
  21. <div style="text-align:left;top:130px;left:150px;width:600px;height:50px;overflow: hidden; position:absolute;"></div>
  22. <div style=";top:185px;left:150px;width:130px;height:25px;overflow: hidden; position:absolute; "><input type='button' onclick='submitForm("status")' value='Get current status' style='width:130;height:25; ' ></div>
  23.  
  24. <div style="text-align:left;top:230px;left:150px;width:600px;height:50px;overflow: hidden; position:absolute;"></div>
  25. <div style=";top:310px;left:150px;width:600px;height:45px;overflow: hidden; position:absolute;">Warning: If you have javascript enabled and your popup blocker turned off then leaving, reloading or closing this window will log you off automatically.<BR><HR align=left SIZE=1 width='100%'></div>
  26. <div style=";top:400px;left:150px;width:170px;height:22px;overflow: hidden; position:absolute;">Click URL for Site:</div>
  27. <div style="text-align:left;top:400px;left:324px;width:428px;height:22px;display:inline;position:absolute;"><a href='http://' target='_blank'></a></div>
  28.  
  29. </div>
  30.  
  31. </form>
  32. <!-- client scripts -->
  33. <script language="javascript" type="text/javascript"><!--
  34. var intent = false;
  35. function unload(ret)
  36. {
  37.  if (!intent) {
  38.     alert("If your popup blocker is disabled (or is not installed) you will be logged out when you press OK");
  39.     w=window.open('auto_logoff.php','','width=300,height=200,scrollbars,resizable=yes');
  40.     if(!w) {
  41. var m='We were unable to log you off. This may have been caused by a popup blocker.';
  42. if(ret) return m+' Please click Cancel and then click the Logout button.';
  43. alert(m+' Your session will terminate when it times out.'); // if not firefox/mozilla/netscape or IE
  44.     }
  45.  }
  46. }
  47.  
  48. window.onbeforeunload = function() {
  49. return unload(1); // IE
  50. }
  51.  
  52. function submitForm(action) {
  53. var form = document.getElementById("indexForm");
  54. if(form) {
  55. intent=true;
  56. form.act.value = action;
  57. form.submit();
  58. }
  59. }
  60. //-->
  61. </script>
  62. </div>
  63. </body>
  64.  
  65. </html>
  66.  
  67.  


Tenia pensado subir unas imagenes para que os hicierais a la idea de la presentacion que tiene, pero no se como se suben imagenes.

Un saludo.


En línea

m0rf


Desconectado Desconectado

Mensajes: 828


BACK!


Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #1 en: 24 Febrero 2013, 15:29 pm »

Aqui no hay codigo php, authUser.php genera este código html/js, pero no quiere decir que se el código del script php.

authUser.php esta de lado del servidor no creo que puedas conseguirlo a menos que entres al servidor o te descargues el programa original.

He hecho una pequeña busqueda y encontre 2 softwares que utilizan esa función y son para crear portales cautivos, si te aburres bajatelos y mira si generan el mismo html o lo que tengas que mirar en  authUser.php.

Suerte.


En línea

Si todos fuéramos igual de inteligentes no existiría la mediocridad porque no podríamos apreciarla. Aprecias la mediocridad?
zydas


Desconectado Desconectado

Mensajes: 1.805


I´m guilty


Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #2 en: 24 Febrero 2013, 17:45 pm »

Vaya.... un hotspot.

http://foro.elhacker.net/empty-t127534.0.html

Saludos
En línea

chanopineiro2

Desconectado Desconectado

Mensajes: 3


Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #3 en: 24 Febrero 2013, 22:19 pm »

saber el nombre del software que usar ese php a ver si me sirvieran de algo.
Por cierto, no sabeis otra manera de poder hacer un bypass o algo similar.
A mi lo que se me ocurria era hacer un Man In The Middle, lo que pasa es que usa https y no se si dara resultado, o montarme un portal y esperar a que alguien se loguee contra mi portal.

Saludos
En línea

kensu_90

Desconectado Desconectado

Mensajes: 14



Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #4 en: 21 Julio 2013, 00:24 am »

Si estas en windows usa wireshark, primero te conectas a la red , luego captura trafico ,te fijas en los paquetes http que vayan a la direccion ip de la AP y si tienes suerte conseguiras un user y pass de algun cliente, otra opcion es usar cain y abel que se trata casi lo mismo,conectarse a la red luego usar ARP, ir a la pestaña paswords-http y esperar hasta conseguir algun user y pass.
En línea

Hiper@ctive

Desconectado Desconectado

Mensajes: 96


Las Cosas Más Simples Son La Base Del Conocimiento


Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #5 en: 21 Julio 2013, 00:49 am »

Si estas en windows usa wireshark, primero te conectas a la red , luego captura trafico ,te fijas en los paquetes http que vayan a la direccion ip de la AP y si tienes suerte conseguiras un user y pass de algun cliente, otra opcion es usar cain y abel que se trata casi lo mismo,conectarse a la red luego usar ARP, ir a la pestaña paswords-http y esperar hasta conseguir algun user y pass.


No creo que funcione por que "chanopineiro2" dijo que la conexion usa Https, y eso es como intentar sniffar contraseñas de facebook o gmail.

PD: No son tan tontos como para intercambiar claves y usuarios en texto plano.

Un saludo.
En línea

kensu_90

Desconectado Desconectado

Mensajes: 14



Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #6 en: 22 Julio 2013, 03:03 am »

no se como subir imagenes para que veas ,pero inténtenlo a mi me funciono en el easy captive, y si es cierto en algunos portales cautivos consigues el usuario pero en algunos la contraseña esta cifrada y no se como usar el cracker de cain y abel
En línea

Hiper@ctive

Desconectado Desconectado

Mensajes: 96


Las Cosas Más Simples Son La Base Del Conocimiento


Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #7 en: 22 Julio 2013, 04:39 am »

no se como subir imagenes para que veas ,pero inténtenlo a mi me funciono en el easy captive, y si es cierto en algunos portales cautivos consigues el usuario pero en algunos la contraseña esta cifrada y no se como usar el cracker de cain y abel

Y el portal cautivo que tu esnifaste que tipo de conexion utiliza http o https?

Algunos estan implementados en http pero en este caso como en los de mikrotik la contraseña esta cifrada mediante el uso de un codigo javascript incrustado en el html.

PD: En todo caso si esnifar la red no funciona, tenemos la segunda opcion que es el MAC Spoofing >:D.

Saludos.
En línea

kensu_90

Desconectado Desconectado

Mensajes: 14



Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #8 en: 23 Julio 2013, 14:23 pm »

creo que es http y el portal cautivo es el EASY CAPTIVE y tengo por ahi otra captura que a pesar de clonar MAC , IP,ya no me deja conectar , por que nisiquiera aparece ya la red.
En línea

Hiper@ctive

Desconectado Desconectado

Mensajes: 96


Las Cosas Más Simples Son La Base Del Conocimiento


Ver Perfil
Re: Bypass portal cautivo o algun bug
« Respuesta #9 en: 26 Julio 2013, 04:16 am »

Citar
tengo por ahi otra captura que a pesar de clonar MAC , IP,ya no me deja conectar , por que nisiquiera aparece ya la red.

Explica mejor el por que no te deja conectar.
En línea

Páginas: [1] 2 Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Router con portal cautivo (easy captive)
Hacking Wireless
gian10000 7 14,046 Último mensaje 30 Abril 2010, 20:40 pm
por mirageiii
Montar portal cautivo o hotspot
Redes
broña 3 20,159 Último mensaje 16 Diciembre 2010, 00:43 am
por madpitbull_99
Ayuda Portal cautivo con Firstspot
Software
erikcatala 0 1,779 Último mensaje 15 Noviembre 2012, 01:05 am
por erikcatala
Portal Cautivo
GNU/Linux
Antoniolioli 3 5,104 Último mensaje 14 Junio 2021, 18:29 pm
por MCKSys Argentina
Portal Cautivo
Wireless en Windows
Megaraptor 5 7,572 Último mensaje 10 Septiembre 2014, 03:22 am
por simorg
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines