CTF
arpconctf
misc
git
log
history
At the time of this write up, the Arpcon CTF has ended and I no longer have access to the challenge details for screenshot.
We were provided with a secret.zip
file. Extracting the file with unzip secret.zip
and navigating to the extracted folder, looks like we got ourselves a git repo.
We start by checking the commits using git log
and we can find some interesting commits.
First we checked out the added bin
commit and we have the flag.bin, which is the encrypted flag
That's seems to be all in that commit, so we check another one. Checking out the some codes
commit, we have a main.py
Now it looks like we can reverse the code and get our flag, but first we need to find the secret, so we move to checkout another commit. Checking out the remove flag.py
commit,we have the .env
file which contains the secret.
Now, let's get started. Import the necessary stuff first.
Then set our secret
You can take the flag.bin and read from it, here I will just set it directly in the script.
Next the actual reversing
We set the aes mode to decode, then base64 decode the encrypted flag and then use aes to decrypt. The full script is
And we have the flag as: arpcon{h1570RY_4lw4Y5_M4773R}