Grass is Greener
~# cat Question
the Leaves Shades the Branches
FILE: Grass_Final.zip
Unzipping Grass_Final.zip
, gives us Grass_Final.png
. Immediately, I tried viewing the png using eog. However, it gave me a file format error. Thus, I tried using exiftool to see the metadata of the file. Once again, it showed a file format error.
After some googling, I came across this github repo talking about magic bytes. Basically, we can now exploit this the same way. Seeing that is a png image, we can change to magic bytes of the corrupted file. Here's the list of file signatures for their respective magic bytes. I used xxd (hex viewer) on the file to see its hexadecimal format. However, based on the png file signatures, it has been altered and is no longer a png despite the file extension.
Fixing the magic bytes
We can alter the magic bytes of the corrupted png to match the magic bytes of a real png file.
The file is now an actual png file. I ran eog on the file and it revealed an area of ACS(I).
At this point, I got really stuck as I thought it had something to do with the image. Thus I tried looking hard at the image to see if the flag was hidden in the photo 🤣.
I re-looked at the challenge and realized the description gave us a hint. Reading the capital letters of the description the Leaves Shades the Branches
gives us LSB. Then I knew I had to run zsteg on the image. There is the flag!
LSB of the PNG file
Flag: ACSI{t0uch_gr@55}
Last updated