Unit 1 To 5 Notes
Unit 1 To 5 Notes
Computer crime is any illegal activity that is perpetrated through the use of a
computer.
Over the past few years, the global cyber-crime landscape has changed
dramatically, with criminals employing more sophisticated technology and greater
knowledge of cyber security. Until recently, malware, spam emails, hacking into
corporate sites and other attacks of this nature were mostly the work of computer
'geniuses' showcasing their talent.
Online fraud and hacking attacks are just some examples of computer-
related crimes that are committed on a large scale every day.
Types of Cybercrime
There are many types of cyber-crimes and the most common ones are
explained below:
Example of cyber-crime:
a) Compromising of Milnet
b) The Morris Worm
c) Crash of AT and T.
Robert Morris created a worm to impress his friends, but did not
recognize the potentiality for destruction. It was attempted to warn victims
and instructing them on how to remove the worm prior to massive
destruction. But it is too late. It caused millions of dollars in damage and
crippled 10 % of all computers connected to the Internet. First person
convicted under the new computer fraud and abuse act.
AT&T crashes due to their own failures but blame shifted to legion of
doom.
Clarification of Terms
Computer crimes will likely become more frequent with the advent of
further technologies. It is important that civilians, law enforcement officials,
and other members of the criminal justice system are knowledgeable about
computer crimes in order to reduce the threat they pose.
Evidence suggests that the longer it takes to discover the theft, the
greater the loss incurred and the smaller the likelihood of successful
prosecution. Older persons and those with less education are less likely to
discover the identity theft quickly and to report it after discovery.
There are a lot of ways that thieves can steal an identity. One way is to
get possession of a person's debit card (ATM card) and their Personal
Identification Number (PIN).
Identity theft has become a major problem with people using the
Internet for cash transactions and banking services. In this cyber-crime, a
criminal accesses data about a person's bank account, credit cards, debit card
and other sensitive information to siphon money or to buy things online in
the victim's name.
Four approaches used by identity thieves
When files are deleted, usually they can be recovered. The files are
marked as deleted, but they are still residing in the disk until they are
overwritten. Files may also be hidden in different parts of the disk. The
challenge is to piece the different part of the file together to recover the
original file.
Impact is not all incidents are equal. Cyber security incidents are
associated with malicious attacks or Advanced Persistent Threats.
Incident Detection
It is essential end-users, help desk staff, and all security personnel are
properly trained in incident reporting, so in the event of an actual incident
the IR team is properly notified and can effectively execute IRP procedures.
1. Pre-incident preparation
2. Detection of incidents
3. Initial response
4. Formulate response strategy
5. Investigate the incident
6. Reporting
7. Resolution
Forensics analysis
Hard copy print outs of digital information are not digital evidence in
the strict sense of this definition; it is considered a starting point for applying
digital evidence gathering in the future.
Forensics is the application of investigative and analytical techniques
that conform to evidentiary standards used in or appropriate for a court of
law or another legal context.
Computer Language
Network Language
Offline mode
Online mode
Client process e-mail messages on the server. The e-mail messages are
stored on the server itself but are processed by an application on the client's end.
Disconnected mode
Delete mode and the keep mode. In the delete mode, mail is deleted
from the mailbox after each retrieval. In the keep mode, the mail remains in
the mailbox after retrieval.
To track an e-mail message back to the sender you simply retrace the
route that the e-mail travelled by reading through the e-mail's received
headers. Killers, online sex offenders, cyber stalkers, computer intruders and
fraudsters use the Internet as an instrument to commit their crimes.
When the Internet plays a less active role in a crime, it is more useful
to categorize it as “information as evidence.” For example, digital evidence
on the Internet can simply indicate that a crime has occurred and provide
investigative leads.
Incident Recovery
1. Alerts ad warning
3. Vulnerability handling
Types of Incidents
There are many types of computer incidents that may require IR team
activation. Some examples include:
1. Data imaging
2. Data recovery
3. Data integrity
4. Data extraction
5. Forensic analysis
6. Monitoring
Understanding Computer Investigation
To track an e-mail message back to the sender you simply retrace the
route that the e-mail travelled by reading through the e-mail's received
headers. Killers, online sex offenders, cyber stalkers, computer intruders and
fraudsters use the Internet as an instrument to commit their crimes.
When the Internet plays a less active role in a crime, it is more useful
to categorize it as “information as evidence.” For example, digital evidence
on the Internet can simply indicate that a crime has occurred and provide
investigative leads.
When dealing with digital evidence, all of the general forensic and
procedural principles must be applied.
More violent offenders and their victims are using computers and
networks, therefore digital evidence are to be fully exploited.
For any investigation the key is information about the circumstances.
The information obtained has value only when it is properly recognized and
collected.
Chain of custody: Route the evidence takes from the time you find it
until the case is closed or goes to court.
1. Situation
2. Nature of the case
3. Specifics of the case
4. Evidence type
5. Operating system
6. Known disk format
7. Evidence location
Data Acquisition
Write Blockers
A software layer that sits in between the OS and the device driver for
the storage device. It prevents all disc requests that use system calls to write
data to the storage device. The SWB should not modify a read-only disk.
The SWB is designed to prevent any operations on data storage media that
are not write protected.
1. Disk-to-image file
2. Disk-to-disk copy
3. Logical disk-to-disk or disk-to-data file
4. Sparse data copy
Data acquisition methods Remarks
Drawbacks
a) LAN's data transfer speeds and routing table conflicts could cause
problems.
b) Gaining the permissions needed to access more secure subnets
c) Heavy traffic could cause delays and errors
d) Remote access tool could be blocked by antivirus
a) Trusted CD
b) Preinstallation
c) Pushing out and running remotely
PDServer can run in a stealth mode and it can change process name
to appear as OS Function.
Linux can read hard drives that are mounted as read-only. Windows
OSs and newer Linux automatically mount and access a drive
Windows will write to the Recycle Bin, and sometimes to the NTFS
Journal, just from booting up with a hard drive connected
Linux kernel 2.6 and later write metadata to the drive, such as mount
point configurations for an ext2 or ext3 drive. All these changes corrupt the
evidence
Forensic Linux Live CDs mount all drives read-only, which eliminates
the need for a write blocker.
An attack has taken place. You, the investigator has just arrived on the
scene. It is expected that the attacker uses encrypted disk volumes.
1. Computer-generated records
2. Computer-stored records
Authorization:
1. Examination
2. Analysis
Examination phase involves the use of forensic tools to recover deleted files
and retrieve and characterize operating system artifacts and other relevant material.
Analysis phase uses those materials to answer the questions that gave rise to the
investigation.
Incident response policy must spell out the procedures for initiating
investigative process. Particularly critical in private sector, as private
organizations do not enjoy the broad immunity accorded to law enforcement
investigations
Document Evidence
a) Parol evidence
b) Authentication
c) Best evidence
d) Hearsay.
The best evidence rule can be used to deny the admissibility of copies
or replications of certain documents. Under this rule, when the contents of a
written document are offered in evidence, the court will not accept a copy or
other proof of the document's content in place of the original document
unless an adequate explanation is offered for the absence of the original.
If you get different results when you repeat the steps, the credibility of
your evidence becomes questionable. At best, the evidence's value is
compromised; at worst, the evidence will be dis-qualified. Because of the
nature of electronic components, failures do occur.
For example, you might not be able to repeat a data recovery because
of a hardware failure, such as a disk drive head crash. Be sure to report all
facts and events as they occur. Besides verifying your work, a journal serves
as a reference that documents the methods you used to process digital
evidence. You and others can use it for training and guidance on other
investigations.
Processing and Handling Digital Evidence
The evidence you acquire at the scene depends on the nature of the
case and the alleged crime or violation.
Digital forensics is the discipline that deals with all the process that
includes collecting digital materials from the crime scene, examining,
analyzing and reporting them according to certain standards and methods.
Digital devices store the data in internal and external storage devices.
The stored data has to be taken with certain methods. Shadow copying only
the criminal part of the stored data or all of it from a device is named as
image acquisition
A file system defines the structure and the rules used to read, write
and maintain information stored on a disk.
File System
File systems are abstraction that enables users to read, manipulate and
organize data. Typically, the data is stored in units known as files in a
hierarchical tree where the nodes are known as directories.
The DOS and Windows file systems use fixed-size clusters. Even if
the actual data being stored requires less storage than the cluster size, an
entire cluster is reserved for the file. This unused space is called the slack
space.
A table that the operating system uses to locate files on a disk. Due to
fragmentation, a file may be divided into many sections that are scattered
around the disk. The FAT keeps track of all these pieces.
FAT file systems are commonly found on floppy disks, flash memory
cards, digital cameras and many other portable devices because of their
relative simplicity.
File and folders are organized on FAT formatted volume which uses
directory and file allocation table. The (C:\ or D:\) is the root folder at a per
defined location on the volume. Folder contains a list of file and
subdirectories. Fig. shows the folder view of the file system.
Folder view
Folder view contains starting cluster, date, time associated with each
file. FAT file system shows only last accessed date not time. At command
line, “dir” command is used to gate the information about files and directory.
The FAT shows only a list with one entry for each cluster in a volume.
Each entry in the FAT indicates what the associated cluster is being used for
the following Fig. 2.2.1 shows output from Norton disk editor on file
allocation table.
When a file is deleted, the file system will perform one of two tasks
on the allocation table. The file's entry on the file allocation table marked as “free
space” or the file's entry on the list is erased and then the space is marked as free.
Master file table is the heart of NTFS. The MFT is an array of file
records. Each record is 1024 bytes. The first record in the MFT is for the MFT
itself. The name of the MFT is $MFT. The first 16 records in the MFT are reserved
for metadata files.
An MFT can be too big if a volume used to have lots of files that were
deleted. The files that were deleted cause internal holes in the MFT. These holes
are significant regions that are unused by files. It is impossible to reclaim this
space. This is at least true on a live NTFS volume.
Fig shows NTFS Partition.
NTFS partition
As files are added to an NTFS volume, more entries are added to the
MFT and so the MFT increases in size. When files are deleted from an NTFS
volume, their MFT entries are marked as free and may be reused, but the MFT
does not shrink. Thus, space used by these entries is not reclaimed from the disk.
Directories are treated in NTFS as index entries and store folder entries
in a B-Tree to accelerate access and facilitate resorting when entries are deleted.
NTFS uses an encoding scheme called Unicode.
The attribute places INDX records in a B+ tree, where the key is the file
name. A B+ tree is a data structure where arbitrary records are organized by a sort
able key value, such as a number or a string. For a forensic investigator, the effect
of the B+ tree is that INDX records associated with a node are stored as a chunk in
alphanumeric order.
NTFS captures the difference between logical file size and valid data
length in two MFT fields.
A data stream does not appear when a file is opened in a text editor. The
only way to see if a data stream is attached to a file is by examining the MFT entry
for the file.
Alternate data stream: The stream in any data attribute on a file or directory other
than the default, unnamed stream.
The best use of compression is for files which are repetitive, written
seldom, usually accessed sequentially: log files are an ideal example.
Compressing a file adds serious complexity to the way the file is stored.
The MFT is the only place that contains information about what parts are
compressed and by how much. If MFT is corrupted there is little hope retrieving
the data
Each NTFS data stream contains information that indicates whether any
part of the stream is compressed.
When writing a compressed file, the system reserves disk space for the
uncompressed size. The system gets back unused space as each individual
compression buffer is compressed.
If the compressed information takes up less space than the source file,
then the rest of the space is labeled as sparse space and no space on the volume is
allocated to it. Because the compressed data often doesn't have a size exactly that
of the cluster, the end of each of these blocks stays as unusable space of significant
size.
As a first step to encrypt file, NTFS creates a log file called “Efs0.log”
in System Volume Information folder on the same drive, as encrypted file. Then
EFS acquires access CryptoAPI context. EFS generate File Encryption Key (FEK).
The next step is to get public/private key pair; if it does not exist at this
stage, EFS generate a new pair. EFS uses 1024-bit RSA algorithm to encrypt FEK.
EFS create Data Decryption Field (DDF) for the current user, where it
places FEK and encrypts it with public key. If recovery agent is defined by system
policy, EFS creates also Data Recovery Field (DRF) and places there FEK
encrypted with public key of recover agent.
The contents of original file (plain text) are copied into temporary file,
after that the original is overwritten with encrypted data.
By default, EFS uses DESX algorithm with 128-bit key to encrypt file
data, but Windows could be also configured to use stronger 3DES algorithm with
168-bit key. After encryption is done, temporary and log files are deleted.
After file is encrypted, only users who has correspondent DDF or DRF
can access the file. This mechanism is separate from common security meaning
that beside rights to access file, the file must have its FEK encrypted with user's
public key.
Only user who can decrypt FEK with his own private key, can access
the file. The consequence is, that user, who has access to the file, can encrypt it
thus preventing the owner to access his own file.
The decryption process is opposite to encryption: First, system checks if
user has a private key used by EFS. If yes, it reads EFS attributes and walk through
the DDF ring looking for DDF for current user.
With FAT32 volumes, the volume serial number is stored in the boot
sector at offset 67 (0x43). When formatted, this floppy diskette returned the
volume serial 2514 - 1DF4. The disk was formatted on Sunday, 19th October 2003
at 22:33:27.01.
Calculation of volume serial number is as follows:
For example, JPEG files typically have the “JFIF” signature in the
beginning, followed by the file header.
PDF files begin with “%PDF” and ZIP archives start with “PK”. Some
other files can be true binary.
Physical file size: It is the size given to the file on the hard disk. The physical file
size is always greater than or equal to the logical file size.
File slack is the difference between the physical file size and logical file
size. The file slack should always be less than 1 cluster.
For example: A data file size is 5055 bytes and it is given 2 clusters
space. 1 cluster = 4096 bytes. Two clusters mean 8192 bytes.
Hard disk is fully encrypted and suspect who refuses to give up the key
is totally useless to an investigator. If type of encryption algorithm is also known, a
brute force attack on any good encryption key is infeasible.
If the suspect has chosen one long and random password, then it is
impossible to recover any data form that computer.
For this type of situation, there are many specialized tools available that
can bypass or recover passwords of various files. The most powerful and versatile
password recovery programs currently available are PRTK and Distributed
Network Attack (DNA) from Access Data.
Log File
The Windows application, security, and system log files can be read
with a Windows application called “Event Viewer,” which is accessed through the
Control Panel.
Most log files are in plain text format. You can view them with any text
editor such as Vi or Emacs. Some log files are readable by all users on the system;
however, root privileges are required to read most log files.
Registry
The registry is made up of keys. Each key is like the branch of a tree.
Each key has one parent key and zero or more child keys. Each key can contain
zero or more “Values”, each of which contains a single piece of data.
In some registry file, keys value stored in hexadecimal format but it can
be converted to ASCII and saved to a text file.
There are two basic types of data that are collected, persistent data and
volatile data. Persistent data is that which is stored on a hard drive or another
medium and is preserved when the computer is turned off. Volatile data is any data
that is stored in memory or exist in transit and will be lost when the computer is
turned off. Volatile data might be key evidence, so it is important that if the
computer is on at the scene of the crime it remain on. There are a variety of tools
used to collect data.
Tools are used to analyze digital data and prove or disprove criminal
activity. It is used in 2 of the 3 phases of computer forensics.
Software forensic tools: There are two types of software forensic tools. Command-
line applications and GUI applications are two types. It is commonly used to copy
data from a suspect’s disk drive to an image file.
1. Acquisition
2. Validation and discrimination
3. Extraction
4. Reconstruction
5. Reporting
Authenticate that the copy of the evidence. Investigators must verify the
copy of the evidence is exactly the same as the original.
Analyze the digital copy. The specific procedures performed in an
investigation are determined by the specific circumstances under which the
investigation is occurring.
These computer forensics tools can also be classified into various categories:
Tools
The Sleuth Kit (TSK) is a library and collection of Unix- and Windows-
based tools and utilities to allow for the forensic analysis of computer systems. It
allows examination of DOS, BSD, Mac, Sun, GPT partitions and disks.
The results generated by Sleuth Kit tools are used by another tool. The
autopsy forensic browser which presents such details as image integrity, keyword
searches and other automatized operations about the investigated partition through
a graphical interface.
The Sleuth Kit was written in C and Perl and uses an aspect of the TCT code.
The TCT tools do not recognize NTFS, FAT or EXT3 partitions, making
them of little use when performing forensic investigations in machines with
Microsoft Windows and/or Linux operating systems with EXT3 file systems.
FTK TOOL
FTK can analyze data from several sources, including image files from
other vendors. FTK also produces a case log file, where you can maintain a
detailed log of all activities during the examination such as keyword searches and
data extractions.
FTK provides two options for searching for keywords. One option is an
indexed search, which catalogs all words on the evidence drive so that FTK can
find them quickly. The other option is live search, which can locate items such as
text hidden in unallocated space that might not turn up in an indexed search.
Maresware
Functions of Maresware
Forensic Suite
Data: Retrieves data from active and deleted files, file systems,
unallocated and unused space, and compressed, encrypted, and password-protected
data.
Physical Extraction:
Chain of Custody
Clinical Significance
1. Unique identifier
2. Name and signature of the sample collector
3. Official address and contact number
4. Name of the recipient
5. Laboratory's address
6. Details of each sample, including:
7. Unique identifier and matrix
8. Date and time of collection
9. Type of analysis required
10. Signatures of everyone involved in the chain of possession with date
and time
11. Date and method of delivery
12. Authorization for the analysis of the sample
13. Any other information about the sample
Each time the charge of evidence is changed, the chain of custody form
requires an entry of signature, date, and time. A sample shall be deemed to be in
custody if it is in the authorized custodian’s actual physical possession in a secured
place without access to unauthorized personnel or any opportunity for tampering.
An illustration of the chain of custody in the case of the recovery of a blood-
stained flat iron rod at the scene of a murder depicted in the routine text is as
follows: “Investigating officer Steve collects the iron rod, packs it, and hands it to
forensic analyst Jack. Forensic analyst Jack analyses the iron rod at the laboratory
and collects fingerprints and blood from the iron rod. Jack then hands over the iron
rod and all the collected evidence from the iron rod to the evidence-receiving clerk,
Tom. The evidence-receiving clerk, Tom, then stores the evidence in the evidence
storage locker. Tom records all those who have accessed the original
evidence.” During the trial, if the defense counsel raises queries on the chain of
evidence, the records demonstrate that the iron rod in the evidence storage is the
same as that collected from the crime scene. Still, if inconsistencies persist and the
prosecution cannot prove who had the iron rod at a given time, the chain is deemed
broken, and the defense counsel may seek in the court to have the resultant
evidence annulled.
Apart from crime scene investigation, the other areas which also find the use
of the chain of custody maintenance include (but are not limited to):
Civil litigation
In research (involving the use of animals) to know whether the animals were
ethically raised/sourced or not
In clinical trials
In the fields of history, art collection to see the provenance (timeline of the
ownership, custody, or location of the painting, document, or a piece of art/antique)
Example
Raman Spectroscopy
Microspectroscopy
The 20/20 PV™ Craic Microspectrometer can take spectra and images
of microscopic samples from the deep ultraviolet to near infrared (200-2100nm)
with one seamless operation. It can acquire microspectra™ and images in
absorbance, reflectance, and fluorescence modes.
Equipped with a high resolution digital colour video camera the VSC
offers 5M pixel digital Firewire camera 2584 x 1956 viewable pixels with x22
motorised zoom output providing excellent image quality. Software features
include casework management; image integration, processing and measurement;
colour measurement and archiving facilities.
A key feature of the microscope is that the light is focused through the
objective, dramatically increasing definition of surface features visible to the eye.
The end magnification ranges from 4x to 80x, corresponding to object field sizes
of 50mm to 2.5mm. A large variability of clamping and mounts for different
objects are available.
Fibre Comparison Microscope
Crime Lite x3
UV-VIS Spectroscopy
The Agilent Cary 60 UV-Vis spectrophotometer comprises a double
beam, Czerny-Turner monochromator, 190–1100 nm wavelength range, 1.5 nm
fixed spectral bandwidth, full spectrum Xenon pulse lamp single source with
exceptionally long life, dual silicon diode detectors, quartz overcoated optics, scan
rates up to 24,000 nm/min, 80 data points/sec maximum measurement rate, non-
measurement phase stepping wavelength drive, room light immunity, central
control by PC with Microsoft® Windows® operating system. Supported by GLP
software.
UNIT – III
ANALYSIS AND VALIDATION
During verification, results from a few samples are compared with results
obtained from other evidence. In the forensic field, this evidence is usually
validation data, typically in the form of publications or reports that detail the
performance characteristics of the standard method. The outcomes of the
verification process are closely linked to the quality and reliability of the validation
process. However, validation is a more intensive and rigorous process than
verification.
System validation is associated with data generation and requires the unique
identification of systems, identification of system restarts, identification of changed
system configuration and attributes, and validation that messages were in fact
generated by the designated system.
Data collection: After data is generated, a repository must collect the data.
This will require ensuring that the data is not modified on the way to the repository
and providing validation of temporal relationships. These needs for forensics
would be insufficient in terms of security, which would also require that the data
could not be read and examined in transit.
1. For target drives, use recently wiped media that have been
reformatted and inspected for viruses
2. Inventory the hardware on the suspect's computer, and note
condition of seized computer
3. For static acquisitions, remove original drive and check the date
and time values in system's CMOS
4. Record how you acquired data from the suspect drive
5. Process drive's contents methodically and logically
6. 6. List all folders and files on the image or drive
7. Examine contents of all data files in all folders
8. Recover file contents for all password-protected files
9. Identify function of every executable file that doesn't match hash
values.
A hex editor is a software used to view and edit binary files. A binary file is
a file that contains data in machine-readable form.
Hex editors allow editing the raw data contents of a file, instead of other
programs which attempt to interpret the data for you. Since a hex editor is used to
edit binary files, they are sometimes called a binary editor or a binary file editor.
If you edit a file with a hex editor, you are said to hex edit the file, and the
process of using a hex editor is called hex editing.
A typical hex editor has three areas : An address area on the left, a
hexadecimal area in the center and a character area on the right.
Data can be edited in a hex editor just like a normal text editor. A hex editor
has a cursor that can be moved by clicking with the mouse or using the cursor
keys.
Position the cursor over the byte you want to edit and type the value you
want to change to using the keyboard. The cursor can be switched between the
hexadecimal area and the character area by pressing the 'Tab' key.
When the cursor is in the hexadecimal area, you have to enter byte values in
hexadecimal notation, but when the cursor is in the character area, you can enter
regular characters just like a text editor.
The most advanced feature of hex editors is now the ability to place a
template over a file that allow you to understand what the bytes of a binary file
actually mean.
Hex workshop generates the hash value of selected data in a file or sector.
Data Hiding Techniques
Techniques:
Files are hiding by using operating system. One method is changing the file
extension. Advanced digital forensics tools check file headers and compare the file
extension to verify that it's correct or not. If there's a discrepancy, the tool flags the
file as a possible altered file. One more hiding technique is selecting the hidden
attribute in a file's properties dialog box.
Only way they can be accessed from the OS is by changing them to good
clusters with a disk editor. Disk Edit runs only in MS-DOS and can access only
FAT-formatted disk media
Steganography is used for high security and capacity, which often entails
that the hidden information is breakable.
Open codes hide a message in a legitimate carrier message in ways that are
not obvious to an unsuspecting observer.
Steganography tools
1. MP3Stego: Hide files within mp3 files. MP3Stego will hide information
in MP3 files during the compression process. The data is first
compressed, encrypted and then hidden in the MP3 bit stream.
2. TextHide: Simple text steganography
3. wbStego: This tool used for bitmaps, text files, HTML files and PDF
files Steganography.
4. Hide4PGP is a freeware program distributed as source code in ANSI C
and precompiled executables for DOS and the Win32 console.
Difference between Stenography and Cryptography
Steganography Cryptography
Following is the three different ways of determining the best acquisition method of
data acquisition:
Bit-stream image: Is the file that contains the bit-stream copy of all the data on a
disk or disk partition.
Network Forensics
Network attack
1. Denial of service
a. Denial of service attacks cause the service or program to cease
functioning or prevent others from making use of the service or
program. These may be performed at the network layer by
sending carefully crafted and malicious datagrams that cause
network connections to fail.
b. They may also be performed at the application layer, where
carefully crafted application commands are given to a program
that cause it to become extremely busy or stop functioning.
c. Preventing suspicious network traffic from reaching hosts and
preventing suspicious program commands and requests are the
best ways of minimizing the risk of a denial-of-service attack.
Network security starts from authenticating any user, most likely a username
and a password. Once authenticated, a stateful firewall enforces access policies
such as what services are allowed to be accessed by the network users
Such analysis could be used to further tighten security of the actual network
being protected by the honeypot.
Some tools: Firewall, Antivirus software and Internet Security Software. For
authentication, use strong passwords and change it on a bi-weekly/monthly basis.
When using a wireless connection, use a robust password. Network analyser to
monitor and analyze the network.
When intruders break into a network they leave a trail. Need to spot
variations in network traffic; detect anomalies.
Network forensics can usually help to determine whether network has been
attacked or there is a user error.
1. Network Miner
The main view is host centric (information grouped per host) rather
than packet centric (information showed as a list of packets/frames).
Open-source tools
1. Wireshark
2. Kismet
3. Snort
4. OSSEC
5. NetworkMiner is an open-source Network Forensics Tool available at
SourceForge.
6. Xplico is an Internet/IP Traffic Decoder (NFAT). Protocols supported:
HTTP, SIP, FTP, IMAP, POP, SMTP, TCP, UDP, IPv4, IPv6
Use of Wireshark
Use filters to capture only packets of interest to you. Wireshark uses two
types of filters:
1. Capture filters
2. Display filters
Capture filters: Filtered while capturing. Like TCP Dump. Wireshark contains a
powerful capture filter engine that helps remove unwanted packets from a packet
trace and only retrieves the packets of our interest.
Display filters: let you compare the fields within a protocol against a specific
value, compare fields against fields, and check the existence of specified fields or
protocols. More detailed filtering. Allows to compare values in packets but not real
time.
Example:
Comparison operators
Fields can also be compared against values. The comparison operators can
be expressed either through English like abbreviations or through C-like symbols.
Symbol Meaning
== Equal (eq)
() Grouping
Logical expressions
Tests can be combined using logical expressions. These too are expressible
in C-like syntax or with English like abbreviations:
Symbol Meaning
|| Logical OR
! Logical NOT
Snort
Intrusion detection is a set of techniques and methods that are used to detect
suspicious activity both at the network and host level. Intrusion Detection System
is software, hardware or combination of both used to detect intruder activity.
Snort uses rules stored in text files. Text editor can use for modifying the
rules. Rules are grouped in categories. Separate file is maintained for each group.
The “snort.conf “is the main configuration file and all group files are included in
this file. At startup time, snort reads these rules and builds data structure.
Components of snort
1. Packet decoder
2. Preprocessors
3. Detection engine
4. Logging and alerting system
5. Output modules
Packet decoder: It takes packets from different types of network interfaces like
Ethernet, SLIP, PPP and prepare for processing. Packets are passed into the packet
decoder. Translates specific protocol elements into an internal data structure.
Detection engine: The most important part, applies rules to packets. The detection
engine performs simple tests on a single aspect of each packet to detect intrusions.
Logging and alerting system: It generates alert and log messages depending upon
what the detection engine finds inside a packet. Logs are kept in simple text files
and tcpdumpstyle files. Log files are stored under /var/log/snort folder by default.
Snort components
Output modules: It process alerts and logs and generate final output. Depending
on the configuration, output modules can take following actions:
Email Investigations
E-mail forensic analysis is used to study the source and content of e-mail
message as evidence, identifying the actual sender, recipient and date and time it
was sent, etc. to collect credible evidence to bring criminals to justice.
SMTP 25
HTTP 80
POP3 110
IMAP 143
HTTPS 443
SMTPS 465
MSA 587
IMAPS 993
MSA 587
Identities used in e-mail are globally unique and are: mailbox, domain name,
message-ID and ENVID. Mailboxes are conceptual entities identified by e-mail
address and receive mail.
E-mail forensics refers to the study of source and content of e-mail as
evidence to identify the actual sender and recipient of a message, data/time of
transmission, detailed record of email transaction, intent of the sender, etc
A forensic investigation of e-mail can examine both email header and body.
An investigation should have the following:
Email headers
When investigating email, we usually start with the piece of email itself and
analyze the headers of the email. Since each SMTP server that handles a message
adds lines on top of the header.
Meta data in the e-mail message in the form of control information i.e.
envelope and headers including headers in the message body contain information
about the sender and/or the path along which the message has traversed.
If a message does not have these, then it is faked. If possible, one can obtain
another email following supposedly the same path as the email under investigation
and see whether these ideosyncratic lines have changed. While it is possible that
the administrator of an SMTP node changed the behaviour or even the routing,
these changes tend to be far and in between.
In email server investigation, copies of delivered e-mails and server logs are
investigated to identify source of an e-mail message. E-mails purged from the
clients (senders or receivers) whose recovery is impossible may be requested from
servers (Proxy or ISP) as most of them store a copy of all e-mails after their
deliveries
Some other aspects that control forensics step include the following
properties:
Availability of backup copy of email: When checking from the serve side,
all copies are transferred to the client. This requires seizing the client computer.
For webmail, copies are always saved at the server side.
Log file provides useful information for investigation. After sending the
mail, it creates number of files on the server to track and maintain the email
service.
The “/etc/sendmail.cf” is the file for configuration information for send mail.
The “/etc/syslog.conf” file specifies how and which events send mail logs.
Communication between SMTP and POP3 is maintained in /var/log/maillog
file. It also records IP address and time stamp.
Email evidence is in the email itself (header)? Email evidence is left behind
as the email travels from sender to recipient.
Reviewing e-mail headers can offer clues to true origins of the mail and the
program used to send it.
Received is the most essential field of the email header: It creates a list of all
the email servers through which the message travelled in order to reach the
receiver.
1. The bottom “Received” shows the IP address of the sender's mail server.
2. The top “Received” shows the IP address of receiver mail server.
3. The middle “Received” shows the IP address of the mail server through
which email passes from sender to receiver.
The syslog.conf file simply specifies where to save different types of e-mail
log files. The first log file it configures is /var/log/maillog, which usually contains
a record of simple mail transfer protocol communication between servers.
UNIX systems are set to store log files in the /var/log directory.
Checkpoint and temporary files also helpful for investigation. The .edb file
contains many tables that hold metadata for all e-mail messages and other items in
the exchange store.
The .stm file stores native Internet content. Because Internet content is
written in native format, there is no need to convert messages and other items to
exchange format.
The .edb and .stm files function as a pair, and the database signature is
stored as a header in both files. The internal schema for the .stm pages is stored in
the .edb file.
1. Input file in disk required: This indicates the presence of email file at the
local disk. MailXaminer requires input file to be present in the disk.
2. Search option: This feature indicates how to perform search of interesting
words in the content of an email. MailXaminer can perform plain text-
based search.
3. Information provided: This feature indicates the information extracted
and shown as part of forensic analysis. The MailXaminer tool shows the
message, date and time details of an email.
4. Recovery capability: A forensic-tools should have the capability to
recover corrupted email or deleted email to be useful for investigation.
The MailXaminer can recover corrupted email. It also has the capability
to import corrupted contacts, calendar.
5. Email format supported: This feature indicates the file type supported by
a tool. The MailXaminer supports Gmail, yahoo, Hotmail, IMAP, Mozilla
Thunderbird, Lotus Notes, Outlook, Exchange, Mac Outlook email
format.
6. Visualization format supported: A forensic tool should allow investigator
different types of display of the extracted information to enable more
intelligence gathering. MailXaminer supports different view options.
7. OS Supported: Ideally, a forensic tool should support different types of
operating systems to make it useful for email applications running on
different platforms. The MailXaminer can run on Windows
8. Export format: A forensic-tools should have friendly format for saving
the examination results for compatible analysis with other forensic tools.
9. Extended device support: This feature indicates if a tool can act on plug-
ins devices such as added hard disk or USB memory stick, etc.
Mobile devices are an evolving form of computing, used widely for personal
and organizational purposes. These compact devices are useful in managing
information, such as contact details and appointments, corresponding
electronically, and conveying electronic documents.
People store a lot of information on cell phones. But people do not think
about securing their cell phones. Data stored on mobile phones are as follows:
1. incoming, outgoing and missed calls
2. SMS
3. E-mail
4. instant-messaging logs
5. Web pages
6. Pictures
7. Personal calendars
8. Address books
9. Music files
10. Voice recordings.
Most basic phones have a proprietary OS and smart phone have Android and
other OS.
The personal nature of the information on these devices can provide digital
investigators with valuable insights into the model operator of suspects and
activities of victims. Windows mobile uses a variation of the FAT file system called
the Transaction safe FAT (TFAT) file system, which has sorne recovery features in
the event of a sudden device shutdown.
The forensic acquisition tools that are available to most forensic analysts do
not have direct access to flash memory on Windows Mobile devices and are
limited to acquiring data through a hardware abstraction layer.
Mobile devices contain non- volatile and volatile memory. Volatile memory
(i.e., RAM) is used for dynamic storage and its contents are lost when power is
drained from the mobile device. Non- volatile memory is persistent as its contents
are not affected by loss of power or overwriting data upon reboot. For example,
Solid- State Drives (SSD) that stores persistent data on solid- state flash memory.
Mobile devices typically contain one or two different types of non- volatile
flash memory. These types are NAND and NOR. NOR flash has faster read times,
slower write times than NAND and is nearly immune to corruption and bad blocks
while allowing random access to any memory location. NAND flash offers higher
memory storage capacities, is less stable and only allows sequential access.
NAND flash memory contains: PIM data, graphics, audio, video, and other
user files. This type of memory generally provides the examiner with the most
useful information in most cases. NAND flash memory may leave multiple copies
of transaction- based files (e.g., databases and logs) due to wear leveling
algorithms and garbage collection routines.
Since NAND flash memory cells can be re-used for only a limited amount of
time before they become unreliable, wear leveling algorithms are used to increase
the life span of Flas memory storage, by arranging data so that erasures and re-
writes are distributed evenly across the SSD.
SIM card
Identity modules are synonymous with mobile devices that interoperate with
GSM cellular networks. Under the GSM framework, a mobile device is referred to
as a mobile station and is partitioned into two distinct components: the Universal
Integrated Circuit Card (UICC) and the Mobile Equipment (ME).
The ME and the radio handset portion cannot fully function without a UICC.
The UICC's main purpose entails authenticating the user of the mobile device to
the network providing access to subscribed services. The UICC also offers storage
for personal information, such as phonebook entries, text messages, Last Numbers
Dialed (LND) and service- related information.
SIM
An MVNO does not own spectrum, it leases it from a network operator with
whom it has a relationship. An MVNO supplies the SIM card and has full control
over its subscribers and handles its own billing.
An MVNO usually offers not only voice services but also value-added
services or sometimes referred as mobile value-added services, which are a
combination of voice, data, graphics and video information. Examples include
mobile music, mobile TV, games, ring tones, multimedia messaging, mobile
commerce and location-based services.
1. Electronic evidence
2. Retained data evidence.
The address book, call history and text messages are the three main
components for digital evidence.
Devices
The type of device, its operating system, and other characteristics determine
the route to take in creating a forensic copy of the contents of the device
All mobile devices have volatile memory. Making sure they don't lose power
before you can retrieve RAM data is critical.
Messages might be received on the mobile device after seizure. Isolate the
device from incoming signals with one of the following options:
The drawback to using these isolating options is that the mobile device is put
into roaming mode, which accelerates battery drainage.
Check these areas in the forensics lab: Internal memory, SIM card,
removable or external memory cards and system server.
If power has been lost, PINs or other access codes might be required to view
files
Once the connection has been established, the forensic software suite can
proceed to acquire data from the device.
The date and time maintained on the mobile phone is an important piece of
information. The date and time may be obtained from the network or manually set
by the user.
Suspects may manually set the day or time to a completely different value
from the actual one to leave misleading values in the call and message records
found on the phone.
If the phone was on when seized, the date and time maintained and
differences from a reference clock should have already been recorded, as
mentioned earlier. Nevertheless, confirmation at acquisition may prove useful.
If the phone was off when seized, the date and time maintained and
differences from a reference clock should be recorded immediately when first
turned on in the laboratory.
Note that actions taken during acquisition, such as removal of the battery to
view the device label, may affect the time value maintained.
Unlike desktop machines or network servers, only a few phones have a hard
disk and rely instead completely on semiconductor memory.
Specialized software exists for performing a logical acquisition of PIM data
and, for certain phones, producing a physical image. However, the contents of a
phone are typically dynamic and continually changing.
Two back-to-back acquisitions of a device using the same tool may produce
different results overall, though the majority of information, such as PIM data,
remains unchanged.
Increasingly, mobile phones come with a built-in slot for some family of
memory cards.
Forensic tools that acquire the contents of a resident memory card normally
perform a logical acquisition.
To recover deleted data that might reside on the memory card, a direct
acquisition can be performed on it after the contents of the mobile phone have been
successfully acquired.
With either type of acquisition, the forensic tool may or may not have the
capability to decode recovered phone data stored on the card, requiring additional
manual steps to be taken.
On occasion, a tool may fail its task without any error notification and
require the specialist to reattempt acquisition with the same tool or another tool.
Similarly, some tools do not work as well with certain devices as others do,
and may fail with an error notification. Thus, where possible, it is advisable to have
multiple tools available and be prepared to switch to another if difficulties occur
with the initial tool.
Admissibility of Evidence
In Simple way we can say that cyber-crime is unlawful acts wherein the
computer is either a tool or a target or both. Cyber-crimes can involve criminal
activities that are traditional in nature, such as theft, fraud, forgery, defamation
and mischief, all of which are subject to the Indian Penal Code. The abuse of
computers has also given birth to a gamut of new age crimes that are
addressed by the Information Technology Act, 2000.
When Internet was developed, the founding fathers of Internet hardly had
any inclination that Internet could transform itself into an all-pervading revolution
which could be misused for criminal activities and which required regulation.
Today, there are many disturbing things happening in cyberspace. Due to the
anonymous nature of the Internet, it is possible to engage into a variety of criminal
activities with impunity and people with intelligence, have been grossly misusing
this aspect of the Internet to perpetuate criminal activities in cyberspace. Hence the
need for Cyberlaws in India.
The field of cyber law plays a very crucial role, in today’s digital era. Its
significance arises from the increasing reliance on internet and computer
networks across various aspects of our everyday lives ranging from personal
interactions to businesses.
Cyber law has numerous objectives all with the purpose of establishing an
environment that is safe secure and reliable, for individuals, organizations and
nations. Few advantages of cyber law and its objectives have been enumerated
below: –
Preserving Privacy: Cyber law ensures that individuals privacy rights are
protected in the world by ensuring collection, storage and proper processing of
personal data.
Commission of illegal
Protection of computer
activities through use of
Definition systems and networks from
computer networks and
malicious digital activities.
programs.
Hackers
A hacker will look for internal and external system holes or bugs to
break into the system, fun and challenging.
Types of Hackers
1. Reconnaissance
2. Scanning
3. Gaining Access
4. Maintaining Access
5. Clearing Tracks
Reconnaissance is the act of gaining information about our target.
Such as open ports, operating system, what services those ports are running,
and any vulnerable applications they have installed. All of this information
will be absolutely vital to choosing an attack.
Advantages of Hacking:
Disadvantages of Hacking:
Ethical Hacking
Classification of exploits:
Phases of Hacking
Hackers are seeking any information that can help them perpetrate
attack such as computer names, IP addresses, and user accounts.
Once a hacker has gained access, they want to keep that access for
future exploitation and attacks. Sometimes, hackers harden the system from
other hackers or security personnel by securing their exclusive access with
backdoors, rootkits, and Trojans.
Once the hacker owns the system, they can use it as a base to launch
additional attacks. In some case, the owned system is sometimes referred to
as a zombie system.
Once hackers have been able to gain and maintain access, they cover
their tracks to avoid detection by security personnel, to continue to use the
owned system, to remove evidence of hacking, or to avoid legal action.
Hackers try to remove all traces of the attack, such as log files or
intrusion detection system (IDS) alarms. Examples of activities during this
phase of the attack include steganography, the use of tunnelling protocols,
and altering log files.
Hacktivism
Hackers are of different types and are named based on their intent of
the hacking system. Broadly, there are two main hackers: White-Hat hacker
and Black-Hat hacker. One more type is gray hackers.
White Hat:
A white hat hacker has the skills to break into networks but he uses his
skills to protect organizations. A White Hat hacker can conduct vulnerability
assessments and penetration tests are also known as an Ethical Hacker.
Black Hat:
A black hat hacker uses his skills for unethical reasons. A black hat
hacker always has malicious intention for intruding a network.
Grey Hat:
A grey hat hacker is someone who is between white hat hacker and
black hat hacker. Grey hat normally does the hacking without the
permissions from the administrators of the network he is hacking. But he
will expose the network vulnerabilities to the network admins and offer a fix
for the vulnerability for money.
The primary benefit of ethical hacking is to prevent data from being stolen
and misused by malicious attackers, as well as:
Hackers must scan for weaknesses, test entry points, priorities targets,
and develop a strategy that best leverages their resources. The objectiveness
of this kind of security assessment has a direct impact on the value of the
whole evaluation.
In other words, they ‘hack’ your systems for you and provide you with
insight and valuable information regarding your organization’s security
posture.
Vulnerability Research
Network Testing: This kind of hacking recognizes all unsafe data being
present in external as well as internal network. It not only works in the particular
network but also in a device that includes a virtual private network.
War dialing: This kind of hack recognized all the default information which
is being checked in a modem and is much dangerous for organizations.
Footprinting
1. Information gathering
2. Determining the network range
3. Identifying active machines
4. Finding open ports and access points
5. OS fingerprinting
6. Fingerprinting services
7. Mapping the network
Determining the Network Range: Now that the pen test team has been able to
locate name, phone numbers, addresses, some server names, and IP addresses, it’s
important to find out what range of IP addresses are available for scanning and
further enumeration. If you take the IP address of a web server discovered earlier
and enter it into the Who is lookup at www.arin.net, the network’s range can be
determined.
Identify Active Machines: Attackers will want to know if machines are alive
before they attempt to attack. One of the most basic methods of identifying active
machines is to perform a ping sweep.
Finding Open Ports and Access Points: With knowledge of the network range
and a list of active devices, the next step is to identify open ports and access points.
Identifying open ports will go a long way toward potential attack vectors. There is
also the possibility of using war dialing programs to find ways around an
organization’s firewall. If the organization is located close by, the attacker might
war drive the area to look for open access points.
Mapping the Network: Mapping the network provides the hacker with a blueprint
of the organization. There are manual and automated ways to compile this
information.
Whois
Whois normally runs on TCP port 43. Whois is the primary tool used
to query Domain Name Services.
Domain names in the .com and .net domains can now be registered with many
different competing registrars. Go to http://www.internic.net for detailed
information.
>>> Last update of whois database: Sun, 26 Jul 2015 17:11:41 GMT <<<
$ whois google.com
https://www.icann.org/epp#clientUpdateProhibited
https://www.icann.org/epp#clientTransferProhibited
Domain Status: clientUpdateProhibited
https://www.icann.org/epp#clientDeleteProhibited
Registrant State/Province: CA
Registrant Country: US
Admin State/Province: CA
Admin Country: US
Admin Phone: +1.6506234000
Network Reconnaissance
Nmap
Almost every Linux install its packaged, Windows you will need to
download Nmap and the Win-Pcap files.
Nmap can perform ping sweeps. Port scanning tools depends upon
communication between two machines and TCP, UDP services. State of the
connection is represented by flags in TCP connection. TCP uses six flags.
For connecting to a TCP port, client sends a packet with the SYN flag. When
SYN flag is set, it indicates clients wish to communicate with the port
services.
The port number along with the source and destination IP addresses in
the IP header, uniquely identify each connection. The combination of an IP
address and a port number is sometimes called a socket. When a new
connection is being established, the SYN flag is turned on. The sequence
number of the first byte of data sent by this host will be the ISN plus one
because; the SYN flag consumes a sequence number.
The client initiates a connection to the server via a packet with only
the SYN flag set. The server replies with a packet with both the SYN and the
ACK flag set. For the final step, the client responds back the server with a
single ACK packet. If these three steps are completed without complication,
then a TCP connection has been established between the client and server.
Client sends a single SYN packet to the server on the appropriate port.
If the port is open then the server responds with a SYN/ACK packet. If the
server responds with an RST packet, then the remote port is in state closed.
The client sends RST packet to close the initiation before a connection can
ever be established. This scan also known as “half-open” scan.
1. Open state means that an application on the target machine is listening for
connections/packets on that port.
2. Filtered means that a firewall, filter, or other network obstacle is blocking
the port so that Nmap cannot tell whether it is open or closed.
3. Closed means ports have no application listening on them, though they could
open up at any time.
4. Ports are classified as unfiltered. When they are responsive to Nmap's
probes, but Nmap cannot determine whether they are open or closed.
-sF -sX -
2. Stealth FIN, Xmas Tree, or Null scan modes
sN
C:\nmap>nmap -h
Nmap 3.93 Usage: nmap [Scan Type(s)] [Options] <host or net list>
-sV Version scan probes open ports determining service and app
names/versions
-iL <inputfile> Get targets from file; Use ‘-’ for stdin
THC-Amap
Most of port scanners assume that if a particular port is open, then default
application for that port must be present. Amap probes these ports to find out what
is really running on that port.
Scanning Networks
Threat is a set of circumstances that has the potential to cause loss or harm.
Some of the services are naturally secure. Services do not always run on
default ports. Port scanning is the process of identifying open and available TCP/IP
ports on a system
The main goal of port scanning is to find out which ports are open, which
are closed, and which are filtered. When we say a port is filtered, what we mean is
that the packets passing through that port are subject to the filtering rules of a
firewall.
1. Ports number 0 to port number 1023 are known as Well Known Ports
2. Port number 1024 to port number 49151 are named as Registered Ports
Port Port
Protocol Name Protocol Name
Number Number
SSH server
22 123 NTP
listing port
Port scanning may involve all of the 65,535 ports or only the ports that are
well-known to provide services vulnerable to different security-related exploits.
Open port: A service process is listening at the port. The operating system
receives packets arriving at this port and gives the messages to the service process.
If the operating system receives a SYN at an open port, this is the first packet of
the three- way handshake.
The vertical scan is a port scan that targets several destination ports on a
single host. A horizontal scan is a port scan that targets the same port on several
hosts.
Network Scanning
In this phase, a number of different procedures are used with the objective to
identify hosts, ports, and services in the target network. The whole purpose is to
identify vulnerabilities in communication channels and then create an attack plan.
Enumeration
Example:
a) Network shares
b) SNMP data, if they are not secured properly
c) IP tables
d) Usernames of different systems
e) Passwords policies lists
Enumerations depend on the services that the systems offer. They can be
DNS enumeration, NTP enumeration, SNMP enumeration, Linux/Windows
enumeration and server message block (SMB) enumeration.
Netbios Null Sessions
The null session is often referred to as the Holy Grail of Windows hacking.
Null sessions take advantage of flaws in the Common Internet File System/Server
Messaging Block (CIFS/SMB).
b) List of machines
c) List of shares
g. SNMP enumeration
NetBIOS Enumeration and Null Session: Net BIOS null Sessions occurs when
you connect any remote system without user-name and password. It is usually
found in systems with Common Internet File System (CIFS) or SMB depending on
operating system. Once attacker is in with null session, he/she can explore
information about groups, shares, permissions, policies and even password hashes.
Now to check whether the system is vulnerable to null session or not, type
following commands:
System Hacking
Password Cracking
When your log in to a computer and enter password, the computer checks
that password belongs to you and then grants access. The password is the secret
that is known only to the user and server. But it would be quite dangerous to store
the passwords in the file in the computer.
If an internal attacker obtains access to that file, all passwords stored on that
computer could get compromised.
Password cracking is one of the oldest hacking arts. Every system must store
passwords somewhere in order to authenticate users. However, in order to protect
these passwords from being stolen, they are encrypted. Password cracking is the art
of decrypting the passwords in order to recover them.
Passwords are not stored in clear text format. As a rule, passwords are stored
as hashes. Hashes are one-way encryption that is unique for a given input. In the
Windows operating system, passwords on the local system are stored in the SAM
file, while Linux stores them in the /etc/shadow file.
Manual password cracking is easy. Attacker uses following method for password
cracking.
The password file for Windows, known as the Security Accounts Manager
(SAM) file, is located in C:\windows\system32\config\sam.
Online services typically store passwords for their system in a non-
standardized way, and these systems are not always designed by engineers with
backgrounds in privacy or security.
The default Android program requires the user to create a password which
connects at least four dots in any order.
Rainbow Table: Most modern systems now store passwords in a hash i.e.
encrypted password. To crack this encrypted password is to take dictionary file and
hash each word and compare it to the hashed password.
Brute Force: Brute force password cracking attempts all possibilities of all
the letters, number, special characters that might be combined for a password and
attempts them. It is the most time-consuming approach to password cracking.
JOHN THE RIPPER: John the Ripper is a fast password cracker, currently
available for many flavors of UNIX, Win32 and OpenVMS. Its primary purpose is
to detect weak UNIX passwords. It can use specialized wordlists or password rules
based on character type and placement.
Cain and Abel: Written strictly for Windows, it can crack numerous hash
types, including NTLM, MD5, wireless, Oracle, MySQL, SQL Server etc. It can
crack passwords using a dictionary attack, rainbow attack, and brute force. It
selects the password length and character set when attempting a brute force attack.
Brutus: It is an online password cracking tool that many consider the fastest
online password cracker. It is free and available on both Linux and Windows, and
it supports password cracking in HTTP.
1. Online attacks
2. Offline attacks
In passive online attacks an attacker does not contact with authorizing party
for stealing password. A passive attack is not detectable to the end user. Types of
passive online attacks
include wire sniffing, man in the middle attack and reply attack.
Offline attacks require physical access to the system. It copies the password
file from the system onto storage disk.
In this attack, the attacker will start cracking the password by creating a hash
of a password or a challenge-response sequence and comparing it to the hash or
response that he captured.
Offline attacks include, dictionary attacks, hybrid attacks, brute force attack,
pre-computed hash attacks, syllable attacks, rule-based attacks and rainbow
attacks.
Windows does not store your actual password with your account; when you
select a new password, Windows computes a hash of the password and stores that
with your account in the local SAM or Active Directory depending on the type of
account. In fact, by default Windows computes 2 hashes: one is called an NT or
Unicode hash and the other is called the LANMAN (LANMANAGER) hash.
For example, the hash for the password “QBMzftvX” is broken into two
parts (QBMZFTV and X). You will also see that all of the cleartext characters of
these LM hashes are uppercased.
C88062822433f468 bcbb464a6f1414b9
The SAM file is further encrypted with the SysKey (Windows 2000 and
above) which is stored in %SystemRoot%\system32\config\system file.
During the boot-time of Windows the hashes from the SAM file gets
decrypted using the SysKey and the hashes are loaded to the registry is then used
for authentication purpose.
Both system and SAM files are unavailable to standard programs during
Windows’ runtime.
Hackers launch brute-force attacks using widely available tools that utilize
wordlists and smart ruleset to intelligently and automatically guess user passwords.
This type attacks are easy to detect, but they are not so easy to prevent.
A Brute force attack is an automated process of trial and error used to guess
a person's user name, password, credit-card number of cryptographic key.
Insufficient authentication occurs when a web site permits an attacker to access
sensitive content or functionality without having to properly authenticate. Weak
password recovery validation is when a website permits an attacker to illegally
obtain, change or recover another user's password.
John the Ripper is a fast password cracker, currently available for many
flavors of UNIX, Windows and OpenVMS. Its primary purpose is to detect weak
UNIX passwords. It can use specialized wordlists or password rules based on
character type and placement.
John the Ripper is a command line tool. A dictionary attack uses a word
database, and tries it repeatedly.
John will accept three different password file formats. It cracks any
password encrypted in one of the formats listed by the “-test” option.
John the Ripper comes pre-installed with a small dictionary of some typical
passwords located in “/usr/share/john/password.lst” file.
John automatically selects the correct encryption algorithm for the hashes
and begins cracking. All the cracked passwords are saved in the John.pot file,
which is a text file. This tool uses for brute force is called "Incremental".In
incremental mode john does not use a word list, but just tries all possible
passwords.
While cracking, you can press the Enter key for status, or Ctrl+C to abort the
session, saving point information to a file. By the way, if you press Ctrl+C twice
John will abort immediately without saving.
Cracking Modes
Wordlist mode: User must specify a wordlist and some password files.
Single crack mode: It will try using the login information as passwords.
This mode is much faster than the wordlist mode, which allows using a lot of rules
in a reasonable time.
Incremental mode: This is the most powerful cracking mode; it can try all
possible character combinations as passwords.
External mode: You can define an external cracking mode for use with
John. This is done with ~/john.ini's sections called [List.External:<mode>], where
<mode> is any identifier that you assign to the mode. The section should contain
some functions that John will use to generate the words it tries. These functions are
coded in a subset of the C language, and are compiled by John at startup.
L0PHTCRACK
This tool used to crack Windows NT/2000 passwords. Easy to use GUI
interface. It runs on MS Windows 9x, NT, and 2000 systems.
L0phtCrack will extract passwords from the local or remote computers with
the Dump Passwords from Registry option.
Pwdump
pwdump7 will dump the SAM to the screen and the > character redirects the
output to a file called hash.txt
Syntax:
where
Security using keyloggers will monitor email, internet, chats or anything that
requires a keystroke. This will help capture all information in image and/or text
form. Keyloggers are a type of malicious malware that track the users’ keystrokes
and captures the characters that are pressed in and writes the information to a file.
There are two types of keylogger: hardware keylogger and software
keylogger
Hardware Keyloggers
Hardware Keyloggers are small electronic devices used for capturing the
data in between a keyboard device and I/O port. These devices have built in
memory where they store the keystrokes. They must be retrieved by the person
who installed it in order to obtain the information.
Advantages:
Disadvantage:
Software keyloggers track systems, collect keystroke data within the target
operating system, store them on disk or in remote locations, and send them to the
attacker who installed the Keyloggers.
1. Scan local drives for log.txt or other log file names associated with
known keyloggers;
2. Implement solutions that detect unauthorized file transfers via FTP
or other protocols;
3. Scan content sent via email or other authorized means looking for
sensitive information;
4. Detect encrypted files transmitted to questionable destinations.
Software keyloggers can be detected using software tools. For this reason,
users of keyloggers often prefer hardware solutions.
Advantages:
Disadvantages:
Spywares
Spyware originated in the 1990's with programs that secretly observed and
logged user web surfing habits. It can do more than steal your personal information
but also rob user PC of its speeds, stability and Internet access efficiency.
Spyware differs from viruses and worms in that it does not usually self-
replicate. Like many recent viruses, spyware is designed to exploit infected
computers for commercial gain. Spyware may have to same effect as viruses.
Prevention of Spyware
Buffer Overflow
The main cause for the problem of buffer overflow vulnerabilities is the fact
that in many languages, such as C, bounds are not checked when arrays are
accessed.
In buffer overflow attacks, the extra data may contain codes designed to
trigger specific actions, in effect sending new instructions to the attacked computer
that could, for example, damage the user's files, change data, or disclose
confidential information.
The longest postal code is fewer than twelve characters, but on the web
form, the attacker typed in the letter "A" 256 times, followed by some other
commands. The data overflows the buffer allotted for the zip code and the
attacker's commands fall into the stack. After a function is called, the address of the
instruction following the function call is pushed onto the stack to be saved so that
the function knows where to return control when it is finished.
Buffer overflows attack
C language example:
char buf[BUFSIZE];
strcpy(buf, argv[1]);
}
The buffer size is fixed, but there is no guarantee the string in argv [1] will
not exceed this size and cause an overflow.
Stack based buffer overflows affects any function that copies input to
memory without doing bounds checking. For example: Strcpy() ,memcpy(), gets ()
etc…
A buffer overflow occurs when a function copies data into a buffer without
doing bounds checking. So, if the source data size is larger than the destination
buffer size this data will overflow the buffer towards higher memory address and
probably overwrite previous data on stack.
Steganography
Steganography is used for high security and capacity, which often entails
that the hidden information is breakable.
Taxonomy of steganographic techniques
Open codes hide a message in a legitimate carrier message in ways that are
not obvious to an unsuspecting observer.
Steganography Cryptography
“Malware” is short for malicious software and used as a single term to refer
to virus, spy ware, worm etc. Malware is designed to cause damage to a stand-
alone computer or a networked PC.
A common step to protect your computers and mobile devices from malware
is to install anti-virus software from trusted vendors. Anti-virus, sometimes called
anti-malware, is security software designed to detect and stop malicious software.
Trojan Horse
The city of Troy was protected by a high wall built around the city. Greeks
attacked to one of the Troy's cities. After an unsuccessful attack, Greeks made a
great plan to win.
Their plan was to build a horse, a beautiful and huge wooden horse, and
leave it outside the gate. Then, the entire Greek army would pretend to leave, as if
they had finally admitted defeat. But the horse would be hollow. Thirty men would
be hiding inside. Horse is left it in front of the Troy's gate.
The troy's civilians thought that it was a gift and brought that horse which is
called Trojan into the city. That night, while the Trojan people were sleeping, the
men hiding inside the wooden horse climbed out and opened the gates. Greek
militaries destroyed the whole city.
The applications work like this story and it is one of the most popular
applications which is used for attacking computers. Trojan horse is not a virus and
it do not do replicate.
Backdoors
RATs are used by the attacker with malicious intent to surveillance the
infected victim by recording audio, video, keystrokes, in addition RATs enable
attacker to run services from the victim’s computer, it is also capable of exfiltrating
files, and more.
Virus
The term computer virus was originally used by Dr. Fred Cohen in his PhD
thesis, in 1986. The term malware will be used to describe all forms of malicious
software. The term virus writer will be used to describe the person who is
responsible for creating all types of malicious software.
A computer virus is a small program that can copy itself to infect computers.
Self-replicating programs that spread by infecting other programs or data files. A
Virus is a malicious program that spreads using a propagation technique that
generally requires user intervention, and always possesses a malicious intent.
A virus infects another executable and uses this carrier program to spread
itself. The virus code is injected into the previously benign program and is spread
when the program is run.
A computer virus requires some sort of user action to abet their propagation.
A virus program infects other programs by modifying them.
A major component of virus is an infection code, payload and trigger.
A virus is dependent upon a host file or boot sector, and the transfer of files
between machines to spread. A virus can be either transient or resident.
If the virus writer wants to keep the program size the same to prevent
detection, then it has to replace some of the program code or compress the program
and prepaid the virus to the program. But a good scanner with a checksum can
detect the changes in the code.
shows virus infected host file. Host file is not damage and easy to clean the
file.
It is called prepended
Virus does not damage host file but it is difficult to remove the virus from file.
Characteristics of Virus
Make and retain backup copies of executable system files in the event the
virus detection program can't remove the virus.
Phases of Viruses
1. Dormant phase
2. Propagation phase
3. Triggering phase
4. Execution phase
Triggering phase: The virus is activated to perform the function for which
it was intended. It is caused by a variety of system events.
Execution phase: In this phase, the virus performs the malicious action that
it was designed to perform, called payload. This action could include something
seemingly innocent, like displaying a silly picture on a computer’s screen, or
something quite malicious, such as deleting all essential files on the hard drive.
Types of Viruses
Virus Countermeasures
Worm infects the environment rather than specific objects. Unlike a virus,
does not require a host to propagate.
The Morris worm or Internet worm was one of the first computer worms
distributed via the Internet. Morri’s worm uses topological techniques. Topological
worm searches for local information to find new victims by trying to discover the
local communication topology.
Passive worm does not seek out victim machines. Instead, it either waits for
potential victims to contact the worm or rely on user behaviour to discover new
targets.
Worm Classification
Worm Virus
Worm can spread quicker than virus Virus can spread slower than worm
The victim would give away the details, believing the call was really
from an authorized bank official. All the information that is gathered through
various footprinting techniques is very useful in building successful social
engineering attacks.
1. Ping of death: Ping of death attack sends large oversized ICMP packets.
Maximum legal size of IP packets is 65535 bytes. Because of limitations
in the physical layer, packets may have to be fragmented and then
reassembled at the destination. So, this packet is fragmented for
transport. The receiver then starts to reassemble the fragments as the ping
fragments arrive. The total packet length becomes too large. It may
possible that system may crash.
2. Smurf: It is a variation of ping attack. Attacker selects a network of
unwitting victims. The attacker spoofs the source address in the ping
packet so that it appears to come from the victim. Then the attacker sends
this request to the network in broadcast mode by setting the last byte of
the address to all 1s.
3. Teardrop attack: This attack misuses a feature designed to improve
network communication. Attacker sends a series of datagram that cannot
fit together properly. One datagram might say it is position 0 for length
60 bytes, another position 30 for 90 bytes so on. These fragment pieces
overlap so they cannot be reassembled properly.
4. Malicious misrouting of packets: A attacker may attack a router and
change its routing table, resulting in misrouting of data packets, causing a
denial of service.
5. Attacker send large number of UDP packets to non-listing ports on the
victim. This cause victim to respond with an ICMP Host Unreachable
message for each packet that it receives.
DoS Shortfalls
In DDoS attack, a large number of hosts are used to flood unwanted traffic
to a single target. The target cannot then be accessible to other users in the
network, as it is processing the flood of traffic.
Highly visible site like CNN, eBay and Yahoo were brought down by a
DDoS attack in Feb 2000.
In DDoS attack, the attacker scans the Internet to find multiple vulnerable
hosts called handlers and comprises them. Each handler, in turn, recruits many
agents to launch the attack.
1. Hit-list scanning: Long before attackers start scanning, they collect a list of
a large number of potentially vulnerable machines.
2. Random scanning: The machine that is infected by the malicious code
probes IP addresses randomly from the IP address space and checks their
vulnerability.
DDoS attack consumes system resources thereby reducing the speed of computer.
The resources attack can be classified as
DDoS Attack
1. Trinoo: This is the first DDoS Tool widely available. A trinoo network
consists of a master host and many broadcast hosts. When an attacker
wishes to launch a denial-of-service attack, he/ she issues commands to
the master host using a TCP connection. The master then communicates
with all of the broadcast hosts via UDP, telling them to send a flood of
UDP packets to random ports on the specified target host. The flood of
UDP packets coming from the broadcast hosts causes denial of service to
the target host. An attacker must have prior access to a host in order to
install a trinoo master or broadcast, either by breaking in or by some
other means.
2. TFN (Tribe Flood Network): TFN is a distributed denial of service tool
that allows an attacker to use several hosts at once to flood a target. It has
four different kinds of floods: ICMP Echo flood, UDP Flood, SYN
Flood, and Smurf attack. The TFN client and server use ICMP echo reply
packets to communicate with each other. The attacker uses the TFN client
to control the remote servers and initiate the denial-of-service attack.
3. Stacheldraht is also based on the TFN and trinoo client/server model
where a master program communicates with potentially many thousands
of agent programs. The perpetrator connects to the master program to
initiate the attack. Stacheldraht adds the new features: encrypted
communication between the attacker and the master program, as well as
automated updates of the agent programs using RCP.
Session Hacking
1. Active: In an active attack, the culprit takes over your session and
stops your device from communicating with the web server,
kicking you off. Posing as you, the criminal can perform actions
only you would be able to. Depending on what website the session
is taking place on, the hacker can then make online purchases,
change passwords, or recover accounts as if they were you.
2. Passive: In a passive attack, you don’t get kicked out of the
session. Instead, the criminal quietly observes the data traffic
between your device and the server, collecting your sensitive
information. This way they can find out your passwords, credit
card details, and other information without raising suspicions.
Hacking Web Server
Often the hacker displays their hacker’s name on the website’s home
page.
A web site defacement consists of following key elements:
Common website attacks that enable a hacker to deface a website include the
following:
Patch management is the process that helps acquire, test and install
multiple patches (code changes) on existing applications and software tools
on a computer, enabling systems to stay updated on existing patches and
determining which patches are the appropriate ones.
Web applications are programs that reside on a web server to give the
user functionality. Database queries, webmail, discussion groups, and blogs
are all examples of web applications.
SQL Injection
$username = "badUser";
This form of SQL injection occurs when user input is not filtered
for escape characters and is then passed into an SQL statement. These results in the
potential manipulation of the statements performed on the database by the end user
of the application.
Using SQL injections, attackers can add new data to the database;
modify data currently in the database and sometime gain access to other user’s
system capabilities by obtaining their password.
Prevention from SQL Injection Attack
WEP is used at the two lowest layers of the OSI model - the data
link and physical layers; it therefore does not offer end-to-end security.
WEP is part of the IEEE 802.11 standard. It uses the stream cipher
RC4 for confidentiality and the CRC-32 checksum for integrity. Fig. 5.7.1 shows
basic WEP Encryption where RC4 Keystream XORed with Plaintext.
Key size is not the only major security limitation in WEP. Cracking
a longer key requires interception of more packets, but there are active attacks that
stimulate the necessary traffic.
WEP authentication
Wireless access point decrypts the signed message using the shared
secret key and verifies the challenge that it has sent before. If the challenge
matches, then authentication succeeds otherwise not.
Sniffing is the underlying technique used in tools that monitor the health of a
network. Sniffing can also help find the easy kill as in scanning for open access
points that allow anyone to connect, or capturing the passwords used in a
connection session that does not even use WEP, or in telnet, rlogin and ftp
connections.
It is easier to sniff wireless networks than wired ones. It is easy to sniff the
wireless traffic of a building by setting shop in a car parked in a lot as far away as a
mile, or while driving around the block.
In a wired network, the attacker must find a way to install a sniffer on one or
more of the hosts in the targeted subnet. Depending on the equipment used in a
LAN, a sniffer needs to be run either on the victim machine whose traffic is of
interest or on some other host in the same subnet as the victim.
An attacker at large on the Internet has other techniques that make it possible
to install a sniffer remotely on the victim machine.
The Service Set Identifier (SSID) is the name of the WLAN and can be
located in a beacon. Wireless computers need to configure the SSID before
connecting to a wireless network.
If two wireless network shares physically close, the SSIDs are used to
identify and differentiate the respective networks.
The attacker can discover the SSID of a network usually by passive scanning
because the SSID occurs in the following frame types: Beacon, Probe Requests,
Probe Responses, Association Requests, and Reassociation Requests.
The SSID is usually sent in the clear in a beacon packet. Most APs allow the
WLAN administrator to hide the SSID.
If the Beacons are not turned off, and the SSID in them is not set to null, an
attacker obtains the SSID included in the Beacon frame by passive scanning.
The attacker gathers legitimate MAC addresses for use later in constructing
spoofed frames. The source and destination MAC addresses are always in the clear
in all the frames.
There are two reasons why an attacker would collect MAC addresses of
stations and Aps participating in a wireless network.
Each cell phone uses two frequencies per call, a duplex channel. So there are
typically 395 voice channels per carrier. (The other 42 frequencies are used for
control channels).
Therefore, each cell has about 56 voice channels available. In other words,
in any cell, 56 people can be talking on their cell phone at one time.
The EIR keeps a black list of stolen phones that should be barred from
access. Stolen phones can be re-flashed with a new IMEI and thus avoid the EIR
check.
EIR can also block phones that are malfunctioning and disturb the network.
The EIR feature is used to reduce the number of GSM mobile handset thefts
by providing a mechanism to assist network operators in preventing stolen or
disallowed handsets from accessing the network.
This control is done by comparing the International Mobile Equipment
Identity (IMEI) that is provided during handset registration to a set of three lists
provided by the network operator:
Mishing
The typical mishing scam involves the scammer calling or text messaging,
posing as an employee from your bank claiming to need your personal details for
authorization.
Scammers are very good at coming up with different reasons why they need
your information. It could be to authorize a payment or a purchase you have made
on your mobile phone.
For example, the image on the right shows the sort of text message that
could be used to trick you into opening a link that looks genuine, but is a
fraudulent site.
To stay safe, keep in mind your bank or business is never going to call you
and ask you for your account information with them and never select a link in the
text message.
Mobile hacking
Mobile phone hacking can also mean: intercepting mobile telephone calls to
listen to the call in progress taking covert control of the mobile phone to receive
copies of text messages and other activity, and to remotely listen to activity around
the phone.
The mobile device policy should take into account the risks of working with
mobile devices in unprotected environments.