Python - XSS-Attribute

参考资料:https://owasp-skf.gitbook.io/asvs-write-ups/cross-site-scripting-attribute-xss-attribute/kbid-3-cross-site-scripting-attribute

靶场环境

$ sudo docker pull blabla1337/owasp-skf-lab:xss-attribute
$ sudo docker run -ti -p 127.0.0.1:5000:5000 blabla1337/owasp-skf-lab:xss-attribute

XSS

什么也不输入,抓包看看

想要下面的那句话变红,输入red

抓包

<center> <p style="font-size:2em;"> 

<div data-gb-custom-block data-tag="autoescape" data-0='false'><span style='color:{{xss}};' > Let me be a new color!</span></div>

</p></center>

查看源码可知,输入的内容是不会被转义的(详见Python-XSS
指南中给出的payload是:red ' onmouseover='alert(1337)'

当鼠标停留在段落上就会触发xss

payload中的属性应该能换成其他的,了解几个就行,毕竟只是需要验证此处存在xss即可

posted @ 2023-01-23 20:45  smile_2233  阅读(20)  评论(0编辑  收藏  举报