复现一下2022 TheCyberGrabs

Reverse

No Strings

直接用ida64打开

跟进main函数

看到这边就是flag,放在python里面试了一下,就是flag了

1
2
3
lis =  ['4','l','W','A','Y','5','_','s','T','r','I','n','G','$','_','D','O','E','s','_','N','o','7','_','W','O','R','K']
for i in lis:
print(i,end = '')

cybergrabs{4lWAY5_sTrInG$_DOEs_No7_WORK}

Custom Cipher

题目给我们一个pyc文件,我在网页上反汇编pyc文件,得到了下面的代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
encoded_flag = '*@),9.9():B@tz&k6<5i&\\mX&xmn-y&*Vu/,wD'
alphabet = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\
[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'

def encode_secret(secret):
rotate_const = 37
encoded = ''
for c in secret:
index = alphabet.find(c)
original_index = (index + rotate_const) % len(alphabet)
encoded = encoded + alphabet[original_index]

return encoded

text = input('Enter any text to encrypt: ')
if encoded_flag == encode_secret(text):
print('Congratulations!!!. You found the flag.')
else:
print('Sorry!!!')

这边遇到了我最怕的index转换了,其实仔细想想还是挺容易的,我们从后往前做,如果“对表”,我们就“寻表”,如果加法,我们就减法

对表:a=string[i] 寻表:i = string.find(a)

还有一个就是关于%的:(a+b)%c = a%c+b%c

下面是exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
encoded_flag = '*@),9.9():B@tz&k6<5i&\\mX&xmn-y&*Vu/,wD'

alphabet = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\
[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'
print(len(alphabet))

flag = ''
for i in encoded_flag:
original_index = alphabet.find(i)
index = original_index%94 - 37
str1 = alphabet[index]
flag += str1

print(flag)

cybergrabs{yOU_FounD_7H3_SHIfT_c1PheR}

Simple

直接用ida64打开,我们跟进sub_1188这个函数

a2是我们输入的字符flag,*( *(a2 + 8) +i ) )就可以看成flag[i]

下面是exp:

1
2
3
string = "QllB^pvCloQebCfopqCi^d"
for i in range(len(string)):
print(chr(ord(string[i])+3),end = '')

cybergrabs{TooEasyForTheFirstFlag}

ahh shit!

看到这边就直接把h3r3_w3_g0_4g4in!带入试试。

cybergrabs{h3r3_w3_g0_4g4in!}

除了reverse,misc也有好玩的题目:

MISC

First Telecommunication

5位的二进制解码,和z1r0想了半天,才晓得是博多密码……

参考文档:https://www.cnblogs.com/junlebao/p/14025048.html

博多码解码网站:https://www.boxentriq.com/code-breaking/baudot-code

转换成小写,就是flag了,flag里面也提示了,是baubot(博多)密码

cybergrabs{yougotthisbaubot}

Discord

这个要笑死了,打开这个之后,瞪大双眼,flag就在其中

cybergrabs{1_am_h3r3}

Electronics

这个是真没解出来……

还有一个feedback……

真的要笑死了……