TAMUCTF - GEOGRAPHY
Lyell Read
Tags
Prompt
My friend told me that she found something cool on the Internet, but all she sent me was 11000010100011000111111111101110 and 11000001100101000011101111011111.
She’s always been a bit cryptic. She told me to “surround with gigem{} that which can be seen from a bird’s eye view”… what?
Solution
Ok. We know that we need to somehow interpret those binary strings as coordinate(s) to get a location that we can look at from “bird’s eye view” (presumably on Google Maps).
I went through many trials of this, from converting the bits to { string, hex, decimal, octal } and using those as coordinates, and calculating geohashes { http://geohash.co/, https://www.dcode.fr/geohash-coordinates } to get locations out of these things, all to end up with locations in the Pacific or in Russia or Antarctica, with nothing at all there. Coincidentally, I was sure that each set of bits corresponded to a pair of coordinates (latitude and longitude), so I would get a line that I needed to read along (or something) between those points, from a “bird’s eye view”.
OK, those were wrong, so back to basics. I googled “binary string length 32 coordinates geographical”, leading me to this article. In it, user arjanvanb describes:
In decimal degrees, a longitude with 4 decimals, -180.0000…+180.0000 might need 9 bytes when sending as plain characters (or 8 when leaving out the decimal dot), and probably another byte for some separator. But it also nicely fits in 3 bytes (like -8,388,608 to 8,388,607 as a 24 bit signed integer if you first multiply by 10,000). When one needs more decimals, using 4 bytes for a standard 32 bit float [59], or multiplying by 100,000 and sending as a standard 32 bit signed long [41], will give more than 7 decimals.
Thank you, Arjan! From that, I tried converting these 32-bit binary strings into floats using IEEE 754 Converter and I got:
11000010100011000111111111101110 : -70.24986
11000001100101000011101111011111 : -18.529234
When ordered (-70.24986, -18.529234), we get this spot, in the middle of the ocean, above Antarcitca… Nothing doing.
However, when ordered the other way, (-18.529234, -70.24986), we come across this spot, at 18°31’45.2″S, 70°14’59.5″W.
Thanks to the TAMUCTF organizers for being reasonable and providing the flag once I proved I got the right location, as I would have had to try a bunch of possibilities:
gigem{CocaCola125anos}
gigem{cocacola125anos}
gigem{coca-cola-125-anos}
gigem{Coca-Cola-125-anos}
...
To get the flag:
gigem{coca-cola}
~Lyell Read