Posted on by and filed under 29c3CTF 2012.

This challenge gave the description:

Ever played Googlewhack? Well, this is a bit easier and gives you more power, enjoy.

Googlewhack is when only one result comes up from two words being searched. In this case, they have their own database of strings and we can search to find something that returns only one result. Some first tries return random values, !-!, .#., other characters. With the name regex, we try to use other wildcard characters, and soon find that you can search using regex functions. Some searches like !.4! would return results for regex “.4” which had only one result, 424242424242424242.

After some more trying, we try the key string, “29C3_” which returns some results, but more than 1, so the string will not be displayed. At that point, we try various length strings with wildcard, finally find that the length is 16 wildcard “.” after the flag starter.

One word at a time, we determine the final key, but there are still some wildcards that are out of the range [A-Za-z0-9]. These must be characters such as *.(){}/. We fill in the gaps and finally find the final string has 2 matches, but they are the same. The final search was “@Key: 29C3_Well.This/Is#Not+The|Wrong?Key@” and when removing the for the special characters, this reveals the flag to turn in: 29C3_Well.This/Is#Not+The|Wrong?Key

Credit: Jonathan Singer, Luis Santana, Charles Zaffrey