前言

不知道是啥比赛,稀里糊涂的就打了

然后发现里面的题型好多是逆向

就把逆向都给做了

(都做了也晋级不了,工控题,不会工控打个锤子 =。=)

baby_go - go/base32

go语言写的

Base32变表加密

img

img

base32变表

密文

N2XHD244PSVED53BHG2W7ZSVNK5W7ZSVPOTUHNU

table

AC-Z2-7B=

img

flag{th1s_1s_b4by_b4se32}

签到题

简单加密

xor + add

img

密文

img

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
a = [0x87, 0x8C, 0x80, 0x8B, 0x98, 0x57, 0x83, 0x54, 0x8D, 0x5D, 0x5B, 0x58, 0x55, 0x55, 0x59, 0x8D, 

0x93, 0x42, 0x90, 0x47, 0x41, 0x96, 0x4C, 0x4F, 0x4D, 0x4C, 0x9F, 0x41, 0x4D, 0x44, 0x4F, 0x81]

flag = ''

for i in range(32):

a[i] = (a[i] ^ i) -33

flag += chr(a[i])

print(flag)



flag{1d2d302876ab2a34b9744d9080}

ez_crypto - 动调RC4

正常RC4 动调

密文

923117B560C8486423FA0ABBC53493ECB9616C5D899BA01B47E267BBC7CBD8FE1C67BF98E2EE

密钥

sierting

img

动调出密文跟密钥

密文

img

密钥

img

img

flag{6cd72bd931a381ddca4e810224bd6d06}

ez_equation - pycdas/z3

看pydas 取出字节码

然后z3求解器.

flag{Th1s_1s_4n_funny_ch4llenge_lollllll~}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from natsort import natsorted
from z3 import *

llst = [[154, 209, 184, 205, 152, 173, 85], [219, 163, 159, 245, 245, 245, 3], [244, 244, 153, 245, 164, 191, 126], [136, 241, 132, 245, 188, 173, 93],
[197, 198, 139, 207, 190, 181, 31], [167, 206, 128, 197, 183, 183, 76], [157, 223, 145, 198, 180, 165, 87]]

m = [BitVec('s1_%d' % i, 8) for i in range(42)] # 有时得用int值好使
pad = [BitVec('o_%d' % i, 8) for i in range(8)] # 有时得用int值好使
solver = Solver()
solver.add(m[0] == ord('f'))
solver.add(m[1] == ord('l'))
solver.add(m[2] == ord('a'))
solver.add(m[3] == ord('g'))
solver.add(m[4] == ord('{'))
solver.add(m[41] == ord('}'))

for i,tp in enumerate(llst):
solver.add(m[i*6 + 0] ^ m[i*6 + 1] ^ m[i*6 + 2] ^ pad[0] == tp[0])
solver.add(m[i*6 + 3] ^ m[i*6 + 4] ^ pad[1] ^ pad[2] == tp[1])
solver.add(pad[5] ^ m[i*6 + 5] ^ pad[1] ^ pad[3] == tp[2])
solver.add(m[i*6 + 3] ^ pad[3] ^ pad[4] ^ pad[1] == tp[3])
solver.add(m[i*6 + 5] ^ pad[0] ^ m[i*6 + 4] ^ pad[1] == tp[4])
solver.add(m[i*6 + 2] ^ m[i*6 + 4] ^ pad[0] ^ pad[1] == tp[5])
solver.add(m[i*6 + 2] ^ m[i*6 + 0] ^ m[i*6 + 4] ^ pad[4] == tp[6])
print(solver.check())
res = solver.model()

# lst = natsorted([(k, res[k]) for k in res], key=lambda x: x)
lst = natsorted([(k, res[k]) for k in res], lambda x: str(x[0]))
for k, v in lst:
print(chr(v.as_long()), end='')