简介恶意攻击者通过某些特定的手段,将本应该返回给用户的JSON数据进行拦截,转而将数据发送回给恶意攻击者。一般来说进行劫持的JSON数据都是包含敏感信息或者有价值的数据。分类属于CSRF漏洞。JSON劫持原理条件受攻击的网站URL返回一个JSON对象或者数组。受攻击的网站能够通过GET请求返回JSON数据(最方便),POST也行不过需要钓鱼诱导。受害人的浏览器没有禁用javascript。受害人浏览了钓鱼/恶意网站,并且受害人在受攻击的网站中,保存在COOKIE中的身份验证信息尚未清除。受攻击的站点没有做相关的防御措施。分类主要有两类:JSON劫持:主流浏览器有一定的防护、构造方法较为麻烦。JSONP劫持:JSONP是一种非官方的JSON劫持场景攻击手法这个劫持的原理是利用了<script>标签会自动执行js代码的原理,从而调用页面内嵌的恶意函数,将数据发送至攻击者的服务器。从而导致信息泄露。但是现在主流的浏览器都对这种类型的JSON劫持进行了一定的防御,未能成功复现,故可能无效。场景:服务端(http://A.xx/getjson)header('Content-type
Equinox
一个乐于分享的网安人