Root Me 的 medium 題 Crypt-art
,本題敘述如下。
A police unit intercepted a message from a terrorist group. This message may contain a secret key used to encrypt other communications. They need you to decrypt it !
首先題目給了一個 ppm 檔案,且標籤寫 a language where the programs are works of modern art
,然後看起來像一張圖片
首先從提示下手,題目說 "a language where the programs are works of modern art",所以可能又是甚麼怪怪的語言去看會有資訊,所以先直接 google 這段話
看到查到的結果寫 piet
後,查詢 piet decoder
又發現有個神奇的工具
https://www.bertnase.de/npiet/npiet-execute.php
可以把圖片裡的資訊抓出來
發現有個 key 但不知道要幹嘛,所以再回來看看圖片本身
1.file
$ file ch8.ppm
ch8.ppm: Netpbm image data, size = 70 x 50, rawbits, pixmap
2.exiftool
$ exiftool ch8.ppm
ExifTool Version Number : 12.40
File Name : ch8.ppm
Directory : .
File Size : 10 KiB
File Modification Date/Time : 2021:12:11 01:03:40+08:00
File Access Date/Time : 2025:10:09 23:19:36+08:00
File Inode Change Date/Time : 2025:10:09 23:19:30+08:00
File Permissions : -rw-rw-r--
File Type : PPM
File Type Extension : ppm
MIME Type : image/x-portable-pixmap
Image Width : 70
Image Height : 50
Max Val : 255
Image Size : 70x50
Megapixels : 0.004
3.binwalk
$ binwalk ch8.ppm
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
4.strings
$ strings ch8.ppm
70 50
Hi! Welcome to
esoteric programming!
The encrypted pass is:
EPCQFBXKWURQCTXOIPMNV
Bienvenue a la program
mation esoterique!
Le pass encrypte est
EPCQFBXKWURQCTXOIPMNV
最後在用 strings 的時候看到了題目的資訊,關鍵字 ```The encrypted pass is:
EPCQFBXKWURQCTXOIPMNV```,於是應該是要結合上面的 key 去解
加密資訊: EPCQFBXKWURQCTXOIPMNV
key: EYJFRGTT
根據這個形式猜測是 維吉尼亞密碼 (Vigenère cipher),所以進行解密
https://cryptii.com/pipes/vigenere-cipher
得到答案
ARTLOVERSWILLNEVERDIE
今天是大媽咪