1 XORSearch is a program to search for a given string in an XOR or
2 ROL encoded binary file. An XOR encoded binary file is a file where
3 some (or all) bytes have been XORed with a constant value (the key).
4 A ROL (or ROR) encoded file has it bytes rotated by a certain number
5 of bits (the key). XOR and ROL/ROR encoding is used by malware
6 programmers to obfuscate strings like URLs.
8 XORSearch will try all XOR keys (0 to 255) and ROL keys (1 to 7)
9 when searching. I programmed XORSearch to include key 0, because
10 this allows to search in an unencoded binary file (X XOR 0 equals
13 If the search string is found, XORSearch will print it until the 0
14 (byte zero) is encountered or until 50 characters have been printed,
15 which ever comes first. 50 is the default value, it can be changed
16 with option -l. Unprintable characters are replaced by a dot.
18 Author: Didier Stevens
19 WWW: http://blog.didierstevens.com/programs/xorsearch/