Beruflich Dokumente
Kultur Dokumente
It is an art because no
system can be considered secure without an examination of how it is to be used.
All components much be examined and you must know how an attacker goes about a
system before you can truly understand how to best defend yourself. This is where
this guide comes in; it exists for the purpose of examining these methods of attack
and the implementation for attack mitigation. You will learn the common techniques
used for attack and how to protect yourself from them. This guide should not be
used as an in-depth analysis of each attack, but a reference for each of the
attacks that exist.
Acknowledgements
RogerNyght
I want to thank RogerNyght for creating the Tails Guide. This amazing guide steps
you through the process of installing and using Tails at home as well as the
features that it hosts. For anyone thinking about using this Operating System for
true anonymity and security, should read this to guide its entirety. All credits,
attributions, and works go to him for this section. Thanks again!
After writing this guide, it was apparent that was a bunch of errors littered
throughout the thing. Thanks to everyone for spending the time going over it and
performing a sanity check. It was found that I am only half as crazy as I thought.
Thanks everyone!
Warning: THIS GUIDE MAKES MENTION OF AND HOSTS LINKS TO WEBSITES AND CHATROOMS
THAT MAY CONTAIN MATERIAL OF AN ILLEGAL NATURE SUCH AS CHILD PORNOGRAPHY. USE AT
YOUR OWN DISCRETION.
You will notice that this guide mentions figures and illustrations that do not
appear to be included in this guide. Please visit the website or PDF when
available to view there.
You should ALWAYS use an alternative PDF viewer such as Foxit PDF Viewer. Also,
you should make sure that PDF documents are viewed safely and securely. Block your
PDF viewer from talking to the internet, disable JavaScript, and for best security,
view it from within a Virtual Machine.
To verify the PDF document with the signature provided you will need to import my
public key using gpg and use the command line switch provided. For Windows users,
you will need to download and install Gpg4win to verify the signature and the Tor
Browser Bundle to download the signature.
Public Key: You can view my profile
Switch: gpg --verify signature document (example: gpg --verify
c:\SecuringWindows.sig c:\SecuringWindows.pdf) *command prompt
Foreword: For this version I have made significant improvements over the last one
by adding content to nearly every section including: content, context,
inconsistency changes, error fixes, diagrams, and step-by-step guides on the varies
techniques discussed, tools used by hackers and forensic investigators, and more.
I have also included new sections within the guide on new, varies subjects that
have not been discussed within the guide before. Since nearly everything was
updated, all topics and information are still relevant today
Note: This SHOULD be the LAST version. I hope this is not too long and provide a
great resource for any subject you are interested in knowing a bit more about.
Table of Contents
The I in CIA stands for Integrity and is specifically referring to data integrity.
Integrity is the act of ensuring that data was not modified or deleted by parties
that are not authorized to do so. It also ensures that if the data was changed,
that the authorized person can make changes that should not have been made in the
first place. Simply, if you send a message to someone, you want to make sure that
the person does not receive a message that was altered during transit. Integrity
also confirms that you are in fact speaking to who you think you are speaking to
(for example: we download an add-on from the website, you want to make sure that
you are downloading from that website and not an unscrupulous third-party).
Finally, the A stands for Availability and ensures that when you need the data it
is available to you. Not only does data have to be available to you, but it has to
be reasonably accessible. There's no point in security controls if you cannot
access the data! This component is a concern, but for the average end user, there
is not much that can be done to ensure availability when dealing with webpages, or
IRC servers or anything else managed by a third party host. For this reason we
will not be discussing Availability except for backing up your data in this guide.
2. Recommendation
Windows was not built with security in mind, therefor should not be used. Tails is
recommended as it is a live DVD or USB that was created to preserve your anonymity
and privacy (Chapter 10). It allows you to browse the internet anonymously and
safely as all applications are preconfigured to run through Tor. Other uses
includes encrypting your files, sending and receiving emails and instant
messaging, photo editing, document editing and more. Tails also operates
completely in RAM so it does not leave a trace on your computer. RAM is Random
Access Memory and is wiped when the machine shuts down. Everything that you want
saved is done so in secure, encrypted persistent storage. Tails link: Here. A
step-by-step for installing Tails can be found below. Another distro I would
recommend is Whonix. Whonix is an operating system focused on anonymity, privacy
and security. It's based on the Tor anonymity network, Debian GNU/Linux and
security by isolation. DNS leaks are impossible, and not even malware with root
privileges can find out the user's real IP. If you cannot use Tails or Whonix – or
better yet – do not want to use them, you should make sure that Windows is secure.
Windows:
Truecrypt – I would download TrueCrypt and enable FDE (Full Disk Encryption) to
make sure that all evidence is encrypted thus allowing you to skip Chapter 4. If
you do not want to enable FDE, I would create a container and have a Virtual
Machine inside the container. Otherwise, EVIDENCE CAN BE EASILY GATHERED BY
INVESTIGATORS. (Section 3.2)
Tor Browser Bundle - This allows you to browse the internet anonymously. Using
TBB will also allow you to visit .onion sites as well as to join the .onion IRC
servers with TBB's instance or Tor. (Section 9.1)
Anti-Virus and a Firewall - This will keep your computer protected from viruses
as well as remote intruders (most all-in-one anti-virus software has these
features). (Section 7)
I have decided to move a recommendation from later on in this guide to up here.
One good recommendation is to create and use a standard account with no
Administrative privileges. This way, if a virus is executed, it only has the
privileges of the account that you are in. Also, I would make sure your username
does not contain your full name as many applications such as Pidgin can share this
information. Furthermore, make sure that you create a Windows password that is
difficult to guess/attack, as your computer can be explored using that password,
over the network.
(Optional) TorChat - TC is a chat application that runs over Tor to provide an
anonymous way to chat. (Section 2)
(Optional) IRC Client - An IRC client allows you to enter Tor chat rooms to
talk to many individuals at one time. You will need one with proxy settings so you
can run the client through Tor. Make sure to NOT use DCC as it can expose your IP
address. . There are several IRC servers that run over Tor (.onion addresses)
that you can use. They are all logically connected, so connecting to one will
connect you to all. (Section 2)
(Optional) GPG - for sharing messages and files back and forth over a common
medium, GPG ensures confidentiality and integrity. (Setion 3.3)
Check authentication
Checking authorization and access control
Auditing your system
Verifying firewalls, proxy settings, and other security
Verifying encryption for both public and private key encryption
Check communication encryption, including: email, chat, web browsing, and
Operating System data
Update system software, including Anti-Virus software and scanners
ackup and storing sensitive data securely
Harden your system by removing unnecessary software and services
There are a couple of ways to chat over Tor depending on your wants and needs. In
this guide, I will only be talking about two ways to chat with other people: IRC
and TorChat. Using an IRC server allows you to chat with many people at one time
as well as chat with another person in a private chat room. TorChat on the other
hand only allows you to chat privately with someone, but it allows you to share
files with another person whereas the IRC does not.
The first way I will describe is how to connect to the Onionnet IRC. The Onionnet
is a network of servers that are connected together to increase redundancy. For
those of you whom don’t know, IRC stands for Internet Relay Chat and was intended
for group communication in discussion forums, called channels, but also allows one-
to-one communication via private message as well as chat and data transfer,
including file sharing. When using the Onionnet servers however (as described
below), DCC file sharing is disabled and other security restrictions apply.
Download you IRC client; Personally, I used Pidgin. The link is provided for
you: http://pidgin.im/. There is a portable version of Pidgin available if you
plan on using the client on several machines (which is not recommended as the
computer can contain spyware). Also, Pidgin allows you to connect to several
servers at once in the chance you get disconnected from a server or a netsplit
occurs.
To create an account, Click Accounts followed by Manage Accounts. You can add
as many accounts as you want; I created a few accounts to connect to the different
IRC servers for the reason described above.
Select Add. Under Basic, your settings should look like this: Protocol -
IRC, Username - your username, Server - IRC server, Local alias - your username.
Again, you can use any of the several Tor IRC servers as they are all connected.
Alternatively, you can use one of the several IRC relays instead of connecting to
the Tor servers directly.
Under Advanced, your settings should look like this: Port - 6667, Username -
your username. In Pidgin, if you do not specify a username under the Advanced
settings, your username will be exposed. When you enter or leave the chat room the
username will appear before the hostname. For example, if your ID is TheBest and
your username is Bob, then it will appear as TheBest [Bob@OnionNet].
Under Proxy, your settings should look like this: Proxy type - SOCKS 5, Host
- 127.0.0.1, Port -9050 (Tor Port) *version 2.3.25-4 use port 9150. If you are
using Privoxy, the port will be 8118.
Click Buddies and Join a Chat to join a channel. Add Chat will permanently add
the channels to the Chats list so you don't have to remember the channel name every
time. Right-clicking the chat under Chats will give you a host of options. I
selected Persistent to receive the messages in the chat-room even though they are
not currently open. You can use /list to get a list of all the channels or you can
use /join #room to join a specific room. #security and #public are two good
channels when asking general questions or questions related to privacy or security.
You can use the /msg "username" command to send a private message to someone or
use the /query "username" command which will open a new window in both clients for
private messaging. I would advise looking up the IRC client commands for full
functionality. Lastly, even though I recommended disabling DCC, the servers
disable the functionality altogether.
Lastly, you should know that most -if not all- IRC clients cache your username
for functionality. Pidgin, takes this further by creating logs for specific
channels and individual users that you chat with using private messaging by
default. Under Preferences > Logging, you should disable Log all instant messages
and Log all chats.
IRC Servers
Here is a list of the Tor IRC servers (note that all servers are linked):
FTW: ftwircdwyhghzw4i.onion
Renko: ircd5ilf47whabg4.onion/ (Down)
Nissehult: nissehqau52b5kuo.onion
OFTC: irc.oftc.net:9999 (NOT ONIONNET – CLEARNET IF NOT CONFIGURED FOR TOR)
IRC Channels
Here is a list of some of the popular Tor IRC channels (ordered by user count at
the moment of writing):
• #boys! • #knaben
• #pedo • #torchan
• #cams • #public
• #mjb • #security
• #girls • #hackbb
• #tor (OFTC) • #nottor(OFTC)
The other method I wanted to talk about is by using TorChat. TorChat is a peer to
peer instant messenger with a completely decentralized design, built on top of
Tor's location hidden services, giving you extremely strong anonymity while being
very easy to use without the need to install or configure anything. This program
runs completely portable and can be easily moved, protected or backed up. Like I
said before, TorChat can be used to share data with another person through Tor as
it was built is natively with security in mind.
Download TorChat from github as it is now the official source for the TorChat
project. At of the time writing the article, the direct link is
https://github.com/prof7bit/TorChat. Once the page is loaded, click the Downloads
button over on the right. Select the latest build as denoted by the version
number. Make sure to download the Windows executable version for Windows, Debian /
Ubuntu package for Debian/Ubuntu, or the Pidgin plugin if that is what you want to
do. If the build is in Alpha, then it is not recommended.
The file will be downloaded as a .zip file. Once the file is fully downloaded,
open the file and extract the contents with your favorite archive file manager. I
extracted the file to the default location in Windows which is the Downloads
folder. You can move the folder at any time as TorChat is portable.
Open the TorChat folder, expand the bin folder, and run torchat.exe to start
TorChat for the first time. Once loaded, you will be provided your TorChat ID (16
characters that are comprised of letters and numbers).
To add a contact, just right-click in the white space of the program and click
Add Contact… Alternatively, you can edit the buddy-list file in the bin
directory. Double-clicking a contact will initiate a chat (right-clicking and
selecting Chat…, will accomplish the same thing). You can also edit and delete a
contact by Right-Clicking the user and selecting the appropriate function. Sending
a file is as simple as dragging the file into the chat window or right-clicking the
username and selecting Send file… (Windows can only send one file at a time
whereas Debian/Ubuntu can send many at one time).
If you are upgrading your version of TorChat than make sure to backup and copy
over bin\buddy-list.txt, bin\Tor\hidden_service\hostname[b/], and
bin\Tor\hidden_service\private_key. If you do not copy over the latter two files,
you will be provided a new TorChat ID.
If you are handling anything sensitive that you don’t want found, or if you don’t
want to leave any trace on your computer, I recommend you use another Operating
System altogether. A good alternative that was built with security in mind is
Tails. Tails was built to route all internet traffic through Tor, to run
completely in RAM, and to save nothing unless explicitly defined to. In this
section, I will only be talking about installing Tails on a DVD or USB as there is
another, thorough guide that can be found in the the Guides section of this board
Download Tails from the official Tails website. You can either download Tails
via the direct link or the Torrent; which might be faster. However, the direct
link is recommended as is downloading and verifying the Tails Signature. The link
to the Tails download page is here: https://tails.boum.org/download/index.en.html.
Under option 2, select the latest release to start downloading. To verify the
download, use GPG to verify the Tails signature to ensure that your image has not
been modified in any way
Once downloaded you have a couple of options: you can burn the image to a DVD
or a USB (the image is too big to fit on a CD). If you burn the image on a DVD-R,
an attacker cannot modify the contents as the disk is read only. This also means
that you cannot save anything or make any permanent changes on the disk. DVD-RW
and the USB can be written to and re-written to, meaning files and settings can be
saved in persistent storage. But, this comes at a risk as an attacker can
maliciously modify Tails
Installing an image to a DVD is easy, all you need is the right software. ISO
Image Burner is a good software for Windows that can do this for you. Mac's and
computers running Ubuntu can burn the image natively. Once your ISO burning
program is open, insert the blank DVD into the disk drive and burn the Tails ISO
image to the blank disk (or a DVD-RW disk)
When installing the Tails ISO image onto a USB, it is recommended that you
download and install Oracle VM VirtualBox, and use that virtualization program to
boot into Tails. Otherwise, you cannot create persistent storage for saving files
and settings. Once you successfully boot into Tails, you can use the built in Tails
USB installer to install Tails on the USB device
I downloaded and installed VirtualBox from here. Once installed, start
VirtualBox and Click New to create a new VM. Fill out the Name[b/] textbox, select
Linux for the Type, and select Other Linux for the version. Proceed past the next
page and select Do not add a virtual hard drive and click Create. At the top of
the Oracle VM VirtualBox Manager click on Settings to modify the settings of the VM
you just created. Select Storage and next to Controller: IDE click on the little
disk icon to add a CD/DVD device. Click Choose disk and select the Tails ISO you
just downloaded. Under Controller: IDE you should see the image you just selected.
Selected that image and check Live CD/DVD over on the right under Attributes.
Click OK. Start the VM to boot into Tails
At this point you should be asked if you would like to view more options. I am
going to kill two birds with one stone and cover how to install Tails on a USB as
well as what I recommend after you install the ISO on the USB. Select Yes on this
screen and create an Administrator password on the next screen. Under Applications
> Tails you can create a persistent volume as well as use the Tails USB Installer.
When creating a persistent volume, I would select all the applications you will use
as well as if you are going to save any materials
Note: When using Whonix, you will be responsible for three Operating Systems. The
Whonix gateway, the Whonix workstation, and the host machine. Whonix is only
intened to run on VirtualBox, so VMWare is not recommended.
Set-up Whonix:
First things first: download both the gateway and the workstation from the
manufacturers’ website: Download links can be found here
You will need to download and install VirtualBox
Next step is to import both of the Virtual Machines into VirtualBox: use
VirtualBox to open both the .ova images (File > Import Appliance…)
Click choose and select the Whonix-Gateway.ova from your download folder and
press Open
Click Next until you reach the Appliance Import Settings. Click Import without
changing any of the settings. Repeat the process for both VM’s
Now start both Virtual machines (gateway followed by the workstation)
When you login for the first time, I recommend changing the password:
At Terminal enter: sudo su
Enter the default password changeme
Change the password using this command: passwd and passwd user for both VM’s
To learn more about Whonix security and additional functionality, go here:
https://www.whonix.org/wiki/Main_Page
After you setup and both the Whonix workstation and gateway, you can customize it
however you want. Unlike Tails, Whonix is entirely persistent with a start of 50Gb
of space. If you need to increase the size of Whonix, you will need to utilize
VirtualBox. I recommend increasing the size pre-setup versus after the fact as it
will be much easier (and safer). Once you are done and want to shut down the
machine, you can use the Shutdown button on the workstation and type Sudo poweroff
in the gateway. Another helpful command is sudo arm in the gateway to check the
status of Tor and use the character N to force a new identity when you are viewing
the arm output.
Once XChat is opened click the XChat button from the menubar
Select Network List… from the drop down
Fill in the information under User Information. These names are used by
default for each connection and will be visible to everyone
Under Networks, click Add, to add a server that you will connect to
Give this new value a name. For example, I entered Onion, so I knew it
contained all the IRC servers for OnionnetTest
Press the Enter key on your keyboard and select the Edit… button in the program
Once you see the Edit page come up, you will see one default server in the
Servers for Test list. You can select that item and click Edit
The format for adding a new server is as follows: serveraddress.onion/port.
For example, I entered this: ftwircdwyhghzw4i.onion/6667
Remember, the program already configured the proxy information, so this is all
you need to do. If you want specific channels to open once you are connected to
the server, you can add them to the Favorites list. You can now close this page
Once you are back to the Network List, select the newly created network and
press Connect
You can use the same IRC commands as in Section 1.1.
To chat in Whonix using Torchat, you will need to modify both the Workstation and
the Gateway. You can instructions on how to do this on the Whonix website.
KGPG
Whonix uses KGpg, which is a simple interface for GnuPG, a powerful encryption
utility. GnuPG allows to encrypt and sign your data and communication, features a
versatile key management system as well as access modules for all kinds of public
key directories. For ease of use, you can import the keys into KGpg and use the
GPG commands found in section 4 for full functionality. To import a public key in
KGpg: open the program and click Import Key from the menubar. Select the public
key you downloaded and click Open. Once the keys are imported, you can encrypt
data using the program (right-click the file in Dolphin browser, and click Encrypt)
or use the command line switches. GnuPG is recommended for secure communication.
3. Encryption
ncryption is the process of encoding messages (or information) in such a way that
eavesdroppers or hackers cannot read it, but that authorized parties can. Using
cryptography three purposes are fulfilled: confidentiality, integrity, and non-
repudiation. Encryption has long been used by militaries and governments to
facilitate secret communication. It is now commonly used in protecting information
within many kinds of civilian systems. Also, many compliance laws require
encryption to be used in businesses to ensure that confidential client data be
secured if the device or data is stolen. In this section I will be talking about
using encryption for confidentiality and integrity. Non-repudiation is used, but
is not normally implemented for our purposes.
Computer encryption is based on the science of cryptography, which has been used as
long as humans have wanted to keep information secret. The earliest forms of
encryption where the scytale’s and the creation of cipher texts. These forms of
cryptography would rely on both parties knowing the key used or the correct cipher
before the message could be delivered. Here's an example of a typical cipher, with
a grid of letters and their corresponding numbers
1 2 3 4 5
1 A B C D E
2 F G H I/J K
3 L M N O P
4 Q R S T U
5 V W X Y Z
Let’s say a general wanted to send the message “I love ponies” he would write the
series of corresponding numbers: 42 13 43 15 51 53 43 33 42 51 34. Only the person
with this cipher text would be able to reach the message. Now obviously, to make
the message more difficult to decipher, the letters inside the table would be
arranged differently. Computer encryption uses algorithms to alter plain text
information into a form that is unreadable. Most people believe that AES will be a
sufficient encryption standard for a long time coming: A 128-bit key, for instance,
can have more than 300,000,000,000,000,000,000,000,000,000,000,000 key
combinations. Today’s AES standard is AES 256bit encryption which has 2 ^ 256
possible combinations.
As we said before, there are many reasons for encryption. One purpose of
encryption is the act of transforming data from a state that is readable to a state
that cannot be read by a third party that does not have permission. The result of
the process is encrypted information (in cryptography, referred to as ciphertext).
The reverse process, i.e., to make the encrypted information readable again, is
referred to as decryption (i.e., to make it unencrypted). It is also important to
know that the word encryption can implicitly refer to the decryption process. For
example, if you get an encryption program, it encrypts information as well as
decrypts it.
There are a few types of encryption that should be used for two different purposes:
symmetric and asymmetric (public key encryption). Symmetric encryption can also be
known as private key encryption or single key encryption. “Symmetric” means the
encryption and decryption processes are reverses of each other. I must share the
secret passphrase with anyone I want to be able to decrypt my encrypted data. It
is used the most because it is fast, easy to use, and is the most widely needed.
You will use this form of encryption when there is only one password being used
(such as TrueCrypt or another simple file encryption utility). The problem with
this is as stated before, it uses only one key, so exchanging that key is not done
securely between two people. Asymmetric encryption fixes that problem by utilizing
two keys instead of just one.
Asymmetric (or Public key) encryption uses two keys, one key to encrypt information
and the other to decrypt the information. “Asymmetric” means that the process of
encryption with the public key can only be reversed (decrypted) by using the
private key (and vice versa). Although a message sent from one computer to another
won't be secure since the public key used for encryption is published and available
to anyone, anyone who picks it up can't read it without the private key. This type
of encryption is slower, but is more secure when sending confidential information
to someone, signing data, or verifying to a person is who they say they are. If you
want to send me an encrypted message, you must have my public key-- and only
someone who has access to my private key (presumably, just me) can decrypt messages
encrypted with my public key. So, when Bob wants to send you a message, his
computer encrypts the document with a symmetric key, then encrypts the symmetric
key with your Public. When you receive the data, your computer uses its own private
key to decode the symmetric key. It then uses the symmetric key to decode the
document.
Last word of note when using encryption is to make sure that you use open-source
encryption programs such as Truecrypt, as most companies will hand over the
encryption keys to law enforcement. Most companies use the EnCase® Decryption
Suite to decrypt a suspect’s hardrive or other portable media device. This list is
pulled directly from EnCase® and provides a list of built in keys that can be used
to read media on encrypted devices:
You will most commonly want to encrypt files for storage or if you want to upload
them to several people securely. Using your computer is also a security risk if
you simply created a Windows password and stopped your security there. Windows
hashes your password and checks that against the password you enter when logging
into the device. In no way does it attempt to encrypt your files; meaning they are
all in the clear just waiting for someone to take them. And even if you use
Windows encryption, law enforcement can just request the keys. Furthermore, many
of you think that using BIOS passwords are great for security, which is also not
the case. They can be broken as easily as Windows password can.
There are several programs that run outside of Windows to either remove or crack a
password. Removing the password does just that; removes the password completely.
Cracking a password on the other hand allows you to obtain the password, instead of
removing it. Doing so allows you to log into the device as the user, or as many
people do, use the same password across several logins across several systems.
Use this link to download TRK: click here. I recommend using the executable,
self-burning from Windows only format to easily burn the image to a CD
Once the burning process is complete, keep the CD in the CD tray and reboot
your device
Bootup from the device (you might need to google how to do so)
When TRK boots up, you will see a bunch of options. Select the first option:
Run Trinity Rescue Kit 3.4 (default mode, with text menu)
Click the down-arrow until you select: Windows password resetting
Click the down-arrow again until you reach the desired option. In this
example, select the first option: Reset password on built-in Administrator (default
action)
When prompted, enter 1 to Clear (blank) user password
I won’t get into cracking password with Ophcrack as that is an involved process.
Ophcrack cracks passwords using what they call Rainbow Tables which basically is a
list of stored hashed to be used against the hashes stored on the machine. These
tables come in several forms depending on the complexity you are expecting. You
will need to download and store these tables so they can be accesses when you are
attempting to attack a device. Also, make sure you have plenty of space on the
harddrive and they can reach to a couple Terabytes of data.
There are a couple of programs that support this type file and folder encryption
and most of you probably already heard of them. These programs I am referring to
are TrueCrypt and 7Zip and they both provide symmetric file encryption. TrueCrypt
is a program that allows you to encrypt your entire hard drive or to create an
encrypted container. 7Zip on the other hand is a program that allows you to create
an encrypted archive. Remember that symmetric file encryption has only one key for
the encryption and decryption process. So you will need to share the key in
cleartext if you plan on sharing the files.
When using Caeser Cipher's, as with the fundamentals of the Caesar Cipher, all the
characters are shifted, usually by 3 characters. If he wanted to say "You will
never guess this," for instance, he'd write down "BRXZLOO HYHU JXHVV WKLV" instead.
As you can see, the text is also broken up into even groups in order to make the
size of each word less obvious. You can change the orders of the letters and
change the number of shifts per letter to complicate the process for the attacker
even further.
Creating an encrypted container with TrueCrypt will allow you to store data within
the encrypted container. When mounted, it will look as another drive on your
computer. TrueCrypt containers are secure but using them still comes with the
risks of leaving your recent files lists, thumb files, and other temporary and
cache data exposed. It is recommended that you use TrueCrypt and encrypt the
entire disk for maximum security. The process of encryption your entire disk is
called FDE (Full Disk Encryption). Furthermore, it is recommended that you use a
hidden volume when using TrueCrypt. Investigators cannot determine whether or not
you have a hidden volume in your TrueCrypt container unless you tell them. One
drawback with using FDE with a hidden volume versus using FDE without a hidden
volume is you will have two Operating Systems instead of just one. You can also
use TrueCrypt to encrypt portable drives using the Traveler Disk Setup. For
information about using TrueCrypt on SSD’s, please reference SSD – Solid State
Drives (section 4.10).
As said before, when using TrueCrypt, as presented in the “Try it out” section, it
is a good idea to use a hidden container. Here’s why… Let’s say you have two
videos: video A and video B. Video A is of your pet hamster frolicking around in
the fish-tank with your preciousness goldfish named Garry (the fish, not the
hamster). On the other hand, Video B is a recording of your grandmother doing the
naughty with the pizza delivery man. Now, I am going to make a sweeping assumption
in claiming that you don't mind other people seeing video A, so it is deemed that
the video can be "public" or "not hidden." Video B on the other hand is just plain
nasty and if the pizza delivery man were 12, and you needed to hide that video at
all costs, this video would need to be "private" or "hidden." So, you would stick
Video A in the container that you could give the key away to and Video B would go
in a container that you would protect at all costs. If you use the key for Video
A, you can see video A and so forth.
So, on the same lines, a hidden container (or, a hidden OS), is a hidden, encrypted
container that the LEA cannot prove exists. So, you have two keys: a key for the
public container and a private container. You can unlock one or the other at one
time, but not both at the same time. So, you can give the LEA the key that opens
up your public container whilst hiding the key for your private container. The LEA
cannot determine if you have a private, hidden OS, or a private container. If you
use the key for your non-sensitive container, you will boot into container.
In essence (when dealing with hidden OS’s), think of two Operating Systems on one
computer and you can choose which one to boot into depending on the password. A
hidden OS, is hidden and the LEA cannot prove that it exists. The advantage of
this is you can have one OS for normal data whilst hiding your other material and
use it when you need it. A hidden OS also has all the sensitive data leaks
inherent with any OS. So, instead of anti-forensic techniques or saying, "opps, I
forgot the password", you can view all sensitive material in the hidden OS and not
worry about anything sensitive being leaked (paging, recent file lists, db files,
caching, etc). Remember this: if you are forced to give the encryption key, you can
do so whilst keeping your hidden container hidden which is the main advantage of a
hidden container.
You can also use programs such as PGP or GPG (GPG being a free replacement for PGP)
to securely encrypt data or messages which are both programs that are mainly
intended for asymmetric encryption, but will work for our purposes. Notice that I
said they are used to encrypt data and messages; they cannot be used like Truecrypt
to encrypt entire drives, partition, or used to create encrypted containers. And
like I said above, they are subject to the same problem when exchanging the key.
The key still must be sent in clear text.
The simplest command line switch for encrypting a file with GPG (assuming you have
GPG installed and have the command prompt open) is this: gpg -c inputfile.ext.
Let break this down a bit. Gpg is the name of the program; so you are telling the
computer to open the program GPG. The –c is telling the program that you want to
use the abbreviation for --symmetric. Finally, the inputfile.ext (replace ext with
the file extension), tells the program that you want to encrypt the inputfile.ext
file on your computer. Now when you look in the same directly you will see the
same file with a new file with the same name and extension, but with a .gpg added
to the end. So, for example, the new encrypted file name will be
inputfile.ext.gpg.
Decrypting the file using symmetric encryption is as easy as putting the file on
your computer and telling the program to decrypt it. The command line switch for
the decryption process is similar to the encryption process. The decrypt a file,
you must use GPG and enter this: gpg --decrypt inputfile.ext.gpg. The program will
then recognize it used symmetric encryption and will ask for the key to decrypt it.
Again, the key to encrypt the file is the same key you will now use to decrypt the
file. You should also know that when encrypting the file, the program GPG does
nothing to the clear text file. So it is still sitting on your computer and can be
read by anybody who gains access to it. Deleting a file securely will be discussed
later on.
When you originally encrypt the file you will notice that the output looks like a
bunch of gibberish. To combat this GPG as a command option for ASCII Armor output.
When GPG originally encryption message without the ASCII armor output you are
saying that is called the binary output. Binary output is machine-readable but we
cannot make sense of it. ASCII armor ensures that the only characters used are
ASCII characters so they can be read easily. For example, if I want to encrypt
data using the symmetric algorithm with the armor output I would put in the command
as followed: gpg -ac. The “a” generates the armor output and the –c, as above,
specifies that want to use the symmetric algorithm. Using this switch will specify
a message manually within the command prompt as no input file is specified. When
you are done you will have to enter an ‘end-of-file’ sequence). On Windows: press
Enter, then ctrl-z, then Enter. On OS X/Linux: press Enter, then ctrl-d. Pressing
ctrl-c (“abort”) quits GnuPG without executing any command.
The problem with symmetric encryption is that it only uses one password to encrypt
and decrypt data. But what if you wanted to send a message to somebody? Somehow,
you will need to share the key while reducing the risk of anyone being able to
intercept the password and use it to decrypt the data. Asymmetric encryption
tackles this problem by implementing a secure key exchange. With this form of
encryption there are two keys used, a public key and a private key. The public key
is given to the world and is used to encrypt data whereas the private key is used
to decrypt the data and to verify the data being received is legitimate. A popular
program to securely share data and messages between two people (using asymmetric
encryption) is PGP or GPG (GPG being a free replacement for PGP). For the purposes
of this guide, I will be using GPG, the free replacement for PGP.
First things first, exchanging the public so someone who wants to give you a
message can secure the data before sending it to you. Assuming that you both have
GPG installed on your machines, you can use the Try it out – create GPG key example
to create, export, and exchange your public keys. The public key is only used to
encrypt data. So for an attacker to decrypt data, they must have your private key.
Once the initial public key exchange is done you can now securely exchange data.
You will also notice that I used the armor output option so when I want to exchange
my public key via email or form, it can easily be copied by the recipient trying to
import it. You should only give out your public key, and never your private key.
It is best to keep your key pairs on an encrypted drive. If someone obtains your
private key they will be able to read all encrypted messages intended for you. If
compromised, create a new private and public key pair and give out your new public
key. Also note, that your key pair comes with an expiration date if specified.
Once the expiration date is reached, people can no longer send you encrypted
messages using that expired public-key.
When you give someone the message - or key or signature - you want to copy all
the text including everything you see in the example above.
Now that you have created your own key pair and imported someone else’s, you can
start encrypting and decrypting data respectively. You can follow the Try it out –
Encrypting and decrypting a message/file to learn how to encrypt and decrypt a
file. I will elaborate on how that works a little more. To begin, you will use
gpg to start the program GPG and –e to tell the program that you want to use the
asymmetric encryption versus the symmetric encryption (-c) as used before.
--output "output file" is the name of the output file that will contain the
encrypted data. --local-user "your username" is the name of the user that the
message is coming from (in this case, you). -r "recipient" is the person whom you
are sending the data to, --armor specifies the program to use the ASCII armor
output, and --sign clear.txt will create a signature file. Given a signed
document, you can either check the signature or check the signature and recover the
original document.
For Windows (since this is a Windows guide), I recommend downloading and installing
Gpg4win. If you are using Linux you can simply use gpg and stick with command
line. Here is a guide from their website on how to install the program:
http://gpg4win.de/handbuecher/novices_5.html. When Gpg4win is installed, follow
these steps to create your key pair for encryption/decryption (note: the following
instructions are for creating a key size of 4096 which I recommend. You can create
a 2048bit encryption key using the program Kleopatra):
Start the command prompt: Start > Run > cmd > OK *Windows Vista/7, type cmd in
Search Programs and Features. A black box should pop up.
Type in gpg --gen-key
Enter 1 and press Enter
The default key is 2048, I recommend 4096
Set the value to 0 here. If you set the key to expire, you will need to go
through this same process of creating and redistributing your public keys
When is asks for a confirmation, enter y
Your real name will most likely be your screenname. I will enter missionman
here
For this step, input an email address. For this I entered my tormail email
address.
Enter a comment if you wish, this step is optional
If you wish to change something, now is the time to do it. Everything is
correct and I am done so I will enter o
At this point you should see a popup prompting you to create a secret key.
This is also referred to as a private key. Make sure when creating this password
that it conforms to strong password guidelines
Re-enter the password to confirm you entered it correctly
You will now want to type a lot of random data in a text program of your choice
or move your mouse around the screen so the key can be generated until the key
generation is complete
If there are no errors, then you have successfully created your public and
private key!
Now, to give people your Public key (which they use to encrypt data they want
to send to you) you will type in gpg --export -a 'username' > 'location'. For
example I typed in gpg --export -a missionman > c:\missionman.key
When people want to add the key, they can either use the program Kleopatra that
was installed or they can type in gpg --import 'keyfile'. To import mine for
example you would download my key file (or copy the contents to a file and save it)
and type in gpg --import missionman.key (you can get mine here:
http://xqz3u5drneuzhaeo.onion/users/missionman/pubickey.txt
First, find the location of your file or save a message to a text document
The command to encrypt a file is gpg -e --output "output file" --local-user
"your username" -r "recipient" --armor --sign"filename". For example, I typed in
gpg -e --output C:\encrypted.txt --local-user missionman -r testuser --armor --sign
clear.txt
To decrypt a file you will simply enter gpg-d --local-user "username" -o
"output file" "input file". For example, I entered gpg-d --local-user missionman -
o C:\decrypted.txt C:\encrypted.txt
Note: If you want people to send you messages or files, you will give out your
PUBLIC key. NEVER GIVE OUT YOUR PRIVATE KEY, EVER! Also, make sure that nobody
steals your private key; keep it on an encrypted drive. You can exchange public
keys or data either via in a file, or plain text in a forum. --armor specifies the
output is easily copied when you copy the text versus sending the file and --sign
attaches a digital signature so the receiver knows it is coming from you. Here is a
good site with some of the common commands:
http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html
One final word about signatures is the usability of them to verify packages
downloaded from the internet. You will notice that there are usually two types of
verification options: signature files and hash outputs. Verifying the packages
that you download from the internet establishes that the package you have on your
computer was not altered in any way during transit. To verify a package, you will
follow the same process of using the vendors Public key and signature file (or just
verify the file if the signature is not detached) and using the --verify option as
used above. Using the hash verification, you will need to create a hash output of
the downloaded file and compare it to the hash specified from the vendor. You can
read more about hashing below.
Much like anything, you want to make sure that you are keeping up with the
encryption standards today. This means that using the new algorithms to replace to
older ones. As a real world example, there are leaked documents claiming the NSA
(National Security Agency) paid RSA $10,000,000USD to have a backdoor planted
inside Elliptical Curve Cryptography (ECC) algorithms. Products such as Tor were
affected and should be update to defeat these attacks.
One-Time pad[/u]
I wanted a section on OTP’s, however, I did not want to give it a full number
besides its name. You might notice that most of this information is taken directly
from Wikipedia; the reason is that I did not want to reinvent the wheel in sharing
this information. In cryptography, the one-time pad (OTP) is a type of encryption
that is impossible to crack if used correctly. Each bit or character from the
plaintext is encrypted by a modular addition with a bit or character from a secret
random key (or pad) of the same length as the plaintext, resulting in a ciphertext.
If the key is truly random, at least as long as the plaintext, never reused in
whole or part, and kept secret, the ciphertext will be impossible to decrypt or
break without knowing the key. Saying that, this form of encryption is the most
secure form of encryption out there.
One popular method is implementation, is the XOR method, which is often used to
combine the plaintext and the key elements, and is especially attractive on
computers since it is usually a native machine instruction and is therefore very
fast. However, ensuring that the key material is actually random, is used only
once, never becomes known to the opposition, and is completely destroyed after use
is hard to do. The XOR method operates according to this principle:
A θ 0 = A,
A θ A = 0,
(A θ B) θ C = A θ (B θ C),
(B θ A) θ A = B θ 0 = B
Now, you are probably wondering to yourself, “What does that even mean?” Let me
explain. The θ denotes the exclusive disjunction (XOR) operation which can be used
on every character in the plaintext string using a given key. To decrypt the
output, the same process is used and the cipher will be converted back to
plaintext. Below is an example on how the XOR operation is used. You will notice
that 0 + 0 and 1 + 1 return the output of 0 whereas 1 + 0 and 0 + 1 returns the
output of 1. The string below, "Wiki" (01010111 01101001 01101011 01101001 in 8-
bit ASCII), can be encrypted with the repeating key 11110011 as follows:
3.4 Steganography
Another good form of encryption is steganography which is the act of hiding data
within text, graphic files, or audio files. The purpose of this method is nobody
will know that there is a private message inside the median (photo, document, etc.)
because it is hidden. Let's say Bob wants to send private messages to Steve over a
public forum read by numerous people. Bob grabs a picture, puts a hidden message
inside and uploads it to the website. Nobody knows the message is there except for
Steve, which is able to save the picture to his computer and read the message
hidden inside. Forensic examiners will need to be looking at each individual file
to determine if steganography was used. So for example if you have 1000 pictures,
they will need to go through each and every one to determine which ones have
steganography and which ones do not.
To show how easy steganography is, I started out by downloading one of the more
popular freeware tools out now: F5, then moved to a tool called SecurEngine, which
hides text files within larger text files, and lastly a tool that hides files in
MP3s called MP3Stego. I also tested one commercial steganography product, Steganos
Suite. These tools may contain backdoors as with all encryption programs therefor
should not be used with data you are trying to hide from any party that may hold
the decryption key.
There are several types of authentication factors when accessing resources, and
most of you have only been using one of them. In the security field they are
referred to something you know, something you have, and something you are. A
username and password falls into the something you know category. This is because
you know in your mind what your username and password is. Something you have is a
physical device such as a smart card or token. Finally, something you are refers
to a fingerprint, an iris scan, or another physical feature.
The idea behind “something you know” is keeping a secret that only you know. Thus,
knowledge of a secret distinguishes you from all other individuals. And the
authentication system simply needs to check to see if the person claiming to be you
knows the secret. This method is also used between two or more persons to verify
they are whom they claim to be. This is often called challenge-response
authentication and even though it is moreso used as a token, it can be used between
several people.
If you have ever watched the movie “Bourne Ultimatum” you have already seen this in
action. Halfway during the movie, one of that characters is presented with a
Duress Challenge in which she is asked a question and depending on the response,
she is either normal or under duress. Such the same, many people can create a
similar model of authentication that moves past a simple password that can convey
duress as well as authenticate the user. For example, in the movie the challenge
word was sparrow and the response if under duress is “ruby” and the response if
normal was “Everest”.
Let’s say that you want to log into a system and use a detached token. You will
most likely be given a set of characters to input into the system to verify that
you are whom you say you are. So, you fire up the token and request you one-time
pin code. The server that generates the code will load up the list and select a
set of characters from the tables. In this example, we will say the challenge are
the characters H, G, A, I, P, and S (yellow). Your token will then generate a
response of J, I, C, K, R, and U (red). The server will then verify that the
response the token created matches up to the response the server expects. Once
this is complete, the server will allow you into whatever system you were trying to
access.
For most users reading this guide, you will only need to concern yourself with
setting up more than one factor when using TrueCrypt. Most of you are only use a
password, which is adequate for most scenarios, and is what most people use in
general. But another feature of TrueCrypt that most people don’t realize is that
it does allow for multifactor authentication. This means that you can set up
Truecrypt to utilize both a password and a keyfile (or token or smartcard) when
logging into the system. The link provided will elaborate more on key files,
security tokens, and smart cards when using TrueCrypt: Click here.
The go back to the beginning, I told you that using multiple authentication factors
are best practice, but you might be wondering to yourself, “why?” Two or more
factors further ensures that the protection of your data does not rely on a single
factor alone. For example, let’s say you have a machine that’s encrypted with
TrueCrypt. You know that the encryption employed by TrueCrypt is strong, however,
you created a password that is weak and easily guessed. This is where the
multifactor authentication comes in. The attacker might have guessed your password
but if you have another factor such as a token, the attacker will also have to have
access to that token during the entire session in order for them to get in.
Another method of attack is with the use of spyware, which is a type of maleware
that attempts to spy on you by recording everything you do on the computer. Such
the same, hardware keyloggers (which can be in the form of spyware), attempts to
record everything that you type in on a keyboard. If successful, a keylogger will
capture your password that can be used later on for an attack. To mitigate this
type of threat, you will once again rely on multifactor authentication to
authenticate you into the system. And for additional security, you can check for
new hardware devices attached to your computer and make sure that you use some sort
of anti-virus software to mitigate the threat of software installations.
There are several types of password attacks that people perform when trying to
decrypt informat and ion. These are known as dictionary attacks, brute force
attacks, and random guess attacks. Creating complex passwords will help prevent
against dictionary attacks. Creating long passwords will help prevent against
brute force attacks. And creating passwords that do not include your username or
any other identifiable information will help against random guess attacks. This is
why your password should be long, complex, and should not include any identifiable
information.
Another common attack that people do not usually think of is account recovery
attacks. This is when someone is trying to login into your account by attempting
to reset your password by using your account recovery questions. For this reason
you should make sure when creating security questions and answers that they are not
easily guessed or found. A good recommendation is to make the answers as
complicated as the passwords, but still can be easily remembered.
Case: The Sarah Palin email hack occurred on September 16, 2008, during the 2008
United States presidential election campaign when the Yahoo! personal email account
of vice presidential candidate Sarah Palin was subjected to unauthorized access.
The hacker, David Kernell, had obtained access to Palin's account by looking up
biographical details such as her high school and birthdate and using Yahoo!'s
account recovery for forgotten passwords.
The problem with passwords is they are usually too easy to crack or they are too
hard for the users to remember. Therefore, both of these problems should be
considered when creating a new password. Start by creating a password that is at
least 16 characters. Use as many different types of characters as possible,
including: lowercase letters, uppercase letters, numbers, and symbols. Never reuse
a previous password and never use the same password for more than one account.
Don't use password-storage tools, whether software or hardware. Make sure that your
password does not include anything identifiable such as: names, usernames, pet
names, or words in a dictionary. Lastly, make sure that the password is not too
hard for you to remember so you don't forget the password or have to write it down
or save it. Here is an example of a site that can create a secure password:
http://www.pctools.com/guides/password/.
When people refer to hashing, they are referring to a type of encryption. Hashing
is the process of creating an encrypted output that cannot be decrypted (it
performs a one-way encryption) and is used to ensure that a message or file was not
modified from the original copy. Hashing is also commonly used to help
authenticate somebody. For example, many websites store a hashed copy of your
password instead of the password in the clear. There are several types of hashing
algorithms and the newer versions are better than the outdated versions for
security purposes. SHA256 is the newest version and is recommended as of right now
when you are checking file or message hashes.
Also, you should know that since there are several types of encryption methods, you
need to specify which hash algorithm you want to use when verifying data. The
newer the algorithm, the better chances you have of mitigating the eventuality of
hash collision. Adding to what we talked about earlier about asymmetric
encryption, when you create a file signature for the recipient to verify the
contents they receive; they are actually decrypting the hash value of the data for
verification. So in essence, the same process for verifying the contents are the
same, with the added benefit of verifying the sender and the file when using
asymmetric encryption.
Another good method of ensuring that a file is actually sent from someone who
claims they sent it is if they digitally sign a message using their private key.
What you need to know is that you can digitally sign a message or file without
actually sending the message or file. This is helpful if you want to share a file
in which everybody knows what the password is whilst allowing them to confirm that
it came from you.
I am assuming that have already setup GPG and have created your Private/Public
key pair
Start the command prompt: Start > Run > cmd > OK *Windows Vista/7, type cmd in
Search Programs and Features. A black box should pop up
The command to create a digital signature is gpg --output "output file"
--local-user "user name" --detach-sign "input file". For example, I typed in gpg
--output final.sig --local-user missionman --detach-sign test.txt
To verify the digital signature, type gpg --verify "signature" "file name".
For example, I typed in gpg --verify final.sig c:\test.txt
To simplify what I just said, cold boot attacks work like this. After you turn off
your computer, RAM isn't automatically erased when it no longer has power. Instead,
RAM degrades over time, and even after a few seconds without power, you still can
recover a significant amount of data. Researchers also found that if you chill the
RAM first, using liquid nitrogen or even a can of compressed air turned upside
down, you can preserve the RAM state for more than 30 seconds up to minutes at a
time—more than enough time to remove the RAM physically from a machine and place it
in another computer. Once inside another computer, an investigator can use that
data that is temporarily stored inside the RAM and read it.
There are a few ways to mitigate this risk. The best method is to make sure to
dismount the drive before ending the program or shutting the computer down. Most
software programs will erase the key from memory after you perform this action.
This method is the best way to prevent cold boot attacks. Shutting the computer
down cleanly should also ensure that the key is erased from memory. Another
mitigation technique is with using a security token or smart card. This can be
fooled though if the attacker grabs the key and has the token/smart card in hand.
I should mention that while cold boot attacks are present, grabbing an encryption
key from RAM is not widely used by many forensic investigators. Until recently,
grabbing these keys via RAM was thought of only as a theory and not actually
accomplishable. However, there is other data that you should be concerned with
cold boot attacks. Data such as unwritten emails, words in a test document, and
pictures can be recovered from RAM. Even if it is partial data, it can be read and
used against you.
If you are interested in obtaining data contained in RAM, there are several
programs out there that can assist you. Most of these programs are not free and do
not come with any sort of trail. You can utilize these programs after you freeze
the RAM and insert it into another machine that hosts the RAM analyzer. You may
use the same programs to Image the RAM on your own machine and you would use after
freezing and moving the RAM over. There are also Key-scanning tools that is the
second set of tools that you can use to scan the RAM image you have created for
encryption keys. The names of the tools are pretty self-explanatory. The aeskeyfind
tool searches for AES keys, and the rsakeyfind tool searches for RSA keys. Note:
AES is symmetric encryption and RSA is an asymmetric encryption.
4. Data
This section will talk about data in general: how it gets stored and what happens
when it is deleted. Furthermore, we will take about recent file lists and data
caching. Knowing how Windows and other applications handle these files will help
eliminate the risks associated with evidence left over after your session. You
will learn how to find and remove this data completely and securely from your
computer. In some instances, you will also learn how to prevent these risks from
happening altogether.
In this section, we will mainly be focusing on NTFS drives. I am not saying that
the following information does not apply to XP or earlier, it just does not ALL
apply to what we are talking about. Among improvements in NTFS file systems are
increased file size potential (roughly 16TB versus 4GB for FAT32), increased volume
size potential (roughly 256TB versus 2TB for FAT32), and the recording of Last
Accessed times (in Windows NT/2k/ XP/2k3, and in Vista/2k8/7 if enabled). In
addition, NTFS uses a data structure called the Master File Table (MFT) and entries
called index attributes instead of a file allocation table (FAT) and folder entries
in order to make the access and organization of data more efficient.
A common misconception that computer users have is, when you delete a file, it is
completely removed from the hard disk. However, you should know that highly
sensitive files such as pictures, passwords, chat logs, and so forth still remain
on the hard disk. Even after they are deleted from your recycle bin, they are
still located on the hard drive and can be retrieved with the right software. Take
for example when you use WinRAR to extract the file that someone sent you. The
program extracts the data to a temporary file before it reaches its destination on
your hard disk; this may lead to a data leak.
Any time that a file is deleted from a hard drive, it is not erased. When you
delete a file, the two bytes located at record offset 22 within the file’s MFT
record are changed from \x01\x00 (allocated file) to \x00\x00 (unallocated file).
The operating system uses these pointers to build the directory tree structure (the
file allocation table), which consists of the pointers for every other file on the
hard drive. When the pointers are changed, the file essentially becomes invisible
to the operating system. The file still exists; the operating system is just ready
write over them. You should also know that the deleted file’s entry is removed
from its parent index, and the file system metadata (i.e., Last Written, Last
Accessed, Entry Modified) for the file’s parent folder are updated. It is also
possible that the metadata for the deleted file itself may be updated because of
how the user interacted with the file in order to delete it (e.g., right-clicking
on the file).
There is another process when a file is deleted and is sent to the recycle bin.
Post Windows Vista (XP, 95, etc.), when a file is sent to the recycle bin, a record
in the INFO2 file is created. Starting with Windows Vista, Microsoft went away
with the INFO2 file in favor of a new method of storing deleted data. Below is a
table that shows where each record is located. Note that the <User SID>, or
Security Identifier, is the unique identifier for each user on the machine. You
can find your SID by following the steps in section 6.1 Disable Unnecessary
Accounts. *Remember though, you do not need to delete the key from the registry.
I will not be getting into the actual process of examining the INFO2 files or the
newest file format for Windows Vista on forward. Rather, I will give a very brief
overview of what to expect when examining these two formats. Starting with INFO2,
when a file is moved to the Recycle Bin, it is typically renamed to DC#.EXT, where
“#” is an integer and “EXT” is the original file’s extension. The only thing that
you really need to know, is that when you remove an individual file from the
recycle bin, the file details are not removed from the INFO2 file. Instead, it is
simply marked as deleted to avoid the process of rebuilding the INFO2 file. It is
only when you completely empty the deleted files does the INFO2 file go away.
Moving along to Windows Vista, 7, and 8, Windows has significantly changed how the
files and corresponding details are represented when sent to the recycle bin. As
the table above illustrates, the new format still involves using the users SID but
are now found in the C:\$Recycle.Bin\<USER SID>\ directory. In this new format,
where Vista on forward begins to handle deleted files differently is that a deleted
file is renamed to $R, followed by a series of six random characters and then the
original file extension. Then a second file is created of the same name, with $1
instead of $R, containing information similar to that contained within the INFO2
file. However, this file contains only the original filename, the file’s original
size, and the data/time the file was deleted.
Shadow data is the fringe data that remains on the physical track of storage media
after it is deleted, sweeped, or scrubbed. A mechanical device called a head is
used to write the data, and it is stored electronically in magnetic patterns of
ones and zeros. The patterns are in the form of sectors which are written
consecutively in concentric rings called tracks. However, head alignment is just a
little bit different each time an attempt is made to erase data, and data remnants
sometimes bleed over the tracks. This is the reason why government agencies require
multiple scrubs or burning, because there is no guarantee of complete elimination
of fringe, or shadow, data.
The only way that you can permanently delete this data is to override it with
special software or wait for the operating system to overwrite the data. There are
files on the hard disk that do not have any pointers in the file allocation table
so it will eventually be overridden with something new. Even files that are
fragmented or are partially written over are recoverable and can be used against
you. Special software will overwrite these files securely and immediately. One
such recommended software that securely cleans the white space is CCleaner and
Recuva to erase the actual data left over. As a word of note, people suggest
that's simply defragging a hard drive will overwrite these pointers; this is not
true. Drives formatted using NTFS are especially not affected using this method.
This is because of the way NTFS stores data; it essentially makes defragging the
hard drive useless.
As mentioned before, when you delete data, it is not actually deleted and can be
easily recovered. To prevent data from being recovered you must secure erase (or
shred) the data. What special programs do to securely erase contents from a
computer is they enumerate through each bit of data and replace it with a random
bit. The shredding method I recommend is 7 passes. This process makes the bits
unknown as recovery of this data difficult, if not impossible. This can be done
with file eraser programs, or it can be done to the entire drive with bootable
software. DBAN is recommended if you are trying to erase your entire drive. Note
however, DBAN does not erase bad sectors or HPA/DCO areas. Some programs such as
Blancco implement HPA/DCO wiping by default, other tools could allow the user to
choose whether or not to wipe HPA/DCO while other tools are not able to wipe
HPA/DCO at all.
HPA stands for Host Protected Area and is a section of the hard drive that is
hidden for the operating system and the user. The HPA is often used by
manufacturers to hide a maintenance and recovery system for the computer. For this
reason, the HPA is not a big concern, but you can securely remove data here
nonetheless. A DCO is a Device Configuration Overlay and is another hidden area of
today’s hard drives. Similar to the HPA, the DCOs can be securely erased in such
the same way.
While recovery of information wiped out in this manner is far more difficult, and
in many cases impossible, some recovery techniques exist that specialists can
employ to retrieve some of the data. Factors such as the size of the hard drive,
the accuracy of the mechanical system in the drive, the power with which the
information was recorded, and even the length of time the information was left on
the drive prior to wiping all will have an effect on the probabilities for
recovery.
To understand file slack, one first needs to understand how disks are organized at
the lowest level. As can be seen in the diagram below, disks are subdivided into a
set of tracks. These tracks are further subdivided into a set of sectors and
collection of sectors form together to make a cluster. If you write a 1 KB file
that has a cluster size of 4 KB, the last 3 KB is wasted. This unused space
between the logical end-of-file and the physical end-of-file is known as slack
space.
The perhaps somewhat unexpected consequence from this is that the file slack
contains whatever data was on the disk before the cluster was allocated, such as
data from previously deleted files. Using file slack, it would be possible not only
to recover previously discarded (and potentially sensitive information)
information, but also to effectively hide data. The ability to hide data arises
because the operating system does not modify data within a cluster once it has been
allocated. This means that any data that is stored in the slack is safe (provided
the files size does not change). Using forensics examiner software such as EnCase
or FTK, an investigator can recover this data contained in slack space.
To wipe this slack space, I use a software called “Eraser” which has utilities to
wipe unallocated file space and slack space disk. I recommend utilizing the 3 pass
method to ensure that no shadow data exists after the process is complete. You
will notice after running the program to remove the slack space, that your secret
message you just entered is erased.
Open Microsoft Office and create a .Doc file. Enter anything you like.
Download and install your favorite Hex Editor. I Hex Workshop Hex Editor is a
good one and will fulfill our purpose for this example.
Start the program. I will be covering the steps when using Hex Workshop.
Select the file that you just created and load it in the program. The hex
output will appear in the main portion of the screen
Once the file opens, click on Edit/Find to open the Find dialog box.
In the Find dialog box, click on the drop-down box next to “Type:” and select
“Text String.” Enter the part of the text you entered in the first step.
On the right side of the screen, navigate to a blank line and remember that
position. On the blank line, type a secret message.
Click on File/Save As and save the file to whatever you want (IMPORTANT: Save
as Word 97-2003 format)
Close Hex Workshop and open MS-Word
In MS-Word, open the new file you just created in the Hex Workshop
Confirm that your hidden message is not visible within MS-Word
Let’s start with the basics, hiding a text file within a text file:
So, now you have successfully hidden two files from view! But that is only the
beginning as there are many more nifty features that can be used on the NTFS
system. For the next example, we will be hiding executable files within a text
file that can be run using the start command. This method is actually not much
harder than then the method above:
Finally, the last thing we will talk about is hiding videos in ADS’s. This
method is the same as the above methods, however you will need to call the actual
video player to play the videos.
HPA: Host Protected Area is an area of a hard drive that is not normally
visible to an operating system and is protected from user activity. To hide data
there, you will need to write a program, or find a program, to write information
there.
MBR: The Master Boot Record only requires a single sector thereby leaving
62 open sectors for hiding data
Partition slack: File systems store data in block, which are made of
sectors. If the total number of sectors in a partition is not a multiple of the
block size, there will be some sectors at the end of the partition that cannot be
accessed by the operating system using any typical means.
Volume slack: If the partitions on a hard drive do not use up all of the
available space, the remaining area cannot be accessed by the operating system by
conventional means (e.g., through Windows Explorer). This wasted space is called
volume. It is possible to create two or more partitions, put some data into them,
and then delete one of the partitions. Since deleting the partition does not
actually delete the data, that data is now hidden.
File slack: This is the unused space between the end-of-file marker and the
end of the hard drive cluster in which the file is stored.
Unallocated space: Any space in a partition not currently allocated to a
particular cannot be accessed by the operating system. Until that space has been
allocated to a file, it could contain hidden data.
Boot Sector in non-bootable partitions: Every partition contains a boot
sector, even if that partition is not bootable. The boot sectors in non-bootable
partitions are available to hide data.
Good blocks marked as bad: It is possible to manipulate the file system
metadata that identifies bad blocks (e.g. the File Allocation Table in a FAT file
system or $BadClus in NTFS) so that usable blocks are marked as bad and therefore
will no longer be accessed by the operating system. Such metadata will produce
blocks that can store hidden data.
Major forensic software use two methods for identifying file types: file
extensions (.exe, .jpg, .txt) and file headers (characters at the beginning of the
file). A person trying to hide an image might simply change the extension from
.jpg to .zip to try to fool an investigator. Most people will try to open the
file, but they will encounter an error and they will probably move on to the next
file. As this method might work on somebody whom doesn’t have specialized software
to view the header information, it doesn’t fool those whom use products such as
EnCase. This is because, as I said before, there is another method to determine to
type of file they are reviewing. Yet, if the file extension and the header
information matches, they might look over the file completely as it might not be
the file type they are looking for.
When forensic investigator looks at a file that has a mismatch between the
extension and the file header, he might get suspicious and further investigate the
discrepancy. For this reason it is important to change both file extension and
header information to match. By changing this information, you can effectively
hide whatever it is you are trying to hide. You should note however, if an
investigator opens the file with the correct program, he will still be able to view
the contents of the file. For example, you can change a .jpg’s extension and
header information to a .txt, but if the file is opened in Picture Viewer, you will
still be able to see the picture.
First things first: change the file’s extension. For this example, we will be
changing a .rar to an .exe. So find a .rar file on your machine and change the
extension to exe. This part is the easiest part and can be done in only a few
seconds:
Start Windows Explorer and navigate to the folder that contains the file
you wish to hide
If you do not see the file extensions, you might have to change a setting
to view them. For XP and 7, you will click Tools > Folder Options > View and
uncheck Hide extensions for known file types
Once you can see the file extension, you can now right-click the file and
click Rename to change the file extension
I should also note that for the first couple of times before you feel
comfortable testing this out on your own, to use a file that you don’t want or to
create a copy of a file to test this on. The next part is to change the header
information of the same file you just changed the extension for. This is done with
a program that you can freely download over the internet. For this example, I am
using HxD Hex Editor and can be downloaded from here and modifying a .rar file.
Open HxD Hex Editor, click File > Open, select the file, and click Open
You will notice that the hex view shows the file header for .rar files are
52 61 72 21 in hexadecimal and Rar! In ASCII (Figure 1). This is the information
you are going to change
Click you cursor right before the first hexadecimal character on the left,
the 5. Now, when you start typing, the new characters will replace the existing
characters and they will appear red
To change the file signature of this RAR archive we simply take the file
signature of an executable file and add it to the start of this file. In this case
I will add 4D 5A to the start of the file (Figure 2)
Save the file
This technique will fool the forensics software as it will not return the file
when it is looking for .RAR files. However, even though you change the file type,
you may not be able to fool the investigator depending on when is contained inside
the file. Changing .doc or .docx files to .jpegs for example might not be the best
idea in the world as they can still see all the text contained within the document.
.RAR files might also contain the filename even though encryption is enabled if
Encrypt file names is not used.
4.8 Windows Swap Files, ReadyBoost, Temporary Internet Files and Browser
Cache
A swap file allows an operating system to use hard disk space to simulate extra
memory. When the system runs low on memory, it swaps a section of RAM that an idle
program is using onto the hard disk to free up memory for other programs. Then when
you go back to the swapped out program, it changes places with another program in
RAM. This feature ensures that Windows is usable when memory runs out. Even though
this feature is helpful, sensitive information might be contained within the swap
space that could incriminate you.
Let's say you download sensitive material and after you were done with it, you
delete it securely. If you ran out of memory (RAM) the temporary data might have
been saved to swap space thereby rendering your method of removing the file
useless. The best way to attack this problem is to disable paging altogether
while viewing sensitive information. If you are using applications that use large
amounts of memory, you can turn paging back on during your session.
Another way that Windows operates under the surface is when creating temporary
internet files. Temporary Internet Files is a folder on Microsoft Windows which
holds browser caches. The directory is used by Internet Explorer and other web
browsers to cache pages and other multimedia content, such as video and audio
files, from websites visited by the user. This allows such websites to load more
quickly the next time they are visited. Not only web browsers access the directory
to read or write, but also Windows Explorer and Windows Desktop Search.
You can see how this is a problem if you ever want to download (or view)
pictures or files that contain sensitive material. Furthermore, other applications
might use temporary files when handling content. For example, when I talked about
WinRAR earlier, I explained that when you unpack data from an archive, the program
creates a temporary file on your file system before it is moved to its destination.
The only way around this (excluding internet cache) is to periodically wipe slack
data as stated before. When dealing with internet data, you should be concerned
with deleting internet cache and cookies. More information can be found here:
http://support26v5pvkg6.onion/index.php?topic=1046.0
Note: There are several other vulnerabilities that you need to be aware of
concerning web browsers. I will not be covering those in this security guide and
they have been thoroughly explained in another.
Note 2: You can change the location where WinRAR extracts the temporary data
to. Navigate to Options > Settings > Paths. You can change the path under Folder
for temporary files.
Every time you open up a file from Windows Explorer or the Open/Save dialog
box, the name of the file is recorded by Windows. This feature was introduced
into Windows and other applications to make those applications more user friendly
by allowing easy access to those recently used files. Such the same, some
applications create cache that is stored on your computer so the application can
run faster the next time it is loaded or a specific project is being worked on.
Recent file lists and application caching does make the experience more
friendly, but it also added security risks. If for example, someone took a video
and loaded it into a video editing software. The software might take pieces of the
video and save it to your hard drive for fast access. The same goes for viewing
videos/images that are sensitive by nature. Whoever is looking at the recent files
list for your computer, will know what the names of files are as well as possibly
knowing the location of those files.
Windows 7 and Vista saves all the thumbnails in a central location. The cache
is stored at %userprofile%\ AppData \Local \Microsoft \Windows \Explorer as a
number of files with the label thumbcache_xxx.db (numbered by size); as well as an
index used to find thumbnails in each database. This makes it easier for us to
locate and remove the caches of these thumbnails. You can use CCleaner to remove
the existing cache. I recommend using this page to enable/disable thumbnail
caching. Click here
Jump Lists appear on the Start menu as well as on the Taskbar when you right-
click on an icon. You can use it to perform specific actions, but for security
purposes, it can record files that were recently opened.
CCleaner erases most all (if not all) of the recent file lists for Windows as
well as for a few other applications. Listed below are common locations where
these recent file lists and application caches can be found at (I would look into
winapp2.ini for more locations which is an add-on for CCleaner):
Registry:
(Windows) Software\Microsoft\ Windows\CurrentVersion\Explorer\ RecentDocs
(Windows) Software\Microsoft\ Windows\CurrentVersion\Explorer\
ComDlg32\OpenSaveMRU
(Windows) Software\Microsoft\ Windows\CurrentVersion\Explorer\ RunMRU
(Windows) Software\Microsoft\MediaPlayer\Player
(Windows) Software\Microsoft\ Internet Explorer\TypedURLs
(Media Player Classic) Software\Gabest\Media Player Classic\Recent File
List
(Media Player Classic) Software\Gabest\Media Player Classic\Settings
Files:
(Recent file list) %appdata%\Microsoft\Windows\Recent
(Jump list) C:\Users\<user
name>\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations
(Temp data – Vista/7) C:\Users\<user name>\AppData\Local\Temp
(Temp data – XP) C:\Documents and Settings\<user name>\Local
Settings\temp
Note: Note: Other applications include PrivaZer for Windows and Bleachbit for
Linux.
Another thing I do is set CCleaner to perform a clean when the user logs into
the machine and every hour thereafter. Cleaning your computer automatically will
help with managing this program as you will not have to remember to manually run
the program every so often. One drawback with this method however is if an
application is using temporary data that is erased by CCleaner, the application
might perform incorrectly or stop working altogether.
Finally, for those of you who switched to Windows 8 should know about the app
data. Windows 8 for starters has made significant strides over Windows 7 in
respects to the interface. They have added the Metro interface which hosts a
plethora of apps that can possibly leak important data. Two such apps are the
Windows Photos and Windows Video. When viewing a photo or video, you can
immediately see that the photo or video cap is cached as they are still apparent
even after the material is deleted. Obviously, you can see the glaring issue with
this when it concerns security.
I have not too much research on the matter, so I am going to be brief. For
starters, all your apps are located in your appdata folder. Specifically, the
folder paths are as follows (per user settings):
When the app is closed the cached images no longer appear on the Metro
interface. Furthermore, the cached images don't appear when you open the app
again. I did some more investigating into Windows Photos and notice that several
files get increasingly larger after I view images in the Windows Photos app –
even after the app is closed. Specifically, those files are the
Microsoft.WindowsLive.ModernPhotos.etl, Microsoft.WindowsLive.ModernPhotosLast.etl,
and ModernPhoto.edb. Other files exist that show the last 5 images that were
cycled through on the Windows Photos Metro app. These files are LargeTile1(through
5) and SmallTile1(through 5). The latter files should not be an issue unless they
contained sensitive images.
I cannot read what is actually contained within the files themselves, but I can
be reasonably sure that with everything Windows, image previews are being cached
and stored to limit I/O usage and speed up the loading process. Saying this, it is
recommended that you delete these files securely if you accidently – or purposely
– open pictures using the Windows Pictures app (and it is going to happen, trust
me). To do this you should close the Pictures app (from the gesture on the left
side or the task manager) and securely erase those files using a program of choice.
When setting up a user profile in Windows 8, if you gave your actual name when
creating the Hotmail profile you used when logging into Windows 8, that name will
be automatically embedded as metadata in a variety of documents. So make sure that
you have a metadata cleaner if you plan on uploading anything sensitive. If you
use Bing which is the default search provider and included pre-installed as an app,
you should know that Bing creates a separate web history of its own and stored the
data over the internet. So make sure that anything sensitive gets purged. People
also expressed concerns with ReFS, which is not used on Windows 8 devices moreso is
it used with Windows Server 2012 (Windows Server 8). Also, with the advent of
Office 2013, the default location that the documents will be saved is Windows
Skydrive; so you can see how that might be a security concern if you save something
sensitive without looking. Concerning content saved to Windows Skydrive, here is
part of Microsoft's TOA:
Quote
• depicts nudity of any sort, including full or partial human nudity, or
nudity in nonhuman forms such as cartoons, fantasy art or manga.
So, they scan your documents (and pictures) for anything that violates its TOA,
and if they find anything, you are banned and possibly facing criminal charges.
Hotmail accounts and Windows 8 account will have to be re-created, your XBOX live
and Skydrive account will be disabled as well. They also actively scan for child
pornography so make sure you don't accidentally save to a Skydrive account either.
This seems like a huge invasion of privacy digging deep within all your documents
and pictures (even if it is automatic) and the repercussions can be immense.
4.10 Shellbags
When you open a folder in Windows Explorer and customize the GUI display
Windows uses the Shellbag keys to store user preferences. Everything from visible
columns to display mode (icons, details, list, etc.) to sort order are tracked. If
you have ever made changes to a folder and returned to that folder to find your new
preferences intact, then you have seen Shellbags in action. In the paper “Using
shellbag information to reconstruct user activities”, the authors write that
"Shellbag information is available only for folders that have been opened and
closed in Windows Explorer at least once.” So basically, if you visit that folder,
a shellbag is created.
Thanks to the wonders of Windows Registry last write timestamps, we can also
identify when that folder was first visited or last updated (and correlate with the
embedded folder MAC times also stored by the key). In some cases, historical file
listings are available. This means that even if you dismount a drive (let’s say
you are only using a TrueCrypt container) or delete a folder, the folders that you
opened will still be recorded. Normally, this would not be an issue because just
the folder names are recorded here, but if you name your folder to that of
something sensitive and the name alludes to criminal activity, you will be in
trouble.
Registry Keys
Windows uses the following Registry keys to save the folders information:
HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell
HKEY_CURRENT_USER\Software\Classes\Local
Settings\Software\Microsoft\Windows\Shell (Only in Windows Vista)
If you are curious as to what forensic data can be found out by using
shellbags, a good program to view all of the shellbags is Shellbag Analyzer and can
be found here. You can also remove the shellbags that contain sensitive
information that you wish not be found.
Navigate here in the Registry (if you do not know what you are doing, then I DO
NOT RECOMMEND THIS): [HKEY_CURRENT_USER\Software\Classes\Local
Settings\Software\Microsoft\Windows\Shell]
Left-click on the Shell key and in the right pane, if you can see BagMRU Size
then there is no need to undertake this step. If it isn't there however, right-
click and select New>DWORD 32-bit Value and name it BagMRU Size. Now set this value
to 0 in Decimal view. In Windows 8, set the value to 1 (thanks to whomever pointed
this out to me).
Event logs are special files that record significant events on your computer,
such as when a user logs on to the computer or when a program encounters an error.
Whenever these types of events occur, Windows records the event in an event log
that you can read by using Event Viewer. An investigator can determine security
related information (These events are called audits and are described as successful
or failed depending on the event, such as whether a user trying to log on to
Windows was successful), application and service information, and more. As
security information is not incriminating, investigators can tell when you
attempted to log in and out of the computer, which can correspond to suspected
times. Also, application data might not be incriminating, but depending on what
the application actually logs, file names and other incriminating evidence might be
recorded.
There are several things that you should be concerned about when printing
sensitive documents. Print data might be left on your computer, on the printer's
hard drive, or through transit. Before you can know where to look, you must first
know how Windows prints a document. When you send something to a printer the
document is first spooled and two files are created in the
c:\windows\system32\spool\printers folder. These two files are the shadow file and
a spool file. The files are named as complimentary pairs; for example, one job
sent to the printer results in the creation of one FP00007.SDH file and one
FP00001.SPL file for the same job, while the next job will create FP00002.SDH and
FP00002.SPL.
The shadow file (.SHD) can contain information about the job itself, such as
the printer name, computer name, files accessed to enable printing, user account
that created the print job, the selected print processor and format, the
application used to print the file, and the name of the printed file (which can be
the URL if a file is printed from the web). All of this data can be seen in
Unicode using a hex editor or forensic software.
Spool files (.SPL) on the other hand contain the actual data to be printed.
This means that if you print a picture for example, a copy of the picture is
created and temporarily stored in the spool folder. Next, the print job is finally
sent to the printer and both the .SHD file and the .SPL file are deleted. If there
is an error whereas the document waits in the queue list, these files can easily be
read and the contents of the file revealed. It is also important to note that
these two files were deleted insecurely, so there is the possibility of recovery.
Since 2002, every copier has the capacity to store copies of the documents that
are copied or printed. Furthermore, copiers mark the documents they copy with a
hidden code to provide an identifier for the copier. This means that printed
documents and copies might be stored on the printer's hard drive, or they might be
recoverable if they were already deleted. There is also a security concern whereas
printed documents can be tied to specific printers. Lastly, print documents can be
captured if you are sending them to a printer that is located over the network.
Currently, it is up to the manufacturer to provide security when sending jobs to a
printer.
Metadata may be written into a digital photo file that will identify who owns
it, copyright & contact information, what camera created the file, along with
exposure information and descriptive information such as keywords about the photo,
making the file searchable on the computer and/or the Internet. Some metadata is
written by the camera and some is input by the photographer and/or software after
downloading to a computer.
EXIF information, the Exchangeable Image File format, describes a format for a
block of data that can be embedded into JPEG and TIFF image files, as well as RIFF
WAVE audio files. Information includes date and time information, camera settings,
location information, textual descriptions, and copyright information. In some
instances, especially with the use of cameras in cell phones, the location where
the picture was taken might also be embedded with the use of geocaching.
Furthermore, the images contain metadata images themselves that can reveal the
image before any editing was done. This information should be removed before the
photo is shared with someone else or stored unprotected.
To remove EXIF information from an image, or a batch of images, you will need
to get a special program that strips this data. I recommend the program
BatchPurifier that can remove this information from batch of files or a single
file. A good program to read EXIF information from PEG, TIFF and EEIX template
files is Opanda IEXIF. If you want to remove metadata from a RAW image, you will
need to get a separate program such as Exiv2. Opanda IEXIF can’t remove the data,
but it can show you what data is contained within each picture that you take
(unless you purchase the professional version).
You cannot stop cameras from recording metadata and embedding them in pictures,
so the above steps are the only way to ensure the pictures are clean. To further
clean the image that you took, you will want to crop and remove identifiable
information contained within the actual pictures itself. The best program that can
do this is Adobe Photoshop, but a good, free program is Gimp. Identifiable
information should include names, faces, logos, labels, prescriptions, anything
that includes handwriting, toys specific to a particular regions or store, etc.
You should also know that pictures are not the only material that can contain
sensitive information. Documents can include Microsoft Office® documents (Word,
Excel, PowerPoint), OpenOffice.org documents, PDF documents, and popular image and
media file types such as JPEG, JPEG 2000, PNG, SVG, AVI, WAVE, AIFF, MP3, MP4, and
F4V. It is best to either remove the data from these files before sharing them or
it is best not to share them all together. You should know that changing the file
extension does not trick the investigators. They use file header information to
gather pictures/videos. Click here for a good list.
For example: When we look at a jpeg header there are multiple parts we can use
to identify the type of image and formats used. The first part to look at is the
first two bytes of the file. The hex values FF D8 will identify the start of the
image file. This is often enough to know that you have an actual JPEG file. The
next two bytes are the Application marker typically FF E0. This marker can change
depending on the application used to modify or save the image. I have seen this
marker as FF E1 when pictures were created by Canon digital cameras. The next two
bytes are skipped. Read the next five bytes to identify specifically the
application marker. This would typically be 4A 46 49 46 (JFIF) and 00 to terminate
the string. Normally this zero terminated string will be "JFIF" but using the
previous example of Canon digital cameras this string will be 45 78 69 66 (Exif).
Most image editors handle all JPEG formats unless a proprietary format is used that
does not follow the JPEG standard.
As we are talking about pictures, you should also be concerned what is in the
pictures themselves. Law Enforcement Agencies have teams of analysts that pick
apart background data to determine names, addresses, geographic data, demographics,
and etc. As the case provided, detectives were able to determine where the suspect
lived based on a toy bunny and an orange sweatshirt as seen in one of the photos.
You should attempt to remove all information that includes names, dates, addresses,
paraphernalia or anything in nature that is region specific, or anything else that
can be identifiable. Tattoos, and other body parts (not specific to the face) are
identifiable too. For example, characteristics on the genitalia can be linked to a
specific person. Recently, somebody was taking photos of his underage daughter and
posting them online. The problem is he posted one with a clear view of a
prescription bottle in the background and got busted. They were able to use that
information to locate the individual.
When editing a photo for the first time, I usually crop the sides of the image,
add blurring (even though some investigators have recently been able to reverse the
blurring process and render this useless) and the halo effect, smooth physical
features of adults, remove items that are identifiable, and sometimes replace the
background altogether. If you really want to get involved, you can change physical
features such as eye or hair color. Doing this will not trick an investigator, but
it will obscure the features of a photo making it harder for someone to identify
you. Also, if done correctly, it will enhance the photo visually and the
presentation will be much better.
Whenever a device is plugged into the system, information about that device is
stored in the registry and the setupapi.log file (Windows XP and earlier). The
registry key can be found here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR and the setupapi.log file
can be found here: %windir%\setupapi.log. All of the subkeys under USBSTOR will
contain information about every device that was plugged into your computer via the
USB. The setupapi.log file contains information about device changes, driver
changes, and major system changes, such as service pack installations and hotfix
installations.
To delete this registry key and or subkeys you must first right-click the key
and choose permissions. You can then set the "everyone" group with full permission
to the key or subkeys so that they can then be deleted. I'm sure it isn't too
difficult to whip up a script or piece of software to automate this. Also, if you
have system restore enabled, the information might be contained in there as well.
The setupapi.log file should be securely deleted as you would with anything
sensitive. As pointed out to me by a forum that I frequent, here is a program that
will do this for you: https://code.google.com/p/usboblivion/.
Unlike HDDs, SSDs have a feature known as a garbage collector wherein cells
that are marked to be deleted are permanently erased in the background, usually
within several minutes of being deleted. It is important to know that this process
happens on the SSD hardware level, so simply leaving the SSD powered on regardless
if it is attached to anything will result in the destruction of the data (also
known as self-corrosion). Even though SSD's implement garbage collecting,
encrypting or securely deleting the device is hard.
SSD's use load balancing, which is a feature that evenly balances I/O
operations between allocation pools. This means that when you attempt to encrypt or
delete a bit of data, it will move past the actual to the next bit. Also, SSDs
should not be encrypted using programs that are meant to encrypt HDs because of
another feature called "wear leveling". TrueCrypt for example recommends that
"TrueCrypt volumes are not created/stored on devices (or in file systems) that
utilize a wear-leveling mechanism (and that TrueCrypt is not used to encrypt any
portions of such devices or filesystems)". You should know however, that was
referring to existing data already stored on the hard drive. New data that has not
been written to the disk will be secured because it is encrypted before physical
storage on the hard drive. This still can allow for data leaks, so it is still not
recommended.
On the SSDs you cannot save to a specific sector on the drive therefor if it
theoretically possible that there are multiple instances of the same data stored on
the drive. Let's say for example that you change the TrueCrypt volume header; the
old header might still be accessible on the drive as you cannot write over it
individually. An attacker, knowing this information can attack the container using
the old header information.
5. Continuity
Service and data continuity is the activity performed by you to ensure that
files and services will be available to yourself and others for the applicable
lifetime. There are several methods to provide continued support including:
backing up data, using controls and techniques to restrict access, and implementing
controls on servers, networks, and other devices. This step is often overlooked
when securing your information but assures availability is met.
To start, Windows backup and restore is a feature of Windows and does exactly
as it implies; it backs up your data. Without much explanation, there are three
types of Windows backups: full, differential, and incremental. A full backup
provides a backup regardless of previous backups. A Differential backup only backs
up data that was changed since the last full backup and an incremental backup backs
up data that was changed from the last full backup, or the last incremental backup.
I know I am stating the obvious, but make sure that you do not backup anything
that is confidential. Whether by accident or on purpose, once you backup sensitive
data, it does not matter if you remove the file from your computer because a copy
is already made. Personally, I keep all my sensitive information in an encrypted
container by itself so I don't confuse it with my other stuff. After I move all of
my sensitive information into a container by itself I have ensured two things, 1)
my information is secured and 2) nothing is being backed up this is not supposed
to.
5.2 Security Concerns with Sleep and Hibernation
There are two other features with Windows that you should know of: sleep and
hibernation. If you need to walk away from your laptop for a small –or extended
– period of time but want your Windows session to resume quickly, you will use
either of these two features. The difference is that with sleep mode, your
computer stores everything in memory and with hibernation mode, everything in RAM
is saved to your hard drive. Sleep is for short-term storage and hibernation is
for long term storage.
If you use sleep or hibernation, the encryption keys and everything else that
is open at that time is saved, allowing a third party to bypass the security
measures you have in place. For example, everything that you have opened at this
moment, including mounted containers and open documents, will be viewable by
forensic investigators. The best mitigation technique is not to use them or to
disable both hibernation and sleep altogether.
Note: Windows 8, the latest Operation System Microsoft is coming out with
hibernates the system kernel, but does not put memory in storage
Keeping a backup of all your private/sensitive materials is a good idea for the
continuity of such data, as long as that data is secure. Securely storing data has
been discussed in another section, so I will only make a recommendation. I would
create a container with TrueCrypt and store all sensitive data within that
container before saving the backup somewhere else. Doing this will achieve two
goals in the CIA triad, confidentiality and availability.
There are two locations that need to be considered when backing up data:
locally and remotely. A local copy is a good idea when data loss occurs and you
want an immediate, speedy recovery of the backed up data. But what if a natural
disaster or a fire occurs and it destroys both your computer and your local backup
device? This is where a remote backup solution comes in; it prevents data loss in
off-chance that this happens. Common methods of remote backups are remote backup
services, tapes, external drives, or hosted services. Another common method is
finding someone else in another location (another state preferably) and you each
keep a backup for one another.
For example: let’s say that I have a friend (okay, I did say as an example)
and that friend lives in another state. One good way that I can back up my data at
his place and his at mine, is we setup a VPN to connect our networks together.
This way, we can send the files securely over the internet without much
complication. Make sure however, that you trust the other party as they will have
your Public IP Address. Another device that allows for storage redundancy is a
RAID device. RAID (redundant array of independent disks) is a storage technology
that combines multiple disk drive components into a logical unit. Basically, it is
a device that is comprised of several disks for the purpose that if one (or more)
drive(s) fail, data is not lost. This can come in the form of a RAID controller
(or software controller) on your computer, or a network device (such as a NAS box).
A NAS box is a Network Attached Storage and is a device that plugs into your
network so you can backup multiple devices. These devices are standalone devices
and usually have RAID functionality.
There are a few more solutions if you are going to set up a service that you
host and are concerned with continuity and service availability. All these methods
are assuming that you have multiple servers available and can configure them and
the network they reside in. Firstly, you can configure the site for mirroring
which is the act is creating an exact copy of one server to another server.
Clustering (or failover clustering) is another method of ensuring availability as
it is a group of devices that act as a single device. When one device fails in a
cluster, another device starts providing the service (a process known as a
failover). And finally, you can implement load balancing on your network which
distributes the traffic load between several devices in your network.
DoS (Denial of Service) attacks are the acts of making resources for legitimate
users unavailable. DDoS (Distributed Denial of Service) attacks are the same thing
as DoS attacks, but they use hundreds (even thousands) of machines to disrupt
access to resources. Usually this is performed by flooding the service with ICMP
packets forcing the router (or server) to respond to the attackers’ request (by
replying to the ICMP packet). Other attacks including sending malformed ICMP
packets, flooding the site with resource requests, or SYN flood attacks.
Even though ICMP traffic uses the TCP protocol, it is not supported via Tor.
This attack will be best accomplished with Clearnet sites. Ping of Death attacks
can be accomplished in two ways: the attacker can send too many packets or they
can send malformed packets. For example, Windows has a packet size limit of 65500.
So anything received that is higher, might crash the machine or enable the attacker
to successfully perform a privilege escalation attack. Flooding the site with
requests for resources (videos, pictures, login requests, etc.) is an example of a
DoS attack that is more commonly used with Tor sites.
These attacks are mostly an issue that has to be prevented with hardware
controls versus implementations within the website itself. Assuming that you are
hosting and managing the website and the server the website resides on, you can
implement ingress filtering on your network to help block some of the attack. The
backscatter traceback method is a good strategy for that. Also, I would block ICMP
packets on your external interface (WAN interface). You should also make sure that
all "unallocated source address'" are blocked. This means that you should block
all packets with private IP address that are coming into your network. You cannot
stop DDoS attacks, only mitigate the effect.
Another type of DoS attack is known as an Application layer DoS attack. This
type of attack bypasses the firewall as it uses legitimate traffic to attack the
service directly. Application-layer attacks can affect many different
applications. A lot of them target HTTP, in which case they aim to exhaust the
resource limits of Web services. Often, they are customized to target a particular
Web application by making requests that tie up resources deep inside the affected
network. These attacks are typically more efficient than TCP- or UDP-based attacks,
requiring fewer network connections to achieve their malicious purposes. They are
also harder to detect, both because they don’t involve large amounts of traffic and
because they look similar to normal benign traffic.
To initiate DDoS attacks, you will need to right tools based on your
preferences and other factors such as your platform of attack. The following are
samples of DDoS attack tools:
Low Orbit Ion Cannon - LOIC attacks a server by flooding the server with
TCP or UPD traffic. Specifically, it mostly floods the server with ICMP traffic
which is ping traffic
Trinoo - Trinoo is easy to use and has the ability to command and control
many systems to launch an attack
Tribal Flood Network - TFN can launch ICMP, ICMP Smurf, UDP, and SYN Flood
attacks against a victim. This tool was the first publically available DDoS tool
Stacheldraht - This tool features that are seen in both Trinoo and TFN and
sends commands via ICMP and TCP packets to coordinate an attack. Another feature
of Stacheldraht is that it can encrypt the communication between the client to the
handlers
TFN2K - An upgrade to TFN, this program offers some more advanced features
including spoofing of packets and port configuration options
Shaft - This works much the same way as Trinoo except it includes the
ability for the client to configure the size of the flooding packets and the
duration of the attack
MStream - This program utilizes spoofed TCP packets to attack a designated
victim
Trinity - This performs several DDoS functions including: fraggle,
fragment, SYN, RST, ACK, and others
Slowloris - Application-layer attack that is a HTTP GET-based attack. The
basic idea is simple: a limited number of machines, or even a single machine, can
disable a Web server by sending partial HTTP requests that proliferate endlessly,
update slowly, and never close
SlowPost - This attack works in somewhat the same way as Slowloris, except
that it uses HTTP POST commands—transmitted very, very slowly—instead of GETs to
tie up Web services
SIP INVITE Flood - The two attacks above both target HTTP; this one is a
VoIP flood that targets SIP (Session Initiation Protocol)
Torshammer - Slow post DOS testing tool written in Python. It can also be
run through the Tor network to be anonymized
Do do they mean?
Let me take a second to define some of the attack turns as presented above:
ICMP DOS – An attacker can use either the ICMP "Time exceeded" or
"Destination unreachable" messages. Both of these ICMP messages can cause a host to
immediately drop a connection
ICMP packet magnification - An attacker sends forged ICMP packets to bring
down a host. As an example (as presented above), Windows has a packet size limit
of 65500. So anything received that is higher will be fragmented. Since the
machine cannot reassemble the packet, it might crash or reboot
ICMP Smurf attack - An attacker sends forged ICMP echo packets to
vulnerable networks' broadcast addresses. Doing this will tell all the systems on
the network (inside the broadcast domain) to send ICMP echo replies to the victim,
consuming the targets available bandwidth
SYN flood attacks – A SYN flood attack takes advantage of the TCP three-
way handshake. In normal communication between a client and a server, the client
sends a SYN message. The server returns a message called an ACK, which stands for
acknowledged, to the client. The client then returns an ACK message back to the
server. A SYN flood attacks spoofs the IP address thereby forcing the server to
keep open the connection while waiting for the ACK message (which is never sent)
from the client and uses resources in the process. Flooding the server with ACK
messages causes its resources to dwindle, and the server becomes slow or
unresponsive to other clients
RST attacks – This attack works by injecting RST packets into TCP packets
tricking the server to close the connection. RST attacks are performed against
other users trying to use a particular resource
Fraggle attacks – Fraggle attacks are similar to Smurf attacks except
that Fraggle attacks uses UDP packets instead of TCP packets
6. System Hardening
Once all of the software has been uninstalled from the machine, you should then
start by disabling all of the unnecessary services that are running in the
background. Each service will provide support for the application that they
support; many of them providing functionality for Windows. You should get a
listing of all the system services running on the system and evaluate whether each
service is needed. Also know that I am more referring to third-party services
versus Windows services. Make sure to do your research on each service before
disabling anything.
An aspect that is overlooked often is disabling accounts that are not currently
being used. You will need to determine if you need information from that account
(if you remove account data) or to use services that can only be used from within
that account. Windows XP has the administrative account enabled with a blank
password be default whereas Windows Vista and 7 disable the account by default.
Also, a quick word from the real world, make sure when creating a user account to
not use anything that can possibly identity you as doing something illegal. A real
world example, someone actually created a separate account name “childporn”, so he
can hide all his illegal materials in that account. Better yet, he hid all
materials in a folder on his desktop named “childporn”! Not only can forensic
investigators see all the accounts that are currently on the machine, but they can
see previously deleted accounts as well.
Note: One good recommendation is to create and use a standard account with no
Administrative privileges. This way, if a virus is executed, it only has the
privileges of the account that you are in.
What I meant by that, if all the account data is contained in the Windows
Registry and will contain user accounts that are being used now and those that were
deleted from within the Control Panel. For this reason, forensics investigators
use the registry keys when performing the analysis. Furthermore, they can view
other sensitive artifacts from the users unique registry is they are left intact.
The location to the registry keys that contain the user information is here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
As you can tell from the image, the selected user account has the username of
admin. This can be seen from the ProfileImagePath registry key. Remember the SID
for later use. Once you have gone through all the keys under ProfileList and have
located yours, you can right-click the key as shown in the image above and
selecting Delete. Now that you have deleted the user account from the registry,
you should now delete the actual user data from the registry as well. You should
now navigate to HKEY_USERS\%SID% to remove the data for the current user. This
data can include recent file lists, open file dialogs, shell bags, etc.
Finally, you should locate the profile path in Explorer to remove all files
that are contained within the hierarchy. For Windows Vista/7/8, the location will
be C:\Users\%username% and for XP, this path will be C:\Documents and Settings\
%username%. This should be done securely to ensure that no data can be recovered.
Another step in hardening the system is updating the Operation System and all
software installed on the machine. When you patch the system, you are applying
security fixes to known vulnerabilities to the software that is running on the
system. These vulnerabilities are what remote attackers use to gain access to the
system. Without patching the system, you are opening up your machine to attack by
these malicious hackers.
Windows updates should be enabled as they provide many fixes concerning Windows
security. Individual software and applications should also be updated as soon as a
known stable version of the update is available. Usually, when vendors release an
update, they are stable unless stated otherwise. I recommend the use of a tool
that checks the programs installed on the machine and reports the ones that are
out-of-date. A good program for this purpose is Secunia PSI. This program will
constantly check the programs installed on your machine and report which ones are
out-of-date, which ones are scheduled for an update, and which ones can be updated
manually.
7.1 Antivirus
Antivirus software can protect you from viruses, worms, Trojan horse and other
types of malicious programs. More recent versions of antivirus programs can also
protect from spyware and potentially unwanted programs such as adware. Having
security software gives you control over software you may not want and protects you
from online threats is essential to staying safe on the Internet. Your antivirus
and antispyware software should be configured to update itself, and it should do so
every time you connect to the Internet.
Case: The Computer and Internet Protocol Address Verifier (CIPAV) is an illegal
data gathering tool that the Federal Bureau of Investigation (FBI) uses to track
and gather location data on suspects under electronic surveillance. The software
operates on the target computer much like other forms of illegal spyware, whereas
it is unknown to the operator that the software has been installed and is
monitoring and reporting on their activities.
Hardware keyloggers are used for keystroke logging, a method of capturing and
recording computer users' keystrokes, including sensitive passwords. They can be
implemented via BIOS-level firmware, or alternatively, via a device plugged inline
between a computer keyboard and a computer. They log all keyboard activity to their
internal memory. Hardware keyloggers have an advantage over software keyloggers as
they can begin logging from the moment a computer is turned on (and are therefore
able to intercept passwords for the BIOS or disk encryption software).
You might think that physical inspections are one way to defend against
hardware keyloggers, but it is not. Nor is using a wireless keyboard, as that sort
of keylogger, doesn't necessarily have to be hidden outside of the keyboard. A
dedicated attacker may just as well place an extra chip inside of the keyboard or
replace it all together by a manipulated keyboard of the same model to record
keystrokes without any obvious visual cues. So, the best way may to the use
different keyboard layouts before entering the password. Furthermore, you can also
enter random data within the password and going back to remove them later. And
finally, you can use tokens as well as a password when logging into your computer.
7.3 Firewalls
A firewall is usually your computer's first line of defense-it controls who and
what can communicate with your computer online. You could think of a firewall as a
sort of "policeman" that watches all the data attempting to flow in and out of your
computer, allowing communications that it knows are safe and blocking "bad" traffic
such as attacks from ever reaching your computer. Configuring your firewall can
prevent Spyware or other confidential data from leaving your network entirely. It
can also prevent remote attackers from "hacking" into your computer. Most AIO
(all-in-one) security solutions such as Norton or McAfee or BitDefender have a
firewall built in. For a free firewall, Comodo firewall is a good alternative:
https://personalfirewall.comodo.com/.
Note: In most Linux distros including Redhat / CentOS / Fedora Linux installs
iptables by default. It has become a standard option in all distros. If it is not
installed, you can use the command yum install iptables or apt-get install iptables
if you are using Ubuntu.
7.4 DLS's
7.5 HIDS's
The principle operation of a HIDS depends on the fact that successful intruders
(hackers) will generally leave a trace of their activities. In fact, such intruders
often want to own the computer they have attacked, and will establish their
"ownership" by installing software that will grant the intruders future access to
carry out whatever activity (keystroke logging, identity theft, spamming, botnet
activity, spyware-usage etc.) they envisage.
In theory, a computer user has the ability to detect any such modifications,
and the HIDS attempts to do just that and reports its findings. Intrusion attempts
can be keylogger attempts (spyware), Internet Explorer leaks, DLL injections,
malware drivers, etc. HIDS's are installed on your machine and a baseline must be
performed before HIDS's can detect any anomalies. Many anti-virus programs have a
basic HIDS built into the software as an added feature.
Network IDS's on the other hand sit on your network to monitor all traffic
coming into your network to alert you to any attacks. There are several methods of
detecting an attack including anomaly based detection and signature based
detection. Also, there is either a passive or active based detection depending on
if you want the IDS to actually take action or not. You should know when setting
up an IDS, that there will be false positives as it takes a while for the IDS to
learn and for you to teach. Also, you will need to be there to monitor the alerts.
Snort is a good, free NIDS and is widely used in businesses.
What you download can affect security. Make sure that what you download is
safe; it should go without saying, but is good to hear nonetheless. PDF, word
documents, executables, broken pictures, and binders are all security issues. Make
sure that you protect yourself by downloading alternative PDF viewers (or block
your PDF application from connecting to the internet), disable Macros if you use
Microsoft Office programs, disable JavaScript in Adobe Acrobat/Reader if you use
it, etc. Lastly, make sure that you are updating your web browser, and if you are
using the Tor Bundle, you update that as well. These releases are extremely
important for security and often include patches for found vulnerabilities.
Keeping your network secure is a must to ensure to keep intruders out and your
information from getting into the wrong hands. Furthermore, it protects you from
other people hopping on your network, doing something illegal, and having the
evidence point to you. Network security covers a variety of computer networks,
both public and private, and you should concern yourself with both. This chapter
will explain some of the common methods of security and a brief introduction on a
few networking terms as well as security concerns when hopping on another person's
network. This will include both hardware and software methods to ensure this
security.
Before we being diving into this section, we are going to discuss the
fundamentals of networking. If you are wondering why, it’s because we are going to
use networking terminology and the functionality they serve. So the first question
you may ask will be answered first. What is a network?
Now that you know what a network is, we are moving on to how these devices in a
network physically connect to each other. Inside a private network, all the
devices that connect via a cable (also called Ethernet cables), are plugged into a
network switch – or the less popular device known as a network hub. I specify
network switch as there are a couple different types of switches. Switches provide
more speed and security then network hubs. We won’t get into the security features
in this guide.
I will state later on in this guide that if the administrator of the network
device is using a hub, they can capture all data easily. Most of you are familiar
with a basic home router. But most of you don’t know that with a home router, the
ports in the back are actually switch ports, which is built into the router itself.
There are two primary differences between hubs and switches: hubs are half-duplex
whereas switches are full-duplex and hubs have one collision domain versus switches
which has a collision domain per port. Basically, full duplex means the hubs can
send and receive information at the same time whereas half-duplex devices cannot.
Wireless devices send data in half-duplex mode as well; this is one reason why
wireless connections are slower than wired connections.
A network collision occurs when more than one device attempts to send a packet
on a network segment at the same time. And a collision domain defines where
packets can collide with one another. So for example, let’s say you have a 5 port
hub. A hub has one collision domain; so all the information being sent through any
one of those ports can collide with any data from the same port or another port.
If you are plugged into port 1, information will be sent to port 1, 2, 3, 4, and 5.
A switch on the other hand may have 5 ports, but each port only transfers packets
through the host that is using that port. So, port 1 transfers packets only
through port 1, port 2 through port 2, port 3 through port 3, and so on. I also
said that a switch can send and receive packets at the same time, make collisions
near impossible. As you can see in the illustration, when Host A wants to send
information to Host B, a hub sends the data to all ports and a switch only sends
the data to the port Host B resides on. An attacker can sit on Host C or D and
capture all the traffic coming from another device.
Now you know how device are connected within a private network; with the use of
switches. Next, we are going to talk about how different networks connect with one
another and how devices within a network can talk with each other. Remember
though; this is an intro to networking, so I will not be going into any technical
details. Saying that, a group of networks are connected with one another using a
router. And a router does just as the name implies; it routes between two or more
networks. Look below for a basic network diagram.
So, let’s talk about the illustration above to learn more about how these
devices communicate. As you can see, two or more networks communicate via a
router. This can be seen in the diagram as Router A and Router B and specify two
different types of networks. Branching off from the routers, a network switch is
used. Again, the switch’s connects the devices within the network and the router
routes traffic between networks. Finally, connected to each switches are the
devices within each private network.
Moving on, what we just describes was how devices connect to each other
physically, but not logically. I told you the basics on network switches and hubs
and how they route traffic. But they cannot route traffic if the devices in the
network do not have IP addresses. An Internet Protocol address (IP address) is a
numerical label assigned to each device (e.g., computer, printer) so that they may
communicate with one another. To help facilitate this, there is a service know as
a DHCP service, which stands for Dynamic Host Configuration Protocol, and is
responsible for leasing out IP addresses to devices connected to the network.
192.168.0.1 to 192.168.255.254
172.16.0.1 to 172.31.255.254
10.0.0.1 to 10.255.255.254
When dealing with IP addresses and networking, there are two other numbers that
you should also know about: subnet masks and default gateways. A subnet allows the
flow of network traffic between hosts to be segregated based on a network
configuration. By organizing hosts into logical groups, subnetting can improve
network security and performance. For example, most home devices give a subnet
mask of 255.255.255.0 which looks like 11111111 11111111 11111111 00000000 in
binary notation. Without getting into subnetting which can take me pages to
explain, any device that has the same numbers in the first three octects with a
subnet mask of 255.255.255.0 can communicate.
Another area concerning networking are ports and the actual process of data
traversing networks. Every service is assigned a port and usually these ports do
not change. For example, Port 80 is always used for HTTP (web traffic), port 433
for HTTPS, port 53 for DNS, and so forth. When you request a service, you are
requesting the service by using that particular port, and not by the DNS name
(Google.com) that you wish to use. Let’s say that you opened up FireFox and want
to go to Google.com. Your computer will first be requesting the data on port 53
(DNS) to request an IP address for Google.com and port 80 to request the actual
information. If you are using another service for Google.com, such as their music
service, you will be requesting the service using a different port. More
information on this process can be found in section 8.3.
Moving along, when your computer is requesting information, the socket (or
communication flow) is actually assigned a random port number to make the request.
This new port number is per connection and not per packet. So, for example, if you
are requesting HTTP traffic (port 80), you are actually assigned a random port of,
for example, port 1000001. This is if in case you have multiple applications
requesting different information for the same service/port number. Opening up
several tabs in FireFox provides good illustration of this; each tab is assigned a
different port number, so your computer knows where to send to traffic once
received by your computer. Not only does your computer do this, but your router
does when using a feature called PAT, the other routers do this when being sent
across the world, and the webserver (Google.com) does this when open a connection
and sending information back to you. The easiest way to think of a reason why
opening up random ports, is that the random ports are uniquely assigned names for
each service requesting the information.
Note: PAT stands for Port Address Translation and is when multiple devices on
the network must use one Public IP address. You may have heard people refer to
this process as NAT, or Network Address Translation, which is accepted for use, but
technically incorrect. Example: most home users that use a router are using PAT
without knowing it. PAT is used so all the devices in your network can access the
internet with the Public IP address that is assigned by your ISP.
Bob wants to send the data to freepizza.com, but he does not know how to get
there. So, Bob sends a packet to Router 1. He says, “This packet is going to
192.168.1.1 (Router 1) and is from 192.168.1.2.” Router 1 sees that Router 2 knows
how to get to Freepizza.com so he proceeds by sending the packet to Router 2. Now
again, routers do not care about MAC addresses so they remove the MAC address and
replace the IP addresses (Source and Destination) with its own source and
destination header. In this case, the Source IP Address or 192.168.1.2 and
Destination IP Address of 192.168.1.1 are replaced with the Source IP address of
192.168.1.1 and Destination IP Address of 192.168.2.1. When Router 2 receives the
packet, he will say, “Hey, I know where Freepizza.com is! He is at 192.168.2.2.”
Again, without getting into how MAC addresses work and when they are used, Router 2
will replace that IP Address information with the Source IP Address of 192.168.2.1
and Destination IP Address of 192.168.2.2. The MAC address will be used inside the
network between the switch (not in the diagram) and the router/pizza.com server.
Phew, aren’t you glad that’s over with? Not quite I say! We still have to
describe how data is sent back through the network back to Bob. This part will go
much quicker as we have already described the fundamentals on how the packet got
there in the first place. So, when Freepizza.com is ready to send the information
back to Bob, it follows the exact same process in getting there, except it uses the
Source IP address to send the data back to whomever sent it in the first place.
The data headers are still replaces and the MAC addresses are still removed.
It is for this very reason that when you are a Tor exit node, you are at risk
at people coming to your house if someone does something illegal and gets caught
doing it. The Tor exit node only has the IP address information of the Router it
is at (known as the Public IP address). All the IP address information of the Tor
user and all hops in-between are stripped away and only accessible by each
individual hop. Now, Tor uses encryption and varies other methods of hiding the IP
address information, but this a simple explanation on how data travels across
networks.
Wrapping this up, when computers want to communicate in a network they send an
ARP command that is used by the network devices and the network switch to send data
to other devices within the same network. I described this process further down in
the guide when explaining about ARP replay attacks, so I will skip it for now.
Routers can communicate directly with one another using a DCE/DTE cable or through
the internet via a modem. Old modems converted the incoming data from analog to
digital and vice versa on the way out. Cable modems, which are used most nowadays,
converts the cable feed into a format that can be used by several devices in your
home. Your ISP uses DHCP services to lease you out an IP address so you have
internet access. When you are finally able to communicate within your network or
over the internet, data is sent in what is called packets. Packet and packet
forensics is described below in section 8.4.
Think of a MAC address like a bank account number; we are each given a bank
account number so when we make a purchase, at a grocery store for example, the
grocery store knows how to send the payment to your bank and vice-versa.
Similarly, a MAC address, which is unique to your wireless card, allows the router
to know where to send the data. And if you really care, the MAC address is held in
an ARP table, but we won't get into that.
When you connect to a network, the router logs the computers MAC address and
temporary saves the computers IP address. People can also sniff the network to see
what you are doing and record your MAC address that way. And yet another way
people can get your MAC address is if they use software that monitors the network
and records all the devices automatically. All these methods have one this in
common (besides the obvious), they can only record the addresses that are
broadcasted, meaning if you change your MAC address, these methods are useless.
People use MAC address changers for many reasons; mostly for getting free WiFi
by bypassing MAC address filtering or performing MAC flood attacks. If you connect
to a public network, or your neighbor's network, I would use a MAC address changer
to make it hard to locate you. Earlier, we said that a MAC address is unique to
your computer; so if they were to look at all of the devices in your house, they
won't find the device with the MAC address that was logged because it has been
changed. The easiest way to change the MAC address is to download a program to do
it for you; otherwise you can change it in your network settings. Win7 MAC Address
Changer Portable is a good program to do this for you.
Note: To change the MAC address in Linux, you can use the hw ether command.
ifconfig eth0 down > ifconfig eth0 hw ether 00:00:00:00:00:00 > ifconfig eth0 up >
ifconfig eth0 |grep HWaddr. Notice, you will use a custom MAC address instead of
00:00:00:00:00:00 and run each command separately (as defined by the ‘>'
character). Also, you will want to replace eth0 with the adapter that you are
using.
It is up to you whether or not to stop using the neighbors wireless. But know
they can see Tor traffic if they: use a packet sniffer and perform a MiTM attack
if their wireless network is not protected, if they were using a network hub which
broadcasts information out of all ports, if they have a managed switch and enable
port mirroring, or if they change the MAC address of their computer to that of the
AP (Access Point). Even though they can see Tor traffic, they cannot see what you
are doing inside of Tor and they still will have no clue that it was you. If they
could, the purpose of Tor would be defeated. They are other risks with using
public networks (or your neighbor’s network) therefore it is not recommended
(unless you are absolutely sure that you are safe).
These risks includes attackers remotely logging into your computer via a known
backdoor or an exploit. The best known Operating System to attack a machine is
Backtrack. BackTrack is a Linux-based penetration testing arsenal that aids
security professionals in the ability to perform assessments in a purely native
environment dedicated to hacking. The methods of attack in BackTrack are against
operating systems, applications, phones, networks, internet protocols, websites,
and etc. The best part about BackTrack is that it is free! I would start with
getting a good firewall and anti-virus for your computer. Also, make sure you
follow System Hardening (Section 6) section to help correctly configure your
machine.
As always, I would use Tor for all sensitive information in which you do not
want anyone to learn your location or monitor your browsing habits. To protect all
other sensitive data that does not require such autonymity, I would recommend the
use of a VPN. A VPN reroutes all computer traffic through a secure tunnel to a
trusted third-party (or a designated network) before the information reaches its
destination. This provides security against anyone sniffing your computer traffic
as all information is encrypted. Common reasons for a VPN is when: checking
emails, checking your bank account, application data security, or transmitting
insecure data over a secure data stream. The difference between Tor and a VPN is
that when using Tor, nobody knows who you are whereas in a VPN somebody always
does.
The first for packets we will talk about (No. 8 - 11) are all DNS packets.
Packet 8 is a DNS request from IP address 192.168.82.133 to IP address
208.67.222.222 for the domain www. LINK HERE -----> file2hd.com/Default.aspx?
url=https://www.youtube.com. The Source field is your IP address (or the address
of the originating computer. The Destination field is the address where the data
is going. The protocol is DNS as scene in the Protocol field. DNS is Domain Name
Service and is the protocol used the get the IP address from a Domain Name. And
finally, the Info field contains the data within the packet. In this case, packet
8 requests the packet (Standard query A www. LINK HERE ----->
file2hd.com/Default.aspx?url=https://www.youtube.com) and packet 9 responds with
the CNAME record and the IP address (Standard query response). The A record is the
standard record that maps the domain name to the IP address and the CNAME record is
a type of DNS record that specifies that the domain name is an alias of another,
canonical domain name.
oving on, packets 12 – 14 is the standard TCP three-way handshake. More
information can be found in section 8.5 and is denoted by the packets [SYN], [SYN,
ACK], then [ACK]. Once the final [ACK] packet has been sent, the connection is
made and information can flow.
The next packet is the GET request. This packet is telling the HTTP server
that it is requesting resources (in this case, the content on the webpage). If you
submit data you will see a POST request meaning that you are sending resources to
the webserver.
Finally, the user is sending and receiving information from the website as
you can see by the Source port in the information pane. Port 80 (http) denotes
webtraffic and is used when a user is trying to access a webpage.
This is the basic overview of webtraffic that can be captured and read.
Protocols such as FTP and HTTP are all done in cleartext, meaning you can read all
the data that is contained within the packets. This is especially a problem for
the user if information such as usernames or passwords are being sent. FTP for
example requires the user the login to the server, but does sends all the
information in the clear. The picture below is an example of network traffic that
captured the FTP username and password. The destination field tells you that the
FTP server has an IP address of 10.0.8.126 and the user requesting it has an IP
address of 10.0.4.232.
There are two more things that I want to discuss before moving on to the next
section:
When using Wirehark, you should familiarize yourself with filtering and
Follow TCP Stream
Reassembling packets to view data such as images and getting detailed view
of packet analysis
Moving along to the second item on the list, you can also reassemble packets to
view the information contained within those packets. Let’s say for example that
someone views a bunch of images over the internet. Reassembling the packets will
allow you to view the images the user viewed. Now, Wireshark is good for capturing
packets and is a great program for a bunch of purposes, but it is not a great
program when trying to do this. Personally, I use a program called NetWitness
Investigator that will not only allow you to view the data that was captured, but
it will allow you to do so graphically. Everything is point and click and there is
no real need to know about packet analysis beyond the very basics. And finally,
this program shows a detailed view of the packets captured.
The first thing that anybody needs to do is change the default password for the
device so nobody can log in and change the security settings. Followed by changing
the device password, you should create a wireless password to limit the people who
can get on the device in the first place. There are several types of protocols
that limit access: WEP, WPA, WPA2, MAC Address Filtering, etc. WEP, WPA, and WPA2
are protocols that rely on password authentication to accept users who are trying
to connect to your wireless device. MAC Address Filtering on the other hand only
allows specific wireless devices access to the network depending on the MAC
addresses.
WEP has been demonstrated to have numerous flaws and has been deprecated in
favor of newer standards such as WPA and WPA2. WPA is also deprecated making the
recommended security protocol WPA2. WPA2 is the strongest protocol as it has not
been cracked, yet it might not be supported by all devices. If you want to get
technical, WPA uses TKIP whereas WPA2 uses AES-CCMP. TKIP is Temporal Key
Integrity Protocol and AES-CCMP is Advanced Encryption Standard- Counter Cipher
Mode with Block Chaining Message Authentication Code Protocol. MAC address
filtering filters wireless devices allowing only those that are allowed into the
network. The problem is however, it can be easily defeated if someone changes
their MAC address to one that is allowed.
Throughout this guide I mention the use of Virtual Private Networks (VPN’s),
and now I am going to explain exactly what it is. In the simplest of terms, a VPN
transmits data from one network to another, as if they were on the same network.
For example, let’s say that you have a file server on your home network that you
will to access while on vacation. A VPN allows you to log into the network and
view those files as if you were sitting at home. Furthermore, tunneling your
connection through an untrusted network to a trusted network with the use of VPN’s,
ensures that no private data is leaked to unscrupulous parties.
There are several reasons to use VPN’s and there are even more people who use
them. Most often, you will see the use of this technology employed by businesses
that have employees that want to connect to the office or several offices that need
to connect to the home office. There are a few types of configurations that
include: host-to-host, gateway-to-gateway, and host-to-gateway. Host-to-host is
more often used when one person needs to directly communicate with another person
(share files from one PC to another, chat, etc.), gateway-to-gateway is when two or
more locations needs to share data between networks, and host-to-gateway is when
users need to connect to a network to access network resources (like in our first
example).
Saying this, the access of resources is not the only reason why you would want
to use a VPN. As I said in the first example, a VPN can be used for a secure
communication between the two nodes. What I mean is this: let’s assume that you
are at an untrusted network or you are exchanging data over an untrusted medium,
such as the internet. A VPN encrypts your data, creates a secure tunnel between
you and the host machine (the device receiving the VPN traffic), and transfers the
data without anyone being able to see or inject anything harmful along the way.
Note: when I say they cannot inject, both sides perform a check of the data. If
someone injects or modifies the data, it will be discarded and resent.
Moving on, the use of the acronym VPN does not implicitly refer to secure data
transmission, but refers to how data is transfered from one point to another. You
can break a VPN into two parts: the tunneling protocols and encryption protocols.
Tunneling protocols defines how data transverses across networks and the internet.
By its very nature, these protocols do not provide any encryption. It’s like
driving a car without any airbags; it’s not worried about safety, it just cares
that it gets there. Encryption protocols on the other hand are concerned with just
that: encrypting the data.
Selecting both tunneling and encryption protocols will mostly depends on your
needs and what you have at your disposal. For example, for a client to client
connection, you can use LogMeIn Hamachi to establish a secure VPN between.
Sonicwall’s use SSL VPN’s that can be used host-to-host or host-to-client and
custom firmware routers use OpenVPN can do the same thing but adds host-to-host to
the mix. For the purposes of this guide, I recommend using OpenVPN as it is free
and open source.
Without getting into too much detail about how VPN’s works and what is
happening behind the scenes, I will give you a broad overview of the types of
tunnels and encryption protocols VPN’s use.
Protocals
Point-to-Point Protocol (PPP) - This protocol defines data that is
transmitted over serial lines. Mostly, nowadays, PPP is not used but when using
Dial Up connections between modems.
Point-to-Point Tunneling Protocol (PPTP) - PPTP (Point to Point Tunneling
Protocol) is a good, lightweight VPN protocol offering basic online security with
fast speeds. PPTP is built-in to a wide array of desktop and mobile devices and
features 128-bit encryption. PPTP is a good choice if OpenVPN isn't available on
your device and speed is top priority.
Layer Two Tunneling Protocol (L2TP)/IPSec - L2TP (Layer 2 Tunneling
Protocol) with IPsec (IP Security) is a very secure protocol built-in to a wide
array of desktop and mobile devices. L2TP/IPsec features 256-bit encryption, but
the extra security overhead requires more CPU usage than PPTP. L2TP/IPsec is an
excellent choice if OpenVPN is not available on your device, but you want more
security than PPTP.
Internet Protocol Security (IPsec) - IPsec is actually a collection of
multiple related protocols. It can be used as a complete VPN protocol solution or
simply as the encryption scheme within L2TP or PPTP. IPsec exists at the network
layer (Layer Three) of the OSI model. If you are choosing to use IPSec, you should
know about the two modes it uses to transport the data: tunnel and transport.
Tunnel: In tunneling mode, the entire packet it encrypted, including the header
information. The packet is then encapsulates the encrypted packet and adds a new
header before sending the data. Specifically, Encapsulating Security Payload (ESP)
and Authentication Header (AH) are the two IPSec security protocols used to provide
these security services. However, we will not get into that in this guide.
Transport: This mode encrypts the payload, but does nothing to protect the header
information. Again, the header information provides information such as: source
and destination IP address, port information, frame sequence, flags, etc.
OpenVPN - OpenVPN is the premier VPN protocol designed for modern broadband
networks, but is not supported by mobile devices and tablets. OpenVPN features 256-
bit encryption and is extremely stable and fast over networks with long distances
and high latency. It provides greater security than PPTP and requires less CPU
usage than L2TP/IPsec. OpenVPN is the recommended protocol for desktops, including
Windows, Mac OS X, and Linux.
Secure Socket Layer (SSL) - An SSL VPN is a form of VPN that can be used
with a standard Web browser. In contrast to the traditional Internet Protocol
Security (IPsec) VPN, an SSL VPN does not require the installation of specialized
client software on the end user's computer. It's used to give remote users with
access to Web applications, client/server applications and internal network
connections.
One last thing that I want to talk about is split tunneling. Split tunneling
is the act of being connected to both a WAN network (VPN) and a LAN network (your
local home network) at the same time. When enabled, data intended for the secure
VPN might accidently leak out the insecure part of the network. Another negative
risk, is that an attacker can gain access to your computer via the LAN network and
have access to your private network you are connected to over the WAN. For best
security, it is advised to have split tunneling disabled at all times.
Some people where asking me about the risks involved in Omegle and downloading
pictures to your computer. So, briefly, I am going to describe here what I told
them. Firstly and most obviously, Tor does not support cam sites for the reason
listed in section 9.11. Quite simply, Tor does not support UDP traffic in which
video streaming operates. So, if you wondering how people actually captures this
traffic and obtains your IP address, this is how:
That described simply how to capture the IP address via a packet sniffer. When
connected, this connection can also be seen in your netstat list; but familiarizing
yourself with this might be a challenge if you don’t know what you are looking at.
The reason being is UDP traffic connects directly to your machine. TCP traffic
connects to a third party site such as Omelge. Another method is getting the
person to go to a honeypot that captures the users IP address when they click on a
link and navigate to that site. They are a few out there, and it is easy for
people to be baited into navigating to these sites.
Looking at the illustration below, you will see an example of a netstat output.
The local address (red) with be your computer and the foreign address (yellow) is
the remote device. 127.0.0.1 is your computers loopback address. So, this is
telling you that the computer with the IP address of 192.168.0.6 is connecting to a
website at 66.102.1.104 and 72.232.101.40. You know this because the “:80” next to
the foreign addresses. Port 80 is used for HTTP traffic when a user wants to
connect to a website. The other ports next to 192.168.0.6 are random ports
assigned by the system. And using an IP lookup tells you that the first IP address
of 66.102.1.104 belongs to google whereas 72.232.101.40 belongs to Layered
Technologies. Note: you can either find a website to lookup the IP address or you
can try to enter the IP address directly into the address bar.
Proto – or protocol – is the internet protocol being used; this can being
either TCP or UDP. TCP connection oriented and a lost packet will be resent so
there is no loss of data during transmission. UDP on the other hand is
connectionless and if a packet is lost, the packet is lost forever. There are
about 12 states that you can familiarize yourself with, but we won’t get into that
much in this guide. For this example, established means that the connection
(socket) has been established, listening means that the socket (the program that
created the connection) is waiting for incoming connections, and time_wait means
that the socket is waiting after close to handle packets still in the network.
Finally, the PID is the program that is handling the connection. This PID number
is created per program and can change every time to program is started.
To look up the application associated with the particular PID, you can use
Windows Task Manager. The Task Manager can be opened by right-clicking the Taskbar
and selecting Task Manager. However, Task Manager does not display PID information
by default. To display the PID value in Task Manager, go to Processes tab, click
on View menu, then click on Select Columns…. In the “Select Columns” or “Select
Process Page Columns” dialog, tick and check the checkbox for PID (Process
Identifier), and click OK. You can right-click the process and click Properties to
view which program is being run and where.
The picture above shows the typical three-way handshake when capturing traffic
in Wireshark. You will see [SYN], [SYN, ACK], then [ACK]. Host A send a
SYNchronize packet to Host B, Host B responds with the SYNchronize-ACKnowledgement
packet back to Host A, and Host A once finalizes the connection with a
ACKnowledgement packet to Host B. Once the handshake is complete you will see a
flood of UDP traffic. Again, the UDP traffic is all the webcam traffic data and is
the only traffic you are going to concern yourself with.
When looking at all this traffic, you want to concern yourself with three
fields in particular: Source, Destination, and Protocol. The source is where the
information is coming from, the destination is where the traffic is going to, and
the protocol defines the protocol being used. The picture below shows what traffic
will look like in Wireshark when the UDP protocol is being used. Notice that this
picture only shows UDP traffic flowing through the network. This is because you
can filter traffic in WireShark to show pretty much whatever you want it to show.
So, the three fields I will be describing are the Source and Destination
fields. You will notice that there are two IP address being used: 192.168.0.103
and 78.167.170.99. If you followed the Try it out - Capture IP Address from Omegle
you might remember that 192.168.0.103 is the address of local user that is
capturing the traffic and the 78.168.170.99 is the user that is connected on the
other side. Your IP address will either start with a 192.168.x.x or a 10.x.x.x or
possibly a 172.x.x.x. Most likely, a 192.168.x.x. The other IP address will the
address of the user that is connected to you; this is the IP address that you are
looking for and is the IP address that attackers will look for as well.
To protect yourself when dealing with UDP information (audio or video chat),
you can use a UDP proxy, a VPN, or configure a VPN over Tor. I usually just use a
VPN that claims to not log any traffic; but who knows if that claim holds merit.
Simple text chat uses TCP packets which Tor can protect. Obviously, do not use
shortlinks as they can link to a honeypot or another rouge site. And if you do
decided to open links you are unsure about, make sure you do via Tor with JS
disabled.
Most people have home routers with stock firmware, so most of this does not
apply. For those of you interested in having more granular control of your router,
you can search the internet for custom firmware; for example, DD-WRT is a good
Linux-based firmware. Also, you can purchase managed ports and wireless access
points specifically for this purpose. Most commercial equipment can manage what I
am about to talk about, but they usually run in the several thousands, if not
hundreds of thousands.
One of the basic hardening techniques for wireless security is the use of
VLAN's. If the attacker gets passed your wireless controls and into your network,
VLAN's will ensure that they cannot read your network traffic. Let's say some
ports on switch A are in VLAN 10 and other ports on switch B can are in VLAN 10.
Broadcasts between these devices will not be seen on any other port in any other
VLAN, other than 10. However, these devices can all communicate because they are on
the same VLAN. Without additional configuration, they would not be able to
communicate with any other devices, not in their VLAN. You should also know that
VLAN's can be set up on the same switch.
You should also know about rouge AP's; specifically when an attacker
impersonates an SSID. Rouge Access Points are a security concern because an
attacker can set up a device such as a router or computer to have a similar or the
same SSID as the wireless Access Point you connect to. Unscrupulous parties can
connect to this rouge device and all traffic can be logged and MiTM attacks can be
performed. This threat is of low concern because it is not very likely to happen.
8.9 Extra: MAC Address Spoofing and ARP Attacks - How they work
Two methods I want to talk about are: ARP poisoning and MAC address spoofing.
As many of you already know MAC address spoofing is also a way to hide your
computer or to get free Internet when places either filter computers by MAC
addresses or have a pay to-use-system. A few of you have asked how this works and
instead of reinventing the wheel each and every time I decided to create this
fundamental, quick how-it-works section. These are a couple of reasons why you
should lock down your private network and never use public networks.
Let’s say Bob wants to talk the Alisha on the same network (send data). There
is a protocol called ARP, which stands for Address Resolution Protocol, that will
send a request to the switch (or all of the devices in the network if you’re using
a hub) that you are trying to communicate with Alisha. When Alisha responds, she
will send back the MAC address of her computer to the switch. The switch, will then
learn Alisha’s MAC address if it doesn’t already know and send it back to Bob. Now
Bob, having Alisha’s MAC address, will fill in the destination MAC address (which
is Alisha’s computer) and send data using that information.
Here’s an example: Bob wants to send Alisha a file over the network. Bob
first sends an ARP request to the switch (most, if not all, home routers have a
switch build in) saying “hey, I want to talk to Alisha, here is her IP address.
What is her MAC address so I can send the data?” The switch looks in the MAC
address table and determines that Alisha’s MAC address is F026:EA98:EB03:C68E (if
the MAC address is not known, it sends the ARP request to ALL of the computers on
the network, except for Bob’s, until Alisha responds back, “It’s me!”) Once the
MAC address is determined, it is sent back to Bob so he can transfer the data.
This is where MAC address spoofing comes in, because as you just learned,
computers do not transfer data using the IP address, but instead the MAC address.
So MAC address spoofing, tricks the switch into thinking your computer (let’s say
you are Steve), is actually Alisha’s computer. So now when Bob wants to send data
to Alisha, half the packets will go to Alisha and half the packets will go to
Steve. For the same reason this works, the pay to-use-system can be defeated as
well. This pay to-use-system uses the MAC addresses to send data to already
authorized computers which in turn is tricked and data is sent to you without
charge.
ARP poisoning on the other hand when an attacker is able to compromise the ARP
table on the other machine and changes the MAC address so that the IP address
points to another machine. If the attacker makes the compromised device’s IP
address point to his own MAC address then he would be able to steal the
information, or simply eavesdrop and forward on communications meant for the
victim.
THIS IS EDUCATIONAL AND PROVIDED TO HELP YOU PROTECT YOURSELF BY EXPLAINING THE
METHODS OF ATTACKS BY OFFENDERS. I DID NOT WRITE THIS WITH THE INTENTION FOR
ANYBODY TO USE IT AGAINST ANYONE ELSE. SO PLEASE DON'T!
ARP Poisoning Demonstration (you will need Cain and Able installed on your
machine):
Open Cain
Click the Sniffer tab and turn on the network sniffer (the network
interface button next to the folder icon on the second row)
This should already be selected, but ensure that the Hosts tab is selected
at the bottom
At the top, click the blue Plus button to scan for MAC addresses.
Alternatively, you can right-click anywhere in the datagrid (white box) and select
Scan MAC Addresses
Once populated with devices other than your Default Gateway (usually any IP
address ending with the octet of 1) or your computer, select the APR tab at the
bottom
Make sure APR is selected over on the left and click anywhere in the top
datagrid (the top field that is blank). The Plus button at the top should no
longer be greyed out.
Once the New APR Poisoning Routing dialog box appears, you will select the
computers that you wish to attack
Over on the left, you will select your Default Gateway and over on the
right you will select the computer you wish to attack (the datagrid on the right
will populate once the GW is selected on the left) *Doing this has the potential of
causing a DoS attack whereas the victim cannot access the internet or any data in
the network
Finally, select the "session" that you just created (under Status, it will
say Idle) and click the ARP Poisoning button on the top that is next to the sniffer
button you clicked on earlier. If successful, the status will change from Idle to
Poisoning
From here, you can capture data packets, usernames, passwords, email
addresses, and etc.
The only way to defeat this is to use encryption such and client to hosts
VPN's, PKI, or Tor
To stop the attack, you can click the ARP Poisoning button and the Sniffer
button once more
Again, I should provide the warning that there are other ways they can see your
traffic if they: use a packet sniffer and perform a MiTM attack if their wireless
network is not protected, if they were using a network hub which broadcasts
information out of all ports, if they have a managed switch and enable port
mirroring, or if they change the MAC address of their computer to that of the AP
(Access Point) as mentioned above.
MiTM attack stands for Man in The Middle attack and is when an attacker inserts
himself between you and the person – or service – you are connected to. As I said
before, one this is accomplished, the attacker can then capture all information,
strip SSL to obtain information such as passwords, insert malicious code, redirect
the user, or block the user from a service all together. To prevent again MiTM
attacks, you can use a VPN or encryption to authenticate you and the remote host
alike. These attacks are used moreso on local networks then used over the
internet; however, it is still possible.