Skip to content

dalctf 2026

Playing with Pointers

Crypto challenge from DALCTF 2026.

Challenge Description:

I watched a youtube video earlier showing off this funny trick you can do with pointers. I forget what it's called though. Maybe I'll go play some Quake to think about it.

i checked output.txt and playingwithpointers.c

the source cast each flag byte to float and squared it

C

fflag[i] = (float) FLAG[i];
fflag[i] = fflag[i] * fflag[i];

the missing line was the quake style type punning line that stored the raw float bits into lflag

C

lflag[i] = *(long *)&fflag[i];

that means each value in output.txt was the ieee 754 bit pattern of a squared flag character

so i read each integer as float bits converted it back to a float took the square root and converted that value to a character

example

text

1167097856 -> 4624.0 -> sqrt(4624) = 68 -> D

doing that for all values in output.txt gave

Flag

DalCTF{s0m3_fUn_w17h_P01n73r5}

Discussion

Loading discussion…

Related solves

Keep reading

Complete archive