Vishwa CTF记录

Cryptography

1. John The Rocker

无题目描述,idrsa.id_rsa

思路:

  1. 先将id_rsa文件转为hash
  2. 根据题目提示使用john the ripper爆破

image-20220403014053311

2. Tallest Header

My friend sent me file and said how amazing this is, but i think while sending file corrupted. Can you help me fixing this? PS: make it lowercase
file.extension

蛮经典的隐写题,用010Editor打开,不难猜到是一张jpg图片,将开头的HEX码改为jpg的格式标识,即可打开。

unzip file.jpg把他分离,果然得到一些文件,得到加密方式以及密文,编写解码脚本也很容易:

1
2
3
4
5
6
7
8
9
10
# decrypt.py
def inverse_key(key):
inverse = []
for position in range(min(key),max(key)+1,1):
inverse.append(key.index(position)+1)
return inverse
def decrypt(key, ciphertext):
return encrypt(inverse_key(key), ciphertext)
print(decrypt(key, ciphertext)
# 得到flag vishwaCTF{tr1cky_h34d3r_w1th_p3rmu7at10n}

3. Jumble Bumble

Jumble Bumble been encode, get the flag from the code
JumbleBumble.txt
script.py

暴力

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from Crypto.Util.number import inverse, long_to_bytes
from sympy import integer_nthroot


file = open("output.txt", "rb")

while True:
n = int(file.readline().strip())
c = int(file.readline().strip())
dis = file.readline()
while True:
ans = integer_nthroot(c, 4)
if ans[1]:
m = ans[0]
break

plaintext = long_to_bytes(m).decode()
print(plaintext)

4. Musical Notes

Once I opened music website and found this image. There was SEA of images but this one seemed different.
There was written under this image that : listentocoolsong
image.png
Hint: All Chores Encloses Rare Encryption cipher

![image](image/Vishwa CTF记录/image.png)

这题实在没有思路,没见过的加密方法,

解码后:5F6E8ACADC725F3515B9A302FE04FF3DF97D7F08A3BB6ABC4C168E0E14D5044F

题目中SEA暗示AES,secret key 为listentocoolsong……这题实在脑洞,Flag: vishwaCTF{mus1c4l_c1ph3r_1n_4ct10n}

5.