Hacking in Color
Aug 31, 2023
2 minute read

Lately, I’ve been reading about information design and one area that I think is especially interesting is how best to use color to convey information.

Which reminded me of a time when adding a little color to a problem made all the difference.

At DEFCON 30 I participated in the Mayhem Industries CTF. One of the challenges was to find a flag given a file full of seemingly random bytes. file returned nothing. I couldn’t open it with anything. It didn’t have any sort of header. It was too random to be encrypted.

After spending some more time with the file I decided to crack open the file using a hex editor. Typically I use hexfiend or ghex for, but I had recently installed hexyl, which is a rust based command line hex viewer. Hexyl has an interesting feature where it applies color syntax highlighting to different categories of bytes. So non-printable characters would be yellow, printable symbols blue, nulls gray and so on.

When I scrolled through the file, the sea of randomness faded away and sitting there highlighted in color were the printable alpha/numeric/symbols characters that made up the flag, each character separated by a few thousand of bytes. Had it not been for the color coding of ascii character I never would have found it.