Zipper

Description

by flocto

Stare into the zip and the zip stares back.

Downloads: flag.zip

Solution

We are given a zip file, first let's check metadata:

└─$ exiftool flag.zip 
...
Comment                         : So many flags... So many choices....Part 1: amateursCTF{z1PP3d_
...
Zip File Name                   : flag/
Zip File Comment                : Part 3: laY3r_0f
...

Nice we got 2 parts of the flag. The other parts must be somewhere in zip files.

└─$ unzip -B flag.zip # -B flag automatically renames duplicates
...

# R - Search recursively
# a - All types of files
# i - Case insensitive
# n - Display line number
└─$ grep 'part' ./flag -Rain
./flag/flag201.txt~:1:Part 4: _Zips}

The Part 2 was biggest struggle. I tried using zgrep - search possibly compressed files for a regular expression, when I should have used zipgrep - search files in a ZIP archive for lines matching a pattern.

└─$ zipgrep 'Part' flag.zip
flag/:Part 2: in5id3_4_
flag/flag201.txt:Part 4: _Zips}mUPPiWo7w9VFtbofzkCQw7OYVmPs48TCYgXBozFxaXBSl6rrnU
flag/:Part 2: in5id3_4_
flag/flag201.txt:Part 4: _Zips}mUPPiWo7w9VFtbofzkCQw7OYVmPs48TCYgXBozFxaXBSl6rrnU

Last updated