Description
The asciiftw binary constructs the flag byte-by-byte using movb instructions. Extract those literals from the disassembly and convert them from hex to ASCII.
Setup
Disassembly parsingDownload asciiftw
Download the PIE binary, mark it executable, and run objdump -d to disassemble main.
Filter for movb instructions-each contains the next byte of the flag.
wget https://artifacts.picoctf.net/c/508/asciiftw
chmod +x asciiftw
objdump -d asciiftw | grep movb
Solution
- Step 1Collect the bytesPipe objdump’s output through grep/cut to isolate the immediate operand passed to movb. Concatenate them into a single hex string.objdump -d asciiftw | grep movb | grep -oE '0x.*, ' | tr -d ',\\n'
- Step 2Convert from hexSend the aggregated hex into xxd -p -r to turn it back into ASCII text.objdump -d asciiftw | grep movb | grep -oE '0x.*, ' | xxd -p -r
Flag
picoCTF{ASCII_IS_EASY_8960...}
Any pipeline that extracts the movb immediates and feeds them into a hex→ASCII converter produces the same flag.