intro
freebies

misc

This picture seems oddly familiar… but something about it feels ever so slightly off.

This is the image that the challenge gave us. A quick image search got us the "original". I didn't really do much but safely assumed that they couldn't or wouldn't hide the FLAG on such an official website for a business like this (I thought it was a vibe code business for a second but quickly realized this is legitimate).
So our flag had to be inside the challenge image they gave us. So I just... checked the size of both? And oh boy, you can beat me and I'll still say the flag is in there. Since it's just trivia, we XOR it. I did have a hiccup with a typo of 1 character and had to submit a ticket for it. L on me.
about_us.webp
File Size : 1029 kb
about-us-team.I3TrCs6f_4E8U9.webp
File Size : 227 kB

FortID{1f_Y0u_W4nna_L3arn_M0r3_Ab0u7_Us_Try_S0lv1n6_051N7_Ex4m}
meta 2.0

Data science is old news, kids today are all about metadata science...
tldr;
The app accepts archives and extracts them with extractall(...) without sanitizing paths. By including entries like ../../../../srv/static/dummy.txt (or absolute /srv/...), we escape the extraction directory and write into the Flask static folder. We drop a symlink there pointing to the flag (/flag), then fetch it via /static/dummy.txt to read the flag.
the vulnerability

No checks for .. segments, absolute paths, or symlinks, enabling classic Zip Slip/Tar traversal to arbitrary locations writable by the service user. So lets look at it this way
Extract root chosen by the app:
/tmp/metabox/<uuid>/unpackWhat if the TAR entry name is like this:
../../../../srv/static/dummy.txt
Then the extractor builds a path like:
Join:
/tmp/metabox/<uuid>/unpack+../../../../srv/static/dummy.txtResult before normalization:
/tmp/metabox/<uuid>/unpack/../../../../srv/static/dummy.txtEach
..removes one path component on the left. After removing enough parents, you reach the filesystem root/
So here is the steps we can take to exploit this:
Build an in-memory TAR containing:
A directory entry for
../../../../srv/static.A symlink entry
../../../../srv/static/dummy.txtwith link target/flag.
POST the tar to
POST /uploadasmultipart/form-datawith fieldfile.GET
/static/dummy.txtto read the flag.

solve
FortID{I_H0p3_M4rk_Zuck3rber6_BuYz_0ur_M374_F0r_4_Bill10n_$$$}
Last updated