PT-2012-28: Administrator Privilege Gaining in DataLife Engine

Vulnerable software

DataLife Engine
Version: 9.6 and earlier

Application link:

Severity level

Severity level: High
Impact: Administrator privilege gaining
Access Vector: Remote  

CVSS v2:
Base Score: 9.0
Vector: (AV:N/AC:L/Au:S/C:C/I:C/A:C)

CVE: not assigned

Software description

DataLife Engine is a website management system.

Vulnerability description

Positive Research Center experts detected a vulnerability that exists as confirmation code (that is used to reset passwords for all accounts including administrator account) and new generated passwords are predictable.

Vulnerable code: engine/modules/lostpassword.php

$salt = "abchefghjkmnpqrstuvwxyz0123456789";
srand( ( double ) microtime() * 1000000 );

for($i = 0; $i < 15; $i ++) {
$rand_lost .= $salt{rand( 0, 33 )};

$lostid = sha1( md5( $lostname . $lostmail ) . time() . $rand_lost );


Vulnerable code: engine/modules/pm.php

$salt = "abchefghjkmnpqrstuvwxyz";
$random_key = "";

for($i = 0; $i < 8; $i ++) {
$random_key .= $salt{rand( 0, 23 )};

You need to know administrator login if you want to reset its password. An attacker can easily check if the login or email exists, if he tries to register with the login or email. The vulnerability is exploitable, as  DataLife Engine shows the results of rand function call that allows an attacker to get srand SEED, and then use it to predict all random numbers, including numbers used for password reset tokens and password  generating. Also, this code provides only 2^15 possible values of generated tokens in Windows. The attacker has to send 2 keep-alive requests to implement the attack. The first request allows the attacker to get SHA hash of the random value, the second one is used to call for the page that recovers administrator's password with predicted token. This allows the attacker to get confirmation code and change the password. The following data is necessary: administrator ID (it is always 1), email and login (in most case, and admin).

How to fix

Update your software up to the latest version.

Advisory status

17.08.2012 - Vendor is notified
17.08.2012 - Vendor gets vulnerability details
12.09.2012 - Vendor releases fixed version and details
04.02.2013 - Public disclosure


The vulnerability has discovered by Timur Yunusov, Arseny Reutov, Positive Research Center (Positive Technologies Company)


Reports on the vulnerabilities previously discovered by Positive Research: