Say someone has managed to get into my server andSuppose I have found the (web based) appfollowing code: in a PHP web application.
$encrypt ? $password = generatePassword($passwordstrength): $password="";
$estring = "7z a -p$password -mx0 packFoo.aes.7z mydir/foo";
if($encrypt) {
    exec($estring);
}
mailuser($password);//uses standard PHP mail function
The password is dynamically generated, a-zA-Z0-9 etc from at random by a function with usingthat uses PHP rand. Is there any trace of the exec() string on the server?.
It'sI have not found the password in /var/logs and not in .bash_history.
I'm aware that someone can also:
- brute force the file
- find the email address from the database the email was sent to, send phishing email and get access to their account and search their mailbox for the email with the password.)
I need to know if thisthe value of $password string can be recovered iffrom the server was compromised. Ultimately can I claimin the $password is not stored onevent that the server? is compromised. Ultimately, can I claim that the value of $password is not stored on the server?
 
                