DDCTF2018 MISC writeup

Author Avatar
kabeor 5月 03, 2018

DDCTF2018 MISC writeup

1.签到题

2.(╯°□°)╯︵ ┻━┻

给了一段编码

d4e8e1f4a0f7e1f3a0e6e1f3f4a1a0d4e8e5a0e6ece1e7a0e9f3baa0c4c4c3d4c6fbb9b2b2e1e2b9b9b7b4e1b4b7e3e4b3b2b2e3e6b4b3e2b5b0b6b1b0e6e1e5e1b5fd

可以看到这串字符只有数字和字母a-f,所以猜测应该是16进制。可以用异或的条件来判断一下,如果与ascii码异或以后得到的是正确的字符的话,异或的结果将不会是乱码。

思路感觉还是靠经验吧,各种各样的方法,不过总体来说是用移位爆破出来的

下面是两种解题脚本

s="d4 e8 e1 f4 a0 f7 e1 f3 a0 e6 e1 f3 f4 a1 a0 d4 e8 e5 a0 e6 ec e1 e7 a0 e9 f3 ba a0 c4 c4 c3 d4 c6 fb b7 b9 b8 e4 b5 b5 e4 e2 b7 b6 b5 b5 b2 e1 b9 b2 b2 e4 b0 b0 e4 b7 b7 b5 e5 b3 b3 b1 b1 b9 b0 b7 fd"
s=s.split()
for key in range(0,128+1,1):
for i in s:
i = int(i,16)
print (chr((i + key + 256) % 256 ), end = '')
print (key)

data=bytearray.fromhex('d4e8e1f4a0f7e1f3a0e6e1f3f4a1a0d4e8e5a0e6ece1e7a0e9f3baa0c4c4c3d4c6fbb9e1e6b3e3b9e4b3b7b7e2b6b1e4b2b6b9e2b1b1b3b3b7e6b3b3b0e3b9b3b5e6fd')
flag = ''
for i in data:
flag = flag + chr(i & 0x7f)
print flag

最后得出flag

That was fast! The flag is: DDCTF{798d55db76552a922d00d775e3311907}

##

待补充

From https://kabeor.github.io/DDCTF2018 MISC writeup/ bye

This blog is under a CC BY-NC-SA 4.0 Unported License
本文链接:https://kabeor.github.io/DDCTF2018 MISC writeup/