Practical Approaches in Recovering Encrypted Evidence
Practical Approaches in Recovering Encrypted Evidence
FSCT 8570
Table of Content
1.0 Introduction
3
As criminals become more aware of the capabilities of forensic examiners to recover digital
evidence they are making more use of encryption technology to conceal incriminating data.
Organized criminals use readily available encryption software and online child pornographers
encrypt their communications and the files they exchange.
Terrorist groups are making use of encryption to protect the contents of their computers and
their Internet communications.
Since criminals generally encrypt the more incriminating communications and stored data, it is
often exactly this evidence that investigators seek. Therefore, in addition to an understanding of
cryptography, it is critical for forensic examiners to develop practical techniques for dealing with
encryption to obtain some, if not all, of this digital evidence.
As strong encryption becomes more widely used by criminals, it is infeasible to attack the
encryption directly using brute force methods. Instead, practical approaches to recovering
encrypted data using readily available tools needs to be employed to locate unencrypted copies
of data, obtaining encryption pass phrases, and guessing encryption pass phrases.
This paper discusses different methods investigators may apply to find and recover
incriminating evidence such as plain text from the hard drive of the criminals and using
commercial available tools to obtain and guess pass phrases.
2.1 Introduction
Crypto-analysis (also spelt as Cryptanalysis) is the opposite of cryptography.
Cryptanalysis is the art (and science) of breaking cryptographic protocols: cracking
codes, breaking authentication methods, decoding secrets. The most important
search for a cryptanalyst would be to find the secret key being used, since that
would allow any communication using that key to be decrypted. In the general case the
cipher text and algorithm are known – the plaintext and key are not.
A brute force attack is really a brute force key search directed against some ciphertext.
The attacker tries a series of different keys in the hope that one will eventually work. It is
akin to a burglar using different keys from a key-chain to open a locked door. There is no
way to prevent this kind of attack, since it is trivial to intercept ciphertext. However, when
ciphertext is encrypted with a sufficiently long key (128-bits or longer), it would require
the attacker to try literally billions and billions of different keys. When an encryption
algorithm like DES is used, it is theoretically possible to try every possible key to decrypt
a given piece of ciphertext. However, this approach requires significant computing power
to run through the vast number (2^56, over 72 quadrillion) of potential decryption keys
and can take an inordinate amount of time depending on the strength of the encryption.
This approach is therefore, not the best way to crack encryption or to determine the pass
phrase. Non cryptographic methods are therefore required, which will get the work done
in a reasonable time and using reasonable resources.
Crypto-analytical attacks
5
Crypto-analytical attacks are far more sophisticated than brute force attacks. They
proceed on the unfortunate fact that it is possible to carefully and patiently examine an
algorithm to give up specific information about its generated ciphertexts in order to
determine the key. Such attacks tend to require advanced mathematics and powerful
computers. However, well-designed algorithms should be resistant against such attacks.
Computer intruders often use simple encryption to obfuscate network traffic and portions
of rootkits they install on compromised systems to conceal their presence. One common
form of simple encryption used by intruders is to exclusive OR (XOR) each byte against
the value 255 (0xFF), effectively inverting every byte in the file.
In one case, examiners found a configuration file that they suspected was a key
component of a rootkit but appeared to contain only binary data. Viewing the file using a
hexadecimal viewer showed that all of the characters in the file were above decimal
value 127. This absence of ASCII characters suggested some form of character
6
substitution. Guessing that XOR was used, the examiners reversed the encryption to
reveal the contents of the rootkit configuration file shown here:
Another example would be Back Orifice. It uses XOR to encrypt traffic between the client
and server and it is relatively simple to decrypt these packets since the header of the
Back Orifice packets always begins with the same string.
Early versions of Microsoft and Excel use XOR to encrypt passwords that individual can
select to protect their files. These passwords can be easily recovered using tools such
as Access Data’s Password Recovery Toolkit and NTI’s Advanced Password Recovery
Software.
Modern Operating Systems are paged, a process which allows them to provide
more virtual memory than there really exists in the system. This is done my
saving unused memory pages to disk to allow other programs and data to be
loaded. These disk page files may inadvertently contain passwords, keys,
plaintext and ciphertext. Accessing this on-disk storage may provide an investigator
with information that may assist in breaking the cryptosystem in use.
Programs may also create temporary disk files to hold data while calculations are
in progress, or from one invocation to the next. These temporary files may also
divulge sensitive information, and tend to be more easily accessible, and have
7
more permanence, than pages memory files. Also, for instance, if an EFS encrypted file
is printed and the System32\spool\printer folder is not encrypted, spool files will contain
unencrypted copies of the encrypted files.
Another example is, when PGP is used to encrypt Microsoft Word document. Although
the original document were wiped, fragments of the files can be found scattered around
the disk in deleted MS word temporary files, some of which could be found by searching
for Microsoft Word headers. Although it may not be possible to recover the entire file, but
enough incriminating evidence can be accumulated to prove a case.
D:\>pslist pgptray
Name Pid Pri Thd Hnd Mem User Time Kernel Time Elapsed Time
PGPtray 1332 8 7 150 1264 0:00:00.060 0:00:00.270 2:20:33.466
D:\>pmdump 1332 pgptray.mem
D:\>less pgptray.mem
…¨o
^@^@^@^@^@^@^@^@„¤^@^V^@^@^@^P^@„¤¨k^V^@`Ç^V^@P Signature Status: good
*** Signer: Eoghan Casey <[email protected]>
*** Signed: 7/20/2002 8:36:42 PM
*** Verified: 7/20/2002 8:41:17 PM
*** BEGIN PGP DECRYPTED/VERIFIED MESSAGE ***
Return-Path: <[email protected]>
Received: from webmailmta.go.com ([204.202.140.199])
by lsh110.siteprotect.com (8.9.3/8.9.3) with ESMTP id SAA04960
for <[email protected]>; Thu, 11 Jul 2002 18:57:48 -0500
Received: from gomailjtp03 ([10.212.0.163])
by mta07.seamail.go.com (Sun Internet Mail Server
sims.4.0.2001.07.26.11.50.p9) with ESMTP id
<[email protected]> for
[email protected]; Thu,
11 Jul 2002 16:43:48 -0700 (PDT)
Date: Thu, 11 Jul 2002 16:45:32 -0700 (PDT)
From: Harold Jones <[email protected]>
Subject: Test
To: [email protected]
Message-ID: <6477825.1026431132801.JavaMail.harold1jones@gomailjtp03>
MIME-version: 1.0
X-Mailer: GoMail 3.0.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
8
X-Mozilla-Status: 8001
X-Mozilla-Status2: 00000000
X-UIDL: WBZAgrMiFHAeVlSFpWCqRCEs
Testing
___________________________________________________
GO.com Mail
Get Your Free, Private E-mail at http://mail.go.com
*** END PGP DECRYPTED/VERIFIED MESSAGE ***
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^L^@<8D>
…
Accidental memory dumps may disclose information relating to encryption. For instance,
when PGP crashes on Windows 2000, the Dr. Watson application creates a memory
dump (e.g. C:\Documents and Settings\All Users\Documents\DrWatson\user.dmp) that
can contain encrypted and plaintext versions of data as well as passphrases as shown
here: C:\Documents and Settings\All Users\Documents\DrWatson>strings user.dmp
9
…
kernel32.dll
RASAPI32
C:\WINNT\tracing
C:\Documents and Settings\Administrator\My Documents\PGP\pubring.pkr
C:\Documents and Settings\Administrator\My Documents\PGP\secring.skr
&!
IN PGP MESSAGE-----
Version: PGP 7.1
qANQR1DBwU4DSL6Q3OHRwOYQB/9pKnnhZGQRFwykWzBO1EWkzW336QOkUaHj
0aVj
P1MgxDWQWi3kZpOfGnDg6kbQriWBiIgD/z8p5xGN+WcksytlLJv8OxvTGMepx7u8
h5aVRXZd8YPM+h5ROpbnNw+SiT/w9oCy/ChWeiCHV1swQSzwBHx2Ye+yxO70Moxc
...
frAG3nM7kOnChQp4jxhv2J0p7fL1vteI9EGbcimC9QCVBwC1U++mQIqbTyIw5gWK
Io11yl8P+wKjcHsLfi2hTE+NIRb+VORWhVoCDHgNKV1nSFNTK0LEnvz84OFyRc1z
-----END PGP MESSAGE-----
<pgppassphrase!>
…
Since there may be other ways in which encryption applications expose passphrases a
more systematic method of searching the disk for possible passphases is desirable. For
instance, using the Forensic Toolkit (FTK) from Access Data it is possible to generate a
list of keywords found on the disk and import this list into the Password Recovery Toolkit
(PRTK) as shown in Figure 1. In this way, if the user purposefully or unintentionally
stored their passphrase on disk or an application wrote the passphrase to disk, it will be
available in the keyword list. In one case, the PGP passphrase was found on an
apparently blank floppy disk.
If the passphrase cannot be obtained from the computer, an attorney with the assistance
of a forensics examiner may be able to persuade a suspect to cooperate. Although
refusing to disclose an encryption passphrase does not necessarily imply quilt, it may
reflect badly on the suspect in court and can shift the burden of proof onto the defense.
Faced with such a risk, offenders can be persuaded to provide this information in
exchange of leniency in sentencing or plea bargain.
Passphrases are generally difficult to obtain even when proper searching tools and
techniques are employed. As a last resort, the suspect’s machine can be monitored
using software or hardware in an effort to obtain the desired passphrase. Commercial
software programs like Spector Pro, and free programs such as SubSeven and Back
Orifice enable key logging, screen captures, and remote file access, can assist
investigators in obtaining encrypted files remotely.
Hardware devices like KeyGhost and KeyKatcher have internal memory and record
keystrokes when they are connected between the keyboard and CPU.
The advantage of hardware key logging devices over software is that they record every
keystroke, even those used to protect the BIOS. However, these devices are not
designed or Macintosh or Sun systems and do not work on laptops or personal digital
assistants since the keyboard is integrated. Also, physical access to the machine is
required to install and retrieve hardware devices and they are visible to the alert user. A
tamper evident seal can be attached to the device, making it more difficult for an
individual to remove the key logger without some visible sign of tampering as noted by
KeyKatch.
When manual passphrase guessing fails, an automated approach may be used with a
list of common passphrases, then a dictionary in the languages of the suspect, and then
more sophisticated permutation techniques. For instance, the Password Recovery
Toolkit (PRTK) from Access Data can be configured to use various dictionaries and
customized suspect profile as shown in figure 2. The PTRK then generates possible
11
passphrases using entries in the dictionary, suspect profile, and various combinations of
these strings as shown in figure 3
All password recovery performed by PRTK are conducted using rules, called levels.
These levels start with the simplest attacks and proceed to the more complex. Levels
provide the means by which the complexity of the passwords to be tested are gradually
increased. The level begin with simple dictionary attacks, migrate through enhanced
dictionary attacks, and end with brute-force attacks where every sequence of characters
is tried. The simple attacks (depending on the complexity of the encryption algorithm)
typically require much less time than the more complex one do. Also, the more
passwords tried against the encrypted file, the more likely it is that a password will be
found that can open it. These settings directly impact the number of words to be tried as
passwords and therefore determine the time that it will take to test all possibilities.
Careful selection of these settings can reduce the time to test and recover passwords in
a significant way. Improper use of these settings can prevent passwords from ever being
found.
external media. Also, PGP periodically makes backup copies of key files on the hard
disk, any of which could have a weak passphrase.
Weak encryption, employing key lengths of up to 40 bits can be cracked using software
tools such as Access Data’s Distributed Network Attack (DNA) application, which can
brute force Adobe Acrobat and Microsoft Word/Excel files that are encrypted with 40 bit
encryption, shown in figure 4.
By making more machines available, the number of passwords that can be tested
increases. It should be noted that DNA is able to make use of each processor in a multi-
processor and/or multi-core processor machine, enhancing the overall performance of
password recovery.
Developing password finding and guessing tools that can access a wider range of file
types and intelligently combine keywords to create complex passphrases, needs to
developed, and available at reasonable cost, for smaller organization to implement.
Another challenge that tools developers face is tackle strong encryption such as photon-
based quantum cryptography, which is impossible to decrypt because the act of
monitoring alters the transmission
5.0 Conclusion
6.0 References
Key management, key lengths and cryptographic attacks and defense. Simon Weber-
Brown
1