BitsnBytes
[Programming]
BitsnBytes
(No description)
https://challenges.neverlanctf.com:1150
Recon
The URL loads an SVG image from: https://challenges.neverlanctf.com:1150/svg.php
This contains an image with colored blocks, but only two colors are used. Combining the colors as bits gives us a bit stream which can be decoded to ascii.
Code
import requests
import re
s = requests.Session()
url = "https://challenges.neverlanctf.com:1150/svg.php"
data = s.get(url).content
fills = re.findall(r'fill:.......', data)
colors = ""
for fill in fills:
if "0" in fill:
colors += "0"
else:
colors += "1"
arr_bytes = [colors[i:i+8] for i in range(0, len(colors), 8)]
out = ""
for i in arr_bytes:
out += chr(int(i,2))
print out
$ python bitsnbytes.py
Now you've got it! Here's your flag: flag{its_all_ab0ut_timing}
After running it for some time, it seems that around the 24th, 25th minute every hour you will get the flag.
Flag
flag{its_all_ab0ut_timing}