Reversing : The Hacker's Guide to Reverse Engineering

(ff) #1

Using Cryptex


Before actually starting to reverse Cryptex, let’s play with it a little bit so you
can learn how it works. In general, it is important to develop a good under-
standing of a program and its user interface before attempting to reverse it. In
a commercial product, you would be reading the user manual at this point.
Cryptex is a console-mode application, which means that it doesn’t have
any GUI—it is operated using command-line options, and it provides feed-
back through a console window. In order to properly launch Cryptex, you’ll
need to open a Command Prompt window and run Cryptex.exewithin it.
The best way to start is by simply running Cryptex.exewithout any com-
mand-line options. Cryptex displays a welcome screen that also includes its
“user’s manual”—a quick reference for the supported commands and how
they can be used. Listing 6.1 shows the Cryptex welcome and help screen.


Cryptex 1.0 - Written by Eldad Eilam
Usage: Cryptex <Command> <Archive-Name> <Password> [FileName]

Supported Commands:
‘a’, ‘e’: Encrypts a file. Archive will be created if it doesn’t
already exist.
‘x’, ‘o’: Decrypts a file. File will be decrypted into the current
directory.
‘l’ : Lists all files in the specified archive.
‘d’, ‘r’: Deletes the specified file from the archive.

Password is an unlimited-length string that can contain any
combination of letters, numbers, and symbols. For maximum
security it is recommended that the password be made as long
as possible and that it be made up of a random sequence of
many different characters, digits, and symbols. Passwords are
case-sensitive. An archive’s password is established while it
is created. It cannot be changed afterwards and must be specified
whenever that particular archive is accessed.

Examples:
Encrypting a file: “Cryptex a MyArchive s8Uj~ c:\mydox\myfile.doc”
Encrypting multiple files: “Cryptex a MyArchive s8Uj~ c:\mydox\*.doc”
Decrypting a file: “Cryptex x MyArchive s8Uj~ file.doc”
Listing the contents of an archive: “Cryptex l MyArchive s8Uj~”
Deleting a file from an archive: “Cryptex d MyArchive s8Uj~ myfile.doc”

Listing 6.1 Cryptex.exe’s welcome screen.


Deciphering File Formats 201
Free download pdf