ASCII FTW

Published: March 5, 2024Updated: December 9, 2025

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.

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

  1. Step 1Collect the bytes
    Pipe 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'
  2. Step 2Convert from hex
    Send 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.