Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.29 KB

[QCTF2018]X-man-Keyword.md

File metadata and controls

48 lines (32 loc) · 1.29 KB

QCTF2018]X-man-Keyword

知识点

lsb隐写

Nihilist加密

解题

attachment

下载附件后,是一张图片,放到010editor以及kali后无果,然后将其放入Stegsolve,发现其lsb的头部有点东西,应该是lsb隐写,随后用cloacked-pixel-master -> lsb脚本解密可以得到PVSF{vVckHejqBOVX9C1c13GFfkHJrjIQeMwf}

image-20231206155910667

根据“hint1:把给出的keyword放到前面试试”的提示,从26个英文字母里把 “lovekfc”提出来放到前面做密钥。

lovekfcabdghijmnpqrstuwxyz

然后根据密钥替换密文中的字母解密(应该是Nihilist加密),这步用脚本来实现:

# -*- coding:utf-8 -*-
import string

ciphertext = 'PVSF{vVckHejqBOVX9C1c13GFfkHJrjIQeMwf}'
secretkey = 'lovekfcabdghijmnpqrstuwxyz'
plaintext = ''

for letter in ciphertext:
    if letter in string.ascii_lowercase:
        index = secretkey.lower().index(letter)
        plaintext += string.ascii_lowercase[index]
        continue
    if letter in string.ascii_uppercase:
        index = secretkey.upper().index(letter)
        plaintext += string.ascii_uppercase[index]
        continue
    plaintext += letter

print(plaintext)

image-20231206160055025