wooyun常见domxss总结
前言
wooyun有很多旧时代知识沉淀,需要多看看,才能更好地迈向新时代。其中反射和存储太常见了,详情可以看我之前的XSS专栏之常见xss总结备忘
本文章属于备忘系列,后期会不断加新东西。
1.1 innerHTML
<div id="XXX">???</div>
<script>
var a=getParam("test"); //获取地址栏里的test参数
document.getElementById("XXX").innerHTML=a;
</script>
1.2 document.write
document.write("xxxxxxxxxxxx");
1.3 jQuery
$("#y").html("xxxxxxx");
1.4 flash-navigateToURL
navigateToURL(new URLRequest(link), "_self");
1.5 getURL
getURL(link,"_self");
1.6 ExternalInterface.call1
func可控
ExternalInterface.call(func,"参数1");
主要是栈到这一步
try { __flash__toXML(SWFUpload.instances[func"].flashReady("参数1")) ; } catch (e) { "<undefined/>"; }
1.7 ExternalInterface.call2
参数1可控
ExternalInterface.call(func,"参数1");
主要是栈到这一步
try { __flash__toXML(函数名("参数1")) ; } catch (e) { "<undefined/>"; }
1.8在线payload查询
1.9 document.location.hash
var L = document.location.hash.substring(1);
...
L拼接输出