CS8074 - Cyber Forensics (Ripped From Amazon Kindle Ebooks by Sai Seena)
CS8074 - Cyber Forensics (Ripped From Amazon Kindle Ebooks by Sai Seena)
CS8074 - Cyber Forensics (Ripped From Amazon Kindle Ebooks by Sai Seena)
Cyber Forensics
Iresh A. Dhotre
M.E. (Information Technology)
Ex-Faculty, Sinhgad College of Engineering,
Pune.
® ®
TECHNICAL
PUBLICATIONS
SINCE 1993 An Up-Thrust for Knowledge
(i)
Cyber Forensics
Subject Code : CS8074
Published by :
® ®
Amit Residency, Office No.1, 412, Shaniwar Peth,
TECHNICAL Pune - 411030, M.S. INDIA, Ph.: +91-020-24495496/97
PUBLICATIONS
SINCE 1993 An Up-Thrust for Knowledge Email : sales@technicalpublications.org Website : www.technicalpublications.org
Printer :
Yogiraj Printers & Binders
Sr.No. 10/1A,
Ghule Industrial Estate, Nanded Village Road,
Tal. - Haveli, Dist. - Pune - 411041.
ISBN 978-93-90450-40-4
9 789390 450404 AU 17
The book uses plain, lucid language to explain fundamentals of this subject. The book
provides logical method of explaining various complicated concepts and stepwise methods
to explain the important topics. Each chapter is well supported with necessary illustrations,
practical examples and solved problems. All the chapters in the book are arranged in a
proper sequence that permits each topic to build upon earlier studies. All care has been
taken to make students comfortable in understanding the basic concepts of the subject.
Representative questions have been added at the end of each section to help the
students in picking important points from that section.
The book not only covers the entire scope of the subject but explains the philosophy of
the subject. This makes the understanding of this subject more clear and makes it more
interesting. The book will be very useful not only to the students but also to the subject
teachers. The students have to omit nothing and possibly have to cover nothing more.
I wish to express my profound thanks to all those who helped in making this book a
reality. Much needed moral support and encouragement is provided on numerous
occasions by my whole family. I wish to thank the Publisher and the entire team of
Technical Publications who have taken immense pain to get this book in time with quality
printing.
Any suggestion for the improvement of the book will be acknowledged and well
appreciated.
Author
I.A.Dhotre
Dedicated to God
(iii)
Syllabus
Cyber Forensics - CS8074
Processing Crime and Incident Scenes - Working with Windows and DOS Systems.
Current Computer Forensics Tools : Software/ Hardware Tools. (Chapter - 2)
Social Engineering - Denial of Service - Session Hijacking - Hacking Web servers - Hacking
Web Applications - SQL Injection - Hacking Wireless Networks - Hacking Mobile Platforms.
(Chapter - 5)
(iv)
TABLE OF CONTENTS
UNIT - I
Chapter 1 : Introduction to Computer Forensics 1 - 1 to 1 - 36
(v)
UNIT - II
Chapter 2 : Evidence Collection and Forensics Tools 2 - 1 to 2 - 28
UNIT - III
Chapter 3 : Analysis and Validation 3 - 1 to 3 - 32
UNIT - IV
Chapter 4 : Ethical Hacking 4 - 1 to 4 - 48
(vii)
4.5.1 Password Cracking ...................................................................................... 4 - 20
4.5.1.1 Password Cracker Tools ................................................................. 4 - 21
4.5.1.2 Password Cracking Attacks ............................................................. 4 - 22
4.5.1.3 LAN Manager Hash ......................................................................... 4 - 23
4.5.1.4 Cracking Windows 2000 Passwords ............................................... 4 - 23
4.6 Password Cracking and Brute-Force Tools ............................................................... 4 - 24
4.6.1 John the Ripper ........................................................................................... 4 - 24
4.6.2 L0PHTCRACK ............................................................................................. 4 - 25
4.6.3 Pwdump ....................................................................................................... 4 - 26
4.7 Keyloggers and Spyware........................................................................................... 4 - 27
4.7.1 Hardware Keyloggers .................................................................................. 4 - 27
4.7.2 Software Keyloggers ................................................................................... 4 - 28
4.7.3 Spywares ..................................................................................................... 4 - 29
4.8 Buffer Overflow .......................................................................................................... 4 - 29
4.8.1 Stack Based Buffer Overflows ..................................................................... 4 - 30
4.8.2 Heap-based Buffer Overflows ..................................................................... 4 - 31
4.8.3 Tools Used to Protect Buffer Overflow ........................................................ 4 - 31
4.9 Steganography .......................................................................................................... 4 - 32
4.9.1 Difference between Steganography and Cryptography .............................. 4 - 33
4.10 Malware Threats ........................................................................................................ 4 - 33
4.10.1 Trojan Horse ................................................................................................ 4 - 34
4.10.1.1 Types of Trojan Horses ................................................................. 4 - 35
4.10.2 Backdoors .................................................................................................... 4 - 35
4.11 Virus ........................................................................................................................... 4 - 36
4.11.1 Phases of Viruses ........................................................................................ 4 - 38
4.11.2 Types of Virus .............................................................................................. 4 - 39
4.11.3 Virus Countermeasures ............................................................................... 4 - 40
4.12 Worm ......................................................................................................................... 4 - 41
4.12.1 Worm Classification ..................................................................................... 4 - 41
4.12.2 Difference between Worm and Virus ........................................................... 4 - 41
4.13 University Questions Case Study .............................................................................. 4 - 42
4.14 Questions with Answers ............................................................................................ 4 - 43
4.14.1 Two Marks Questions with Answers............................................................ 4 - 43
4.14.2 Multiple Choice Questions with Answers .................................................... 4 - 44
(viii)
UNIT - V
Chapter 5 : Ethical Hacking in Web 5 - 1 to 5 - 26
(ix)
Notes
(x)
UNIT - I
Introduction to
1 Computer Forensics
The term 'cyber' is derived from the word 'cybernetics' which means science of
communication and control over machine and man. Cyberspace is the new horizon which is
controlled by machine for information and communication between human beings across
the world. Therefore, crimes committed in cyberspace are to be treated as cyber crimes. In
wider sense, cyber crime is a crime on the Internet which includes hacking, terrorism,
fraud, gambling, cyber stalking, cyber theft, cyber pornography, flowing of viruses etc.
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.
Three Categories of Cybercrime
a. Cyberpiracy : Using cyber-technology in unauthorized ways to reproduce copies of
proprietary software and proprietary information, or distribute proprietary information
(in digital form) across a computer network.
Example : Distributing proprietary MP3 files on the Internet via peer-to peer (P2P)
technology
b. Cybertrespass : Using cyber-technology to gain or to exceed unauthorized access to an
individual's or an organization's computer system, or a password-protected Web site.
Example : Unleashing the ILOVEYOU computer virus
c. Cybervandalism : Using cyber-technology to unleash one or more programs that
disrupt the transmission of electronic information across one or more computer
networks, including the Internet, or destroy data resident in a computer or damage a
computer system's resources, or both.
Example : Launching the denial-of-service attacks on commercial Web sites.
Elements of Cyber Crime :
1. Location/Place : Where offender is in relation to crime.
2. Victim : Target of offense - government, corporation, organization, individual
3. Offender : Who the offender is in terms of demographics, motivation, level of
sophistication.
4. Action : What is necessary to eliminate threat ?
Cyber criminals are now moving beyond computers, and attacking mobile handheld
devices, such as smart phones and tablet personal computers. In 2010, the number of
malicious software programs specifically targeting mobile devices, rose 46 %, according to
information technology security group McAfee.
Cybersquatting is generally bad faith registration of another's trademark in a domain
name. Cybersquatting refers to using an Internet domain name with the intent of profiting
from someone else's name recognition. It generally is associated with the practice of buying
up domain names that are similar to the names of existing businesses with the intent to sell
these names back to the owners. Many organizations have to buy all related domain names
to prevent cybersquatting.
Cyber crime example : Child pornography, which includes the creation, distribution, or
accessing of materials that sexually exploit underage children. Contraband to include
transferring illegal items via the Internet.
Online fraud and hacking attacks are just some examples of computer-related crimes that
are committed on a large scale every day.
1.1.1 Types of Cybercrime
There are many types of cyber crimes and the most common ones are explained below :
1. Hacking : This is a type of crime wherein a person's computer is broken so that his
personal or sensitive information can be accessed.
2. Theft : This crime occurs when a person violates copyrights and downloads music,
movies, games and software.
3. Cyber stalking : This is a kind of online harassment wherein the victim is subjected to a
barrage of online messages and emails.
4. Identity theft : This 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.
5. Malicious software : These are Internet-based software or programs that are used to
disrupt a network. The software is used to gain access to a system to steal sensitive
information or data or causing damage to software present in the system.
6. Child soliciting and abuse : This is also a type of cyber crime wherein criminals solicit
minors via chat rooms for the purpose of child pornography.
Example of cyber crime :
a. Online banking fraud b. Fake antivirus
c. Stranded traveler' scams d. Fake escrow' scams
e. Advanced fraud f. Infringing pharmaceuticals
g. Copyright-infringing software h. Copyright-infringing music and video
i. Online payment card fraud j. In-person payment card fraud
k. Industrial cyber-espionage and extortion
l. Welfare fraud
The trafficking, distribution, posting, and dissemination of obscene material including
pornography, indecent exposure, and child pornography, constitutes one of the most
important Cybercrimes known today. Stealing the significant information, data, account
number, credit card number transmit the data from one place to another. Hacking and
cracking are amongst the gravest Cybercrimes known till date.
documented case is in early 19th Century in which the sabotage of a computer system
developed by textile manufacturer, Joseph Jacquard. This machine, designed to introduce
automated tasks, was attacked by individuals fearful of losing employment to computers.
Prior to the 1980s, computer crime was considered a non-issue. However, three incidents
shook American complacency to its core.
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.
India owes a lot to the exponential growth of the Information Technology service industry
over the last 15 years. In India we have substantially or fully adopted law as first codified
act in the Information Technology Act (“IT Act), in the year 2000.
University Question
1. Elaborate on the problems associated with computer crime. AU : Dec.-16, Marks 16
8. Any unlawful action when the evidence of such action may be stored on computer
media such as fraud, threats, and traditional crimes.
Responding to computer security incidents can involve intense pressure, time, and resource
constraints. Incident response helps personnel to minimize loss or theft of information and
disruption of services caused by incidents.
Initial response : Perform an initial investigation, recording the basic details surrounding
the incident, assembling the incident response team, and notifying the individuals who need
to know about the incident.
Formulate response strategy : Based on the results of all the known facts, determine the best
response and obtain management approval. Determine what civil, criminal, administrative,
or other actions are appropriate to take, based on the conclusions drawn from the
investigation.
Investigate the incident : Perform a thorough collection of data. Review the data collected
to determine what happened, when it happened, who did it, and how it can be prevented in
the future.
Reporting : Accurately report information about the investigation in a manner useful to
decision makers.
Resolution : Employ security measures and procedural changes, record lessons learned, and
develop long-term fixes for any problems identified.
Law enforcement officers use online anonymity when investigating questionable or illegal
websites, to conduct online undercover operations and receive anonymous tips from
informers about criminals or terrorists. In these situations, the law enforcement authorities
and their contacts should have online anonymity for successful completion of investigation.
If the suspects become aware of their being tracked, that could hamper the investigations.
Military communications require maximum security. Today's Internet hackers are so smart
that they are sometimes even able to crack or decipher encrypted communications.
University Questions
1. Briefly describe forensic investigation. AU : Dec.-16, Marks 8
2. Analyse briefly about the forensic duplication and investigation.
AU : Dec.-17, Marks 16
5. An Individual is responsible for all actions taken with respect to digital evidence whilst
the digital evidence is in their possession.
6. Any agency, which is responsible for seizing, accessing, storing or transferring digital
evidence is responsible for compliance with these principles.
o Reconstruction of events,
o Check the accuracy of witness statements and offender statements.
1. Write Blockers
Allow acquisition of data from a storage device without changing the drive's contents.
Here write commands are blocked. Only read commands are allowed to pass the write
blocker.
Types of blockers : Hardware Write Blocker and Software Write Blocker
Hardware Write Blockers : The device sits in between investigator's PC and storage
device. It supported storage interfaces are ATA, SCSI, USB or SATA. The controller
cannot write values to the command register, which writes or erases data on the storage
device.
Software Write Blockers (SWB) : 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.
Data acquisition methods are as follows :
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
Disk-to-image file Most common method
Can make more than one copy
Copies are bit-for-bit replications of the original
drive
ProDiscover, EnCase, FTK, SMART, Sleuth Kit,
X-Ways, iLook
Bit-stream disk-to-disk When disk-to-image copy is not possible
Consider disk’s geometry configuration
EnCase, SafeBack, SnapCopy
Logical disk-to-disk When your time is limited
or disk-to-data file Logical acquisition captures only specific files of
interest to the case
Sparse data copy Sparse acquisition also collects fragments of
unallocated (deleted) data
For large disks
PST or OST mail files, RAID servers
You can remotely connect to a suspect computer via a network connection and copy
data from it
Live images can be adjusted to run special (start-up) scripts and contain special drivers and
software. The process of adjusting the contents of a live image is called re-mastering.
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.
Forensic Linux Live CDs contain additional utilities.
It is configured not to mount, or to mount as read-only, any connected storage media. Well-
designed Linux Live CDs is used for computer forensics.
Preparing a target drive for acquisition in Linux, the modern linux distributions can use
Microsoft FAT and NTFS partitions.
Use of fdisk command lists, creates, deletes, and verifies partitions in Linux. The
mkfs.msdos command formats a FAT file system from Linux.
Acquiring data with dd (“data dump”) command in Linux, can read and write from media
device and data file. It creates raw format file that most computer forensics analysis tools
can read.
The dd command requires more advanced skills than average user and does not compress
data. The dd command combined with the split command and segments output into separate
volumes
The dd command is intended as a data management tool and is not designed for forensics
acquisitions.
The “dcfldd” additional functions specify HEX patterns or text for clearing disk space. It
log errors to an output file for analysis and review.
It uses several hashing options. Referring to a status display indicating the progress of the
acquisition in bytes.
Split data acquisitions into segmented volumes with numeric extensions and verify acquired
data with original disk or media data.
Although live images run almost fully in the computer's memory, running an operating
system from an optical disc is slower than running from a flash or hard disk drive.
A live image provides the digital forensic investigator a working environment that doesn't
change the computer's original configuration and files, especially when the live image
doesn't mount the storage devices automatically.
Thus, forensic images of storage devices can be made without disassembling the computer.
An attack has taken place. You, the investigator have just arrived on the scene. It is
expected that the attacker uses encrypted disk volumes.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (1 - 27) Introduction to Computer Forensics
In any case, the machine contains memory-resident information that will be lost after a
power cycle. Fig. 1.7.1 shows live analysis scenario.
Fig. 1.7.2
Set up the scene for data acquisition
Suspect host (Linux ) :
1. Load Helix CD-ROM into drive.
2. Ensure that your tools do NOT modify the disk.
3. Use IP addresses instead of hostnames.
4. Used trusted CD-ROM binaries only.
5. Send acquired data over encrypted network.
University Questions
1. Demonstrate how to use remote network aquisition tools in cyber forensics.
AU : Dec.-17, Marks 16
2. Explain the process of acquiring data with a Linux Boot CD. AU : May-18, Marks 16
Q. 13 The aim of incident response is to identify an attack, contain the damage, and eradicate
the root cause of the incident.
(a) identity theft (b) incident response
(c) cyber crime (d) all of these
Ans. : (b) incident response
Q. 14 Phishing is a form of __________.
(a) spamming (b) identity theft (c) impersonation (d) scanning
Ans. : (c) impersonation
Q. 15 What is the most significant legal issue in computer forensics ?
(a) Discovery evidence (b) Admissibility of evidence
(c) Seizing evidence (d) Preserving evidence
Ans. : (b) admissibility of evidence
Q. 16 Forensic software tools are used for __________.
(a) data imaging (b) data recovery
(c) data extraction (d) All of these
Ans. : (d) All of these
Q. 17 __________ means repeated acts of harassment or threatening behavior of the cyber-
criminal towards the victim by using internet services.
(a) Pornography (b) Web hijacking (c) Hacking (d) Cyber stalking
Ans. : (d) Cyber stalking
Q. 18 Which of the following is a proper acquisition technique ?
(a) Disk to image (b) Disk to disk (c) Sparse acquisition (d) All of these
Ans. : (a) Disk to image
Q. 19 Which duplication method produces an exact replica of the original drive ?
(a) Bit-stream copy (b) Image copy (c) Mirror copy (d) Drive image
Ans. : (d) Drive image
Q. 20 A computer crime is __________.
(a) any activity in which the thief uses computer technology
(b) an illegal action in which the perpetrator uses special knowledge of computer
technology
(c) an immoral action in which the thief uses special knowledge of computer technology
without the other person knowing
(d) any threat to computer or data security
Ans. : (b) an illegal action in which the perpetrator uses special knowledge of computer
technology
Q. 21 Theft can take many forms of hardware, software, data or computer time. White-collar
computer crime involves the theft of __________.
(a) applications (b) spikes (c) data (d) property
Ans. : (c) data
Q. 22 People who gain unauthorized access to computers for the purpose of doing damage are
called __________.
(a) employees (b) hackers (c) members of organized crime (d) crackers
Ans . : (d) crackers
Q. 23 Privacy is primarily a(n) __________ matter.
(a) ethical (b) legal (c) security (d) business
Ans. : (a) ethical
Q. 24 The issues that deal with the collection and use of data about individuals is
(a) access (b) property (c) accuracy (d) privacy
Ans. : (d) privacy
Q. 25 Why would a hacker use a proxy server ?
(a) To create a stronger connection with the target.
(b) To create a ghost server on the network.
(c) To obtain a remote access connection.
(d) To hide malicious activity on the network.
Ans. : (d) To hide malicious activity on the network
Q. 26 Which phase of hacking performs actual attack on a network or system?
(a) Reconnaissance (b) Maintaining access
(c) Scanning (d) Gaining access
Ans. : (d) Gaining access
Q. 27 What is the purpose of a Denial of Service attack ?
(a) Exploit a weakness in the TCP/IP stack
(b) To execute a Trojan on a system
(c) To overload a system so it is no longer operational
(d) To shutdown services by turning them off
Ans. : (c) To overload a system so it is no longer operational
Q. 28 Which of the following is considered as cyber crime ?
(a) Virus Attack (b) Worm Attack (c) Hacking (d) All of these
Ans. : (d) All of these
Notes
Processing Crime and Incident Scenes – Working with Windows and DOS Systems.
Current Computer Forensics Tools: Software/ Hardware Tools.
(2 - 1)
Cyber Forensics (2 - 2) Evidence Collection and Forensics Tools
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 cluster, also known as an allocation unit, consists of one or more sectors of storage
space and represents the minimum amount of space that an operating system allocates when
saving the contents of a file to a disk.
File system must be mounted before it can be available to processes on the system.
Procedure for mounting file system is as follows.
1. Mount point is an empty directory at which the mounted file system will be attached.
2. Name of the device and location within the file structure at which to attach the file
system is required.
3. Operating system verifies that the device contains a valid file system.
4. Device driver is used by operating system for these verifications.
5. Finally operating system mounts the file system at a specified mount point.
2.2.1 File Allocation Table
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.
The FAT system for older versions of Windows 95 is called FAT16 and the one for new
versions of Windows 95 and Windows 98 is called FAT32.
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. 2.2.1 shows the folder view of the file
system.
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.
Fig. 2.2.2
Free allocation is marked by zero in the cluster. If it contains some value (i.e. Greater than
zero) then that number is given to the next cluster for a given file or folder. EOF means end
of file. Where file end, FAT marked it as EOF.
Subdirectories are a special type of file. It contains information such as names, attributes,
dates, times, sizes and the first cluster of each file on the system.
Fig. 2.2.3
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.
If a file needs to be placed on the storage unit, the operating system will put the file in the
space marked as empty. After the new file is written to the “empty space”, the deleted file is
now gone forever. When a deleted file is to be recovered, the user must not manipulate any
files because if the “empty space” is used, then the file can never be retrieved.
Fig. 2.2.4
Floppy diskette uses FAT12 file system. Each entry contains 12 bits in the FAT. FAT16
uses 16 bit fields to identify a cluster. Hard disk uses FAT32 and 28 bits plus 4 bit reserved
field used to identify the cluster.
2.2.2 Network File System
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. 2.2.5 shows 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 sortable 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.
The size of a B+ node is 4096 bytes. When a file is added to a directory, a new record is
added to the INDX attribute of the directory. Within the B+ tree, NTFS finds the
appropriate node and inserts the new record, shifting records down, if necessary.
Fig. 2.2.6 shows the file with a logical size that is larger than its valid data length, leaving
un-initialized space.
NTFS captures the difference between logical file size and valid data length in two MFT
fields.
NTFS creates MFT entries whenever required. When a file is deleted, NTFS simply marks
the associated MFT entry as deleted and available for a new file. It is possible to recover all
of the information about a deleted file from the MFT entry, including the data for resident
files and the location of data on disk for non-resident files.
Recovery of deleted files in the NTFS is complicated. when a file is deleted, the next file
that is created may overwrite the MFT entry for the deleted file.
NTFS Data Streams
NTFS data stream is a unique set of file attributes. NTFS supports multiple data streams per
file : one main stream plus an optional set of alternate data streams.
A data stream can be created in an existing file on an NTFS volume. NTFS supports
multiple data streams, where the stream name identifies a new data attribute on the file. A
handle can be opened to each data stream.
A data stream is a unique set of file attributes. Streams have separate opportunistic locks,
file locks, and sizes, but common permissions.
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.
In NTFS, a data stream becomes an additional file attribute. It allows the file to be
associated with different applications. You can only tell whether a file has a data stream
attached by examining that file's MFT entry.
Alternate data stream : The stream in any data attribute on a file or directory other than the
default, unnamed stream.
NTFS Compressed Files
NTFS is capable of compressing individual files, all files within a folder, all files/folders on
the volume. Compression is executed within NTFS.
Any Windows program can read/write compressed files without considering the extent of
the compression. When a compressed file is opened, only a part of the file is decompressed
while being read.
Data already in memory is uncompressed. Modified and new data is compressed again,
when written to the compressed file on disk.
NTFS compression algorithms support cluster sizes of up to 4 kB.
The best use of compression is for files which are repetitive, written seldom, usually
accessed sequentially : log files are an ideal example.
Compression works in blocks of 16 clusters. Data is compressed using a modified LZ77
algorithm, named LZNT1.
Each block is compressed independently. If compressed block does not become less than
the original 16 clusters, it is left uncompressed.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (2 - 13) Evidence Collection and Forensics Tools
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.
NTFS provides real-time access to a compressed file, decompressing the file when it is
opened and compressing it when it is closed.
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.
Most computer forensics tools can uncompress and analyze compressed Windows data.
NTFS Encrypting File System (EFS)
NTFS files can be encrypted to protect the information from unauthorized users. It is
valuable form of protection for local file access. Digital encryption keys from each user are
implemented to encrypt and decrypt the file.
As a first setp 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 aquires 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.
A separate DRA is created for every recovery agent defined. Now a temporary file
Efs0.tmp is created in the same folder as the file being encrypted.
The contents of original file (plain text) is 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.
If DDF is found, user's private key is used to decrypt FEK extracted from DDF. Using
decrypted FEK, EFS decrypts file data. It should be noticed that file never decrypted in
whole but rather by sectors when upper level module requests particular sector.
Fig. 2.2.8
It is a method that recovers files at unallocated space without any file information and is
used to recover data and execute a digital forensic investigation.
Data carving technique : A raw bits of disk analysed to identify recognisable patterns that
may indicate a data file, e.g. header/footer, semantic information.
Fig. 2.2.10
Carving software designed to take a linear approach to locating data files. An incomplete
files, large files containing information from multiple sources, extracts embedded images
from PowerPoint's are creates Franken files. Following Fig. 2.2.10 shows deleted file
search.
Limitations of Data Carving
Not all data can be carved. Carving is based on characteristic signatures or patterns.
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.
Logical file size : It is the actual size of the file.
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.
File slack = 8192 – 5055
= 3137 bytes
New file is created by overwriting unallocated space. The file slack is essentially old
fragments of unallocated file space. File slack can contain anything at all, from fragments
of web pages, emails and even complete small pictures, to junk text.
Important evidence often ends up in the recycle bin. This is especially true for Windows
PCs. Literally, deleted files can often be successfully retrieved by analyzing the content of
the recycle bin, a temporary storage they're placed before being erased. If deleted files do
not show up in the recycle bin, there are still good chances to recover them by using one of
the many commercial data recovery tools. The principle of deleted file recovery is based on
the fact that Windows does not wipe the contents of the file when it's being deleted. Instead,
a file system record storing the exact location of that file on the disk is being marked as
“deleted”. The disk space previously occupied by the file is then advertised as available -
but not overwritten with zeroes or other data just yet.
Dealing with Password Protection and Encryption
In some cases, digital investigators to overcome password protection or encryption on a
computer they are processing.
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.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (2 - 18) Evidence Collection and Forensics Tools
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.
2.2.5 Log File
Windows operating systems store log files in the “%systemroot%\system32\config\”
folder. System log files can contains the information about the user account. Each log
contains a list of events that occurred, along with problems, failures and warnings.
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.
2.2.6 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.
Windows operating systems use the registry to store system configuration information and
usage details. Registry is a database that stores initialization files such as hardware/software
configuration, network connections, user preferences, setup information.
The registry contains following main keys :
1. HKEY_CLASSES_ROOT : It contains information on file types, including which
programs are used to open a particular file type.
2. HKEY_CURRENT_USER : It contains user-specific settings that are built from
information in the HKEY_USERS key during the logon process.
3. HKEY_LOCAL_MACHINE : It contains computer specific information including
installed hardware and software. This is the one users tend to spend the most time in.
4. HKEY_USERS : It contains information about all of the users who log on to the
computer. This includes settings for programs, desktop configurations and so on. This
key contains one sub-key for each user.
5. HKEY_CURRENT_CONFIG : It contains information about the computer's hardware
configuration.
In some registry file, keys value stored in hexadecimal format but it can be converted to
ASCII and saved to a text file.
The registry contains the configuration information for the hardware and software and may
also contain information about recently used programs and files.15 proof that a suspect had
installed a program or application may be found in the registry.
University Questions
1. While processing crime, how will you work with windows and DOS systems ?
AU : Dec.-16, Marks 8
2. Explain in detail about how the understanding NTFA, FAT, FAT32 file system plays a
Crucial role in cyber forensic. AU : May-17, Marks 16
3. Examine the MS - DOS startups tasks and about other disk operating system in detail.
AU : Dec.-17, Marks 16
4. Explain the following : NTFS data streams, NTFS compressed files and NTFS
encrypting file system. AU : May-18, Marks 16
2.3.1 Tools
1. The Sleuth Kit (TSK)
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.
It also includes the autopsy forensic browser as a graphical analysis tool and supports
integration with SQLite database. It can be run on live Windows systems for incident
response.
With this kit, the user can examine the computer file systems through a non-intrusive
approach that is not dependent on the investigated machine operating system to process
the file system, deleted and hidden from files DOS, BSD, Mac, Sun and Linux
partitions.
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.
2. The Coroner's Toolkit (TCT)
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.
Investigating Windows (FAT) partitions with TCT is only possible with a conversion to
EXT2 format, demanding alterations on the i-nodes table of the investigated partition.
This activity is not always possible with data analysis.
3. 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.
4. Maresware
Maresware computer forensics software provides an essential set of tools for
investigating computer records and securing private information. It is highly flexible to
meet the needs of all types of investigators including : law enforcement, intelligence
agency, private investigator, corporate security officers and human resources personnel.
It is used within a forensic paradigm, the software enables discovery of evidence for use
in criminal or civil legal proceedings. Internal investigators can develop documentation
to support disciplinary actions, yet do so non-invasively, to preserve evidence that could
end up in court.
Functions of Maresware
a. Discovery of “hidden” files(such as NTFS Alternate Data Streams)
b. For incident response purposes
c. Evaluation of timelines
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (2 - 22) Evidence Collection and Forensics Tools
Q. 18 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 __________.
(a) slack space (b) free space
(c) unmarked space (d) bad sector
Ans. : (a) slack space
Q. 19 Windows bases recovery tools are __________.
(a) EnCase (b) FTK (c) X-Ways (d) All of these
Ans. : (d) All of these
Q. 20 Sleuth Kit and SMART 6 are used for __________ based recovery tool.
(a) MS-DOS (b) Windows (c) Linux (d) Android
Ans. : (c) Linux
Q. 21 Tasks Performed by Computer Forensics Tools are __________.
(a) Acquisition (b) Validation and discrimination
(c) Extraction (d) All of these
Ans. : (d) All of these
Q. 22 Windows operating systems use the __________ to store system configuration
information and usage details.
(a) SAM (b) Registry (c) FAT (d) NFS
Ans. : (b) registry
Q. 23 What is the goal of a Denial of Service attack?
(a) Capture files from a remote system
(b) Incapacitate a system or network
(c) Exploit a weakness in the TCP/IP stack
(d) Execute a Trojan using the hidden shares
Ans. : (b) Incapacitate a system or network
Notes
Fig. 3.1.1
(3 - 1)
Cyber Forensics (3 - 2) Analysis and Validation
Validation is the confirmation by examination and the provision of objective evidence that
a tool, technique or procedure functions correctly and as intended.
Verification is the confirmation of a validation with a laboratories tools, techniques and
procedures.
Validation should be distinguished from other method-assessment processes such as
verification or evaluation. Verification is the process by which collaborating lines of
evidence are collected in order to determine if a method is working as expected within a
specific laboratory's own conditions (operators, equipment, environment).
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.
Application validation is similar to system validation except applied to specific applications
running on a system. As with system validation, it must be verified that the application is
expected to be sending the events and that the application itself matches known
characteristics.
Application restarts, the user starting the application, and application parameter settings can
all be of critical importance in determining the validity of the events generated by the
application.
User validation attempts to provide validation of the users of a system.
Algorithm implementation : Given that an algorithm itself has been validated, the
implementation must be similarly validated. Errors often occur in the transcription from a
theoretical algorithm to an implemented algorithm. For example, SSH uses a well-
established protocol for initiation of a connection and for maintaining the security of that
connection. This protocol is well validated. However, there have been well-known bugs in
the implementation of the SSH protocol that have allowed it to be compromised.
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.
Investigative digital forensics can be divided into several stages according to the Digital
Forensic Research Workshop and its examination of digital forensic models. The different
stages are :
1. Identification : Recognizing an incident from indicators and determining its type. This is
not within the field of forensics, but significant because it impacts other steps and
determines if a forensic examination is needed.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (3 - 3) Analysis and Validation
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.
University Question
1. Discuss the procedure to validate the hexadecimal editors. AU : May-17, Marks 8
3.2.1 Steganography
Steganography is the art and science of communicating in a way which hides the existence
of the communication. The goal of steganography is to hide messages inside other harmless
messages in a way that does not allow any enemy to even detect that there is a second
message present
Steganography can be used in a large amount of data formats in the digital world of today.
The most popular data formats are .bmp, .doc, .gif, .jpeg, .mp3, .txt and .wav.
Steganographic technologies are a very important part of the future of internet security and
privacy on open systems such as internet.
Steganography is the science of hiding information. The purpose of steganography is covert
communication-to hide the existence of a message from a third party.
Information hiding generally relates to both water-marking and steganography. A
watermarking system's primary goal is to achieve a high level of robustness. It should be
impossible to remove a watermark with-out degrading the data object's quality.
Steganography is used for high security and capacity, which often entails that the hidden
information is breakable.
Bit-stream copy : Is a bit-by-bit copy of the original storage medium and is an exact
duplicate of the original disc. It is different from a simple backup copy because backups
can only copy files stored in a folder or are of a known file type.
Bit-stream image : Is the file that contains the bit-stream copy of all the data on a disk or
disk partition.
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.
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.
It is useful to know the details of the attack method, so you should educate yourself
about each new attack as it gets publicized.
2. Spoofing
This type of attack causes a host or application to mimic the actions of another.
Typically the attacker pretends to be an innocent host by following IP addresses in
network packets.
For example, a well-documented exploit of the BSD rlogin service can use this method
to mimic a TCP connection from another host by guessing TCP sequence numbers.
To protect against this type of attack, verify the authenticity of datagrams and
commands. Prevent datagram routing with invalid source addresses. Introduce
unpredictablility into connection control mechanisms, such as TCP sequence numbers
and the allocation of dynamic port addresses.
3. Eavesdropping
This is the simplest type of attack.
A host is configured to “listen” to and capture data not belonging to it. Carefully written
eavesdropping programs can take usernames and passwords from user login network
connections.
Broadcast networks like ethernet are especially vulnerable to this type of attack.
To protect against this type of threat, avoid use of broadcast network technologies and
enforce the use of data encryption.
IP firewalling is very useful in preventing or reducing unauthorized access, network
layer denial of service, and IP spoofing attacks. It not very useful in avoiding
exploitation of weaknesses in network services or programs and eavesdropping.
Network Security Mechanisms
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
Though effective to prevent unauthorized access, this component fails to check potentially
harmful contents such as computer worms being transmitted over the network.
An Intrusion Prevention System (IPS) helps detect and prevent such malware. IPS also
monitors for suspicious network traffic for contents, volume and anomalies to protect the
network from attacks such as denial of service.
Communication between two hosts using the network could be encrypted to maintain
privacy.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (3 - 10) Analysis and Validation
Individual events occurring on the network could be tracked for audit purposes and for a
later high level analysis.
Honeypots, essentially decoy network-accessible resources, could be deployed in a network
as surveillance and early-warning tools.
Techniques used by the attackers that attempt to compromise these decoy resources are
studied during and after an attack to keep an eye on new exploitation techniques.
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 analyzer to monitor and
analyze the network.
Network forensics systems can be one of two kinds :
1. “Catch-it-as-you-can” systems, in which all packets passing through a certain traffic
point are captured and written to storage with analysis being done subsequently in batch
mode. This approach requires large amounts of storage, usually involving a RAID
system.
2. “Stop, look and listen” systems, in which each packet is analyzed in a rudimentary way
in memory and only certain information saved for future analysis. This approach
requires less storage but may require a faster processor to keep up with incoming traffic.
Network forensics is the process of collecting and analyzing raw network data and then
tracking network traffic to determine how an attack took place.
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.
Examiners must establish standards procedures to carry out forensics.
Network forensics tools :
1. NetworkMiner
NetworkMiner is a Network Forensic Analysis Tool (NFAT) for windows.
NetworkMiner can be used as a passive network sniffer/packet capturing tool in order to
detect operating systems, sessions, hostnames, open ports etc. without putting any traffic
on the network.
The purpose of NetworkMiner is to collect data (such as forensic evidence) about hosts
on the network rather than to collect data regarding the traffic on the network.
The main view is host centric (information grouped per host) rather than packet centric
(information showed as a list of packets/frames).
Fig. 3.4.1
Fig. 3.4.2 shows Wireshark graphical user interface.
Fig. 3.4.2
Example :
1. Capture only UDP packets with destination port 53 (DNS requests) : “udp dstport 53”
2. Capture only UDP packets with source port 53 (DNS replies) : “udp srcport 53”
3. Capture only UDP packets with source or destination port 53 (DNS requests and replies)
: udpport 53
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)
!= Not equal (ne)
> Greater than (gt)
< Less than (lt)
>= Greater than or equal to (ge)
<= Less than or equal to (le)
() 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 AND
|| Logical OR
! Logical NOT
3.4.2 Snort
Snort is an open source Network Intrusion Detection System (NIDS) which is available free
of cost. NIDS is the type of Intrusion Detection System (IDS) that is used for scanning data
flowing on the network. Snort is a tool for small, lightly utilized networks. Fig. 3.4.3 shows
location of 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.
A lightweight intrusion detection system can easily be deployed on most any node of a
network, with minimal disruption to operations. Snort is a libpcap based packet sniffer and
logger that can be used as a lightweight network intrusion detection system.
For networks, a port means an endpoint to a logical connection. The port number identifies
what type (application/service offered) of port it is. The commonly used default port
numbers used in e-mail are shown below :
Protocol Port number
SMTP 25
HTTP 80
POP3 110
IMAP 143
HTTPS 443
SMTPS 465
MSA 587
IMAPS 993
POP3S SPOP 995
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 e-
mail 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 :
1. Examining sender's e-mail address
2. Examining message initiation protocol (HTTP, SMTP)
3. Examining message ID
4. Examining sender's IP address
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.
Inconsistencies between the data that subsequent SMTP servers supposedly created can
prove that the email in question is faked. Another investigation is that of the header
contents itself.
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 behavior 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 controls forensics step include the following properties :
1. Storage format of email : Server side storage format may include maildir, mbox
format. Server-side stores email in SQL Server databases. Reading different types of
formats can be done for forensics analysis by using notepad editor and applying regular
expression-based searches. At the client-side, an email is stored as mbox format. Client
side may also store emails as .PST (MSOutlook), and NSF (Lotus Notes) files.
2. 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.
3. Protocol used to transport email : Email can be initiated and transported based on
SMTP or HTTP depending on the email server applications.
E-Mail forensic tools :
1. eMailTrackerPro analyses the headers of an e-mail to detect the IP address of the
machine that sent the message so that the sender can be tracked down. It can trace
multiple e-mails at the same time and easily keep track of them.
2. EmailTracer is an Indian effort in cyber forensics by the Resource Centre for Cyber
Forensics (RCCF) which is a premier centre for cyber forensics in India. It develops
cyber forensic tools based on the requirements of law enforcement agencies.
3. Adcomplain is a tool for reporting inappropriate commercial e-mail and usenet
postings, as well as chain letters and “make money fast” postings.
3.5.1 Checking UNIX E-mail Server Logs
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
record 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 traveled in order to reach the receiver.
The best way to read are from bottom to top.
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.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (3 - 18) Analysis and Validation
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.
The MVNO thereby establishes a more independent position and is able to compete directly
with other mobile network operators in the market by offering advanced services.
MVNOs typically offer prepaid wireless plans on a subscription basis. Sales and customer
service may be handled directly by the MVNO or by yet another entity called a Mobile
Virtual Network Enabler (MVNE). MVNEs specialize in marketing and administering
mobile services.
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.
There are different kinds of MVNOs :
1. Classic service provider : Resellers merely resell subscription to end users. In most
cases, resellers are completely dependent on MNOs for every aspect of service
provision, billing and customer care. MVNOs that operate as resellers are likely to
require an ASP license.
2. ESP ( Enhanced Service Provider) : Procures their own SIM cards and controls a few
network elements. So, enhanced service providers are those who do not own or provide
network facilities but have the ability to secure its own numbering range, operate its
own HLR and offer its own SIM cards with its own mobile network code. They are
dependent on MNOs for network facilities, as well access to radio network.
3. Full MVNO : Owns everything (including HLR) except the radio network equipments.
A full MVNO is one that owns or provides network facilities and network services such
as towers, mobile switching centers, home location registers (“HLR”) and cellular
mobile services.
1. Types of evidence on mobile devices
Two types of evidence can be retrieved from mobile :
1. Electronic evidence
2. Retained data evidence.
Electronic evidence includes the user's call history, contacts/phone book, calendar
information, and information stored on the SIM card.
Retained data evidence is telecom records involving the detail of calls made and
received and the geographical location of the mobile phone when a call took place.
The address book, call history and text messages are the three main components for
digital evidence.
1. Address book : It contains contact information. Digital investigator will reach to
suspect to a victim using information from address book. It can provide a cross-
reference between real names and nicknames.
2. Call history : It maintains the last call sent, last call receiver with time and date. It
also gives the time taken to speak with other person.
3. Text messages : Texts are one of the most common forms of electronic evidence.
Texts offer concrete and direct information in contrast to the call history and address
book that only offer indirect and inferential information. These contain the actual
words written by the owner or intended for the owner.
3.6.2 Evidence Extraction Process
Mobile phone evidence extraction process is as follows :
1. Intake : The evidence intake phase generally entails request forms and intake
paperwork to document chain of custody, ownership information and the type of
incident the phone was involved in.
2. Identification : For every examination, the examiner should identify the legal authority
to examine the phone, goals of the examination, make, model and identifying
information for the cellular phone.
3. Preparation : The preparation phase involves specific research the regarding the
particular phone to be examined, the appropriate tools to be used during the examination
and preparation of the examination machine to ensure that all of the necessary
equipment, cables, software and drivers are in place for the examination.
4. Isolation : Isolation of the phone prevents the addition of new data to the phone through
incoming calls and text messages as well as the potential destruction of data through a
kill signal or accidental overwriting of existing data as new calls and text messages
come in.
5. Processing : SIM cards should be processed separately from the cellular phone they are
installed in to preserve the integrity of the data contained on the SIM card.
6. Verification : The examiner could extract the file system of the cell phone initially,
perform the examination and then extract the file system of the phone a second time.
7. Documentation/reporting : Documentation should include information such as :
a. The date and time the examination was started.
b. The physical condition of the phone.
c. Pictures of the phone and individual components.
d. Status of the phone when received.
e. Make, model, and identifying information.
8. Presentation : The investigator may also want to provide reference information
regarding the source of date and time information, EXIF data extracted from images or
other data formats, in order that recipients of the data are better able to understand the
information.
2. Data Preservation : For a mobile phone investigation, it is important to prevent the device
from receiving any further data or voice communication. As text messages are stored in a
“First In, First Out” order, any new incoming text messages could delete older stored text
messages. Likewise, incoming calls could erase call history logs, and some devices can be
wiped of all data remotely if not protected from incoming communications.
3. Operating Systems and Communication Protocols : Another challenge impeding the
development of forensics tools is the various operating systems used on mobile phones.
Mobile phones have evolved into full-fledged computing platforms requiring vendors to use
sophisticated operating systems so that various software applications can be run on them.
4. Security Mechanisms : There are several security mechanisms used on mobile phones to
protect data. The handset lock is normally activated upon power-up, which presents a
problem for examiners who must attempt to investigate a phone that was found or seized in
a powered off state.
5. Unique Data Formats : Textual information such as telephone numbers, address books,
email messages, and text messages are stored using proprietary file formats. Makers of
forensic software tools will need to be aware of these formats so they can write software
that will convert these files to information easily understood by humans. An exception to
these proprietary file formats is for image and video files which are typically stored in
common JPG and MPEG formats.
Check these areas in the forensics lab : Internal memory, SIM card, removable or external
memory cards and system server.
Checking system servers requires a search warrant or subpoena. The SIM card file system
is a hierarchical structure .
1. Information that can be retrieved:
2. Service-related data, such as identifiers for the SIM card and the subscriber
3. Call data, such as numbers dialed
4. Message information
5. Location information
If power has been lost, PINs or other access codes might be required to view files
To acquire data from a phone, a connection must be established to the device from the
forensic workstation. Before performing an acquisition, the version of the tool being used
should be documented, along with any applicable patches or errata from the manufacturer
applied to the tool.
Caution should be taken to avoid altering the state of a mobile phone when handling it, for
example, by pressing keys that could potentially corrupt or erase evidence.
Once the connection has been established, the forensic software suite can proceed to
acquire data from the device.
Acquiring a device's contents logically, the prevailing technique used by present day
forensic tools, requires the device to be switched on.
The goal during acquisition is to affect memory contents as little as possible and then only
with the knowledge of what is occurring internally, relying more on adherence to the
second and third evidentiary principles that respectively emphasize high competence of the
specialist and the capture of a detailed audit trail of the actions taken.
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.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (3 - 26) Analysis and Validation
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.
After an acquisition is finished, the forensic specialist should always confirm that the
contents of a device were captured correctly.
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.
University Questions
1. Appraise the acquisition procedures for cell phones and mobile devices.
AU : May-18, Marks 16
2. Describe cell phone device forensics. AU : Dec.-16, Marks 16
Q. 16 When the user of a network workstation initiates EFS, the recovery key is sent to the
local domain ________ server’s administrator account.
(a) workstation (b) server’s (c) third party (d) all of these
Ans. : (b) server’s
Q. 17 Mobile security is also known as ________.
(a) OS security (b) wireless security
(c) cloud security (d) database security
Ans. : (b) wireless security
Q. 18 Hackers cannot do which of the following after compromising your phone ?
(a) Shoulder surfing (b) Accessing your voice mail
(c) Steal your information (d) Use your app credentials
Ans. : (a) Shoulder surfing
Notes
4 Ethical Hacking
4.1.1 Hackers
Hacking is identifying weakness in computer systems or networks to exploit its weaknesses
to gain access. Example of Hacking : Using password cracking algorithm to gain access to
a system
Hacking refers to the practice of modifying or altering computer software and hardware to
accomplish a goal that is considered to be outside of the creator's original objective.
Penetration testing can be defined as a legal and authorized attempt to locate and
successfully exploit computer systems for the purpose of making those systems more
secure. Authorization is the process of obtaining approval before con-ducting any tests or
attacks.
Hacking is an art of exploring various security breaches. Each hacker has Motives, Methods
and Skills. Computer Hacker is a typically knowledgeable person. He/she knows several
different languages, familiar with UNIX and NT, Networking protocols.
In other words can be referred to as the unauthorized access to any computer systems or
network. This method can occur if computer hardware and software has any weaknesses
which can be infiltrated if such hardware or software has a lack in patching, security
control, configuration or poor password choice.
A hacker will look for internal and external system holes or bugs to break into the system,
fun and challenging.
Cracker and hacker are two different terms. Cracker is making an attempt to break into the
system by guessing or cracking user’s passwords. Crackers can easily be identified because
their actions are malicious.
(4 - 1)
Cyber Forensics (4 - 2) Ethical Hacking
An ethical hacker possesses the skills, mindset, and tools of a hacker but is also
trustworthy. Ethical hackers perform the hacks as security tests for their systems. Ethical
hacking is also known as penetration testing or white-hat hacking. It involves the same
tools, tricks, and techniques that hackers use, but with one major difference : Ethical
hacking is legal.
4.1.2 Types of Hackers
1. Crackers : - A cracker is one who breaks security on a system. Crackers are hardcore
hackers characterized more as professional security breakers and thieves.
2. Hacktivists :- Hacktivists are conscious hackers with a cause.
3. Cyber terrorists : Based on motives, cyber terrorists can be divided into two categories :
The terrorists and information warfare planners.
How hackers hack the system?
a. The hacker will initially determine all available information about the target network.
The hacker will select a target which has the least amount of protection, which will
allow him to get the data he wants.
b. The target will be compared against well known attacks. If source code is available for
the target’s systems, the hacker will examine the code for new ways in.
c. The hacker may attempt to gain access to the password database. The hacker will
attempt brute force access to the system. The hacker may attempt to gain physical access
to the system.
Steps performed by 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.
Port scanning refers to the surveillance of computer ports, most often by hackers for
malicious purposes. Hackers conduct port-scanning techniques in order to locate holes
within specific computer ports.
Network scanning is a procedure for identifying active hosts on a network, either for the
purpose of attacking them or for network security assessment.
In the enumeration phase, the attacker gathers information such as network user and group
names, routing tables, and Simple Network Management Protocol (SNMP) data.
Disadvantages of Hacking :
1. It can harm the privacy of someone.
2. Hacking is illegal.
3. Criminal can use hacking to their advantage.
4. Hampering system operations.
4.1.4 Ethical Hacking
Ethical hacking is an authorized practice of bypassing system security to identify potential
data breaches and threats in a network.
Ethical hacking is identifying weakness in computer systems and/or computer networks and
coming with countermeasures that protect the weaknesses.
Ethical hacking is also known as penetration testing or white-hat hacking involves the same
tools, tricks, and techniques that hackers use.
Ethical hacking is performed withthe target’s permission. The intent of ethical hacking is to
discover vulnerabilities from a hacker’s viewpoint so systems can be better secured.
Ethical Hacking Terminology :
Threat is a set of circumstances that has the potential to cause loss or harm.
An exploit is a piece of software that takes advantage of a bug, glitch, or vulnerability,
leading to unauthorized access, privilege escalation, or denial of service on a computer
system.
Classification of exploits :
A remote exploit works over a network and exploits security vulnerabilities without any
prior access to the vulnerable system.
A local exploit requires prior access to the vulnerable system to increase privileges.
An exploit is a defined way to breach the security of an IT system through a vulnerability.
Vulnerability is a weakness in the security system. A particular system may be vulnerable
to unauthorized data manipulation because the system does not verify a user identity before
allowing data access. Bugs in the system that enable users to violate the site security policy
are called Vulnerability.
Vulnerability : A design flaw, defect, or mis-configuration which can be exploited by an
attacker.
A vulnerability scanner scans a specified set of ports on a remote host and tries to test the
service offered at each port for its known vulnerabilities.
4.1.6 Hacktivism
Hacktivism refers to hacking for a cause. Hacktivism's main goal is to bring issues to light
and cause social change. It can also be considered activism because it achieves these goals
in a relatively peaceful manner.
Hacktivism relies on many properties of the internet, allowing people to use different
methods than they would offline. Because of the scalability of the internet, even small
groups of people are able to make statements through hacktivism.
Hacktivism also relies on the internet being relatively difficult to censor and mostly
anonymous.
9. 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.
10. War dialing : This kind of hack recognized all the default information which is being
checked in a modem and is much dangerous for organizations.
4.2.1 Footprinting
Footprinting refers to the process of collecting as much as information as possible about the
target system to find ways to penetrate into the system. An ethical hacker has to spend the
majority of his time in profiling an organization, gathering information about the host,
network and people related to the organization.
Information such as IP address, Whois records, DNS information, an operating system
used, employee email id, Phone numbers etc is collected.
The process of accumulating data regarding a specific network environment, usually for the
purpose of finding ways to intrude into the environment.
The EC-Council divides footprinting and scanning into seven basic steps. These include
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
1. Information Gathering : Good information gathering can make the difference between
a successful pen test and one that has failed to provide maximum benefit to the client.
An amazing amount of information is available about most organizations in business
today. This information can be found on the organization’s website, trade papers,
Usenet, financial databases, or even from disgruntled employees. Some potential
sources are discussed, but first, let’s review documentation.
2. 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.
3. 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.
4. 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.
5. OS Fingerprinting : At this point in the information gathering process, the hacker has
made some real headway. IP addresses, active systems, and open ports have been
identified. There are two ways in which the hacker can attempt to identify the targeted
devices. The hacker’s first choice is passive fingerprinting. The hacker’s second choice
is to perform active fingerprinting, which basically sends malformed packets to the
target in hope of eliciting a response that will identify it. Although active fingerprinting
is more accurate, it is not as stealthy as passive fingerprinting
6. Fingerprinting Services : Knowing what services are running on specific ports allows
the hacker to formulate and launch application specific attacks.
7. 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.
4.2.2 Whois
Whois is a query/response protocol tool. It is widely used for querying an official database
in order to determine the owner of a domain name, an IP address, or an autonomous system
number on the Internet.
Whois normally runs on TCP port 43. Whois is the primary tool used to query Domain
Name Services.
Linux system provides built in facility of whois. Windows does not have a built-in Whois
client. Windows users will have to use a third-party tool or website to obtain Whois
information.
$ whois vtubooks.com
Whois Server Version 2.0
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
Domain Name: google.com
Registry Domain ID: 2138514_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.markmonitor.com
Registrar URL: http://www.markmonitor.com
Updated Date: 2015-06-12T10:38:52-0700
Creation Date: 1997-09-15T00:00:00-0700
Registrar Registration Expiration Date: 2020-09-13T21:00:00-0700
Registrar: MarkMonitor, Inc.
Registrar IANA ID: 292
Registrar Abuse Contact Email: abusecomplaints@markmonitor.com
Registrar Abuse Contact Phone: +1.2083895740
Domain Status: clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited)
Domain Status: clientTransferProhibited (https://www.icann.org/epp#clientTransferProhibited)
Domain Status: clientDeleteProhibited (https://www.icann.org/epp#clientDeleteProhibited)
Registry Registrant ID:
Registrant Name: Dns Admin
Registrant Organization: Google Inc.
Registrant Street: Please contact contact-admin@google.com, 1600 Amphitheatre Parkway
Registrant City: Mountain View
Registrant State/Province: CA
Registrant Postal Code: 94043
Registrant Country: US
Registrant Phone: +1.6502530000
Registrant Phone Ext:
Registrant Fax: +1.6506188571
Registrant Fax Ext:
Registrant Email: dns-admin@google.com
Registry Admin ID:
Admin Name: DNS Admin
Admin Organization: Google Inc.
Admin Street: 1600 Amphitheatre Parkway
Admin City: Mountain View
Admin State/Province: CA
Admin Postal Code: 94043
Admin Country: US
Admin Phone: +1.6506234000
>>> Last update of WHOIS database: 2015-07-26T09:56:49-0700
4.2.3.1 Nmap
Nmap was developed by Fyodor Yarochkin. This tool is available for Windows and Linux
as a GUI and command-line program. It is most widely-used port scanner tool. It can
performs many types of scans and OS identification, and also allows user to control the
speed of the scan.
Network Mapped (Nmap) is a network scanning and host detection tool that is very useful
during several steps of penetration testing. It is an open-source port or security scanner.
Primary function of Nmap is to discovery and mapping of hosts on a network.
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.
Nmap tool is capable to detect types of victims’ operation systems just using TCP
fingerprinting. TCP fingerprinting uses advanced fingerprinting analyses of the TCP stack
implementation. A TCP packet is crafted by switching on or off certain flags and sent to the
remote machine.
The remote operating system, based on its TCP stack implementation sends a response,
with some specific flags turned on or off.Depending on TCP responses collected for each
crafted packet we can make an intelligent guess of the operating system from its database of
TCP stack signatures.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (4 - 12) Ethical Hacking
Standard TCP communications are controlled by flags in the TCP packet header. Following
are the list of TCP connection flags :
a. Urgent (URG) : The Urgent pointer is valid if it set to 1.
b. Acknowledgement (ACK) : ACK bit is set to 1 to indicate that the acknowledgment
number is valid.
c. Push (PSH) : The receiver should pass this data to the application as soon as possible.
d. Reset (RST) : This flag is used to reset the connection. It is also used to reject an invalid
segment.
e. Synchronize(SYN) : Synchronize sequence number to initiate a connection. The
connection request has SYN = 1 and ACK = 0 to indicate that the piggyback
acknowledgement field is not in use.
f. Finish (FIN) : The FIN bit is used to release a connection. It specifies that the sender is
finished sending data.
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 three-way handshake involves the exchange of three messages between the client and
the server. Three messages are client SYN, service SYN-ACK and client ACK etc.
Fig. 4.2.1 shows three-way handshake for TCP.
-iL <inputfile> Get targets from file; Use ‘-’ for stdin
* -S <your_IP>/-e <devicename> Specify source address or network interface
--interactive Go into interactive mode (then press h for help)
--win_help Windows-specific features
Nmap is considered a required tool for all ethical hackers.
4.2.3.2 THC-Amap
Amap is a tool for determining what application is listening on a given port. THC means
The Hackers Choice.
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.
You can download from http://thc.segfault.net/thc-amap/
THC-Amap runs in following modes :
Sr. No. Modes Remarks
1. -A It identifies the service associated with the port.
2. -B This mode does not perform identification
3. -P It conducts a port scan.
Port scanner is an essential security tool for finding open ports corresponding to the TCP or
UDP services running on a target device. This scanner allows you to run four different
types of scanning patterns while looking for TCP or UDP open ports.
Port scanning technique consists of sending a message to a port and listening for an
answer. The received response indicates the port status and can be helpful in determining a
host’s operating system and other information relevant to launching a future attack.
The vertical scan is a port scan that targets several destination ports on a single host. A
horizontal scan is a port scan that targetsthe same port on several hosts.
4.4 Enumeration
Enumeration is the process of extracting user names, machine names, network resources,
shares, and services from a system. Enumeration techniques are conducted in an intranet
environment. During enumeration, information is systematically collected and individual
systems are identified.
Example :
1. Discovering NetBIOS name enumeration with NBTscan.
2. Establishing null sessions and connections. Null sessions tools like Dumpsec, Winfo and
Sid2User or more, may used to perform this attack
Enumeration can be used to gain information on :
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.
1. 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).
User can establish a null session with a Windows (NT/200/XP) host by logging on with a
null user name and password. Using these null connections, you can gather the following
information from the host :
a) List of users and groups
b) List of machines
c) List of shares
d) Users and host SIDs (Security Identifiers)
Techniques for Enumeration
a. Extracting user names using email ID's
b. Extract information using the default password
c. Brute force active directory
d. Extract user names using SNMP
e. Extract user groups from Windows
f. Extract information using DNS zone transfer
g. SNMP enumeration
Server Message Block Enumeration : It is mainly used for providing shared access to
files, printers and miscellaneous communications between nodes on a network. It also
provides an authenticated inter-process communication mechanism.
DNS Enumeration : DNS enumeration retrieves information regarding all the DNS servers
and their corresponding records related to an organization. DNS enumeration will yield
usernames, computer names, and IP addresses of potential target systems.
SNMP Enumeration : SNMP is an application layer protocol which uses UDP protocol to
maintain and manage routers, hubs, switches and other network devices. It is based on a
client-server architecture where SNMP client or agent is located on every network device
and communicates with the SNMP managing station via requests and responses. Both
SNMP request and responses are configurable variables accessible by the agent software.
SNMP contains two passwords for authenticating the agents before configuring the
variables and for accessing the SNMP agent from the management station.
Default SNMP password allow attackers to view or modify the SMMP configuration
settings. Attackers can enumerate SNMP on remote network devices for the following :
a. Information about network resources such as routers, shares, devices, etc.
b. ARP and routing tables
c. Device specific information
d. Traffic statistics etc.
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.
Null session attack uses vulnerability in SMB protocol for creating connection because it
uses SMB uses trust for any kind of relationship between devices available in network.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (4 - 20) Ethical Hacking
Now to check whether the system is vulnerable to null session or not, type following
commands :
C:\>net use \\IP_Address\IPC$
For example
C:\>net use\\192.168.56.1\IPC$
Next type
C:\>net use \\IP_Address\IPC “”/u:“”
where “”/u:“” denotes you want to connect without user-name and password. Now
explore further information.
C:\>net view \\IP_Address
The Steps Involved in Performing Enumeration :
The following steps are an example of those a hacker might perform in preparation for
hacking a target system :
1. Extract usernames using enumeration.
2. Gather information about the host using null sessions.
3. Perform Windows enumeration using the Superscan tool.
4. Acquire the user accounts using the tool GetAcct.
5. Perform SNMP port scanning
1. 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.
2. L0phtCrack : Window password is cracked using l0phtCrack. L0phtCrack obtains
password hashes from the operating system, and then begins hashing possible password
values. The password is discovered when there is a match between a target hash and a
computed hash. L0phtCrack must first obtain password hashes from the target system,
and then uses various cracking methods to retrieve the passwords.
3. Aircrack-ng : Aircrack-ng is an 802.11 WEP and WPA-PSK keys cracking program
that can recover keys once enough data packets have been captured. It implements the
standard FMS attack along with some optimizations like KoreK attacks, as well as the
all-new PTW attack, thus making the attack much faster compared to other WEP
cracking tools.
4. THC-Hydra :When you need to brute force crack a remote authentication service,
Hydra is often the tool of choice. It can perform rapid dictionary attacks against more
than 21 protocols, including Telnet, FTP, HTTP, SMB etc.
5. 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.
6. 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.
Characters 1 to 7 Characters 7 to 14
Cleartext : QBMZFTV Cleartext : X
4.6.2 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.
Windows stores passwords in the Security Accounts Manager (SAM). It is binary file that
is difficult to read without special tools.
Not only will L0phtCrack guess passwords, it will extract LANMan hashes from any SAM
file, the local system, or a remote system, and it will even sniff hashes as they cross a
network. The SAM file is stored in the \WINNT\system32\config\ directory.
L0phtCrack will extract passwords from the local or remote computers with the Dump
Passwords From Registry option.
Attacker must get a copy of the encrypted/hashed password representations stored in the
SAM database of target machine. L0phtCrack includes “pwdump” tool for dumping
Windows NT password representation from a local or remote machine across the network.
Requires administrator privileges on target machine.
Fig. 4.6.1 shows configuration options for L0phtCrack.
Fig. 4.6.1
4.6.3 Pwdump
Pwdump is able to extract NTLM and LanMan hashes from a Windows target, regardless of
whether Syskey is enabled. It is also capable of displaying password histories if they are
available. It outputs the data in L0phtcrack-compatible form, and can write to an output file.
This tool is written by Jeremy Allison in the year 1997.
It only affects Windows XP/2000 computers, and it is used in order to dump users and
password hash tables in local or remote Windows XP/2000 computers. These hash tables
allow brute force password cracking in order to try to guess the original values of the user
names and passwords associated, and dictionary attacks.
Login as system admin to windows machine and then run following command at command
prompt :
C:\> pwdump7 >c:\hash.txt
pwdump7 will dump the SAM to the screen and the > character redirects the output to a file
called hash.txt
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (4 - 27) Ethical Hacking
Syntax:
pwdump [-h][-o][-u][-p] machineName
where
-h Prints the usage message and exits
-o Specifies a file to which to write the output
-u Specifies the user name used to connect to the target
-p Specifies the password used to connect to the target
-s Specifies the share to be used on the target, rather than searching for one
4.7.3 Spywares
Software that is installed on a computer without the user’s knowledge which monitors user
activity and transmits it to another computer. Many spyware programs are set to monitor
what web sites you visit and how long you visit them for, generally for advertising /
marketing purposes.
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.
Adware : It is software that gathers information about your Web-surfing habits in order to
target you with pop-up advertisements for products and services that might be of interest to
you. Adware is generally not malicious or illegal. Adware can be Spyware when it tracks
browser activity and reports such activity back to some unknown recipient.
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
1. Do not install freesoftware available on Internet.
2. Do not click on email attachments or links if you don’t know the sender or even if you
know the sender, but the content is unexpected.
3. Do not install unknown software
4. Do not click on links or buttons on pop-up windows.
5. Do not install non-work-related software onto your work computers
6. Save your data and backup often
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.
Fig. 4.8.1 shows buffer overflow attack.
4.9 Steganography
Steganography is the science of hiding information. The purpose of steganography is covert
communication-to hide the existence of a message from a third party.
Information hiding generally relates to both water-marking and steganography. A
watermarking system’s primary goal is to achieve a high level of robustness. It should be
impossible to remove a watermark with-out degrading the data object’s quality.
Steganography is used for high security and capacity, which often entails that the hidden
information is breakable. Fig. 4.9.1 shows a common taxonomy of steganographic
techniques
A text semagram hides a message by modifying the appearance of the carrier text.
Open codes hide a message in a legitimate carrier message in ways that are not obvious to
an unsuspecting observer.
Jargon code uses language that is understood by a group of people but is meaningless to
others.
The goal of steganography is to avoid the detection or even raising the suspicion that a
secret message is being passed on. Steganalysis is the art of detecting these covert
messages. It involves the detection of embedded messages. The types of steganalysis
attacks are similar to those of cryptanalysis attacks.
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
Malware does the damage after it is implanted or introduced in some way into a target’s
computer and can take the form of executable code, scripts, active content, and other
software.
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
4.10.2 Backdoors
A backdoor is any hidden method for obtaining remote access to a computer. A Backdoor is
a remote administration utility that allows a user access and control a computer, usually
remotely over a network or the Internet.
Backdoor is also called trapdoor. It is an undocumented entry point to a module. A
backdoor’s goal is to remove the evidence of initial entry from the system’s log files
Backdoors can be installed for accessing a variety of services; of particular interest for
network security are ones that provide interactive access. It frequently run over protocols
such as Telnet and Rlogin or SSH.
Backdoor is difficult to detect. A common method for masking their presence is to run a
server for a standard service such as Telnet, but on an undistinguished port rather than the
well-known port associated with the service.
Network administrators often use backdoors to control their clients and supervise their
actions in a business network.
Backdoors are usually based on a client-server network communication, where the server is
the attacked machine and the client is the attacker. It is a kind of standard. This is called
direct connection, when the client directly connects to the server.
Remote Administration Trojans (RATs) are a class of backdoors used to enable remote
control over a compromised machine.
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.
4.11 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.
1. Infection code : This is the part that locates an infectable object.
2. Payload : Any operation that any other program can do but is usually something meant
to be possibly destructive.
3. Trigger : Whatever sets it off, time-of-day, program execution by user.
Viruses usually have two phases :
1. Infection phase : Virus reproduce as widely as possible without being detected
2. Attack phase : Virus an attempt to carry out whatever damage they were designed to
inflict
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.
1. Transient virus : Runs when its attached program executes and terminates when its
attached program ends
2. Resident virus : Locates itself in memory so that it can remain active even after its
attached program ends
Virus cannot be completely invisible but can be very hard to detect, especially if it has self
modifying code. The code it executes can be identified and a program can scan for entire
code. Usually it is at the start of a program or maybe a test and jump to code at the bottom
of the file.
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.
Virus program can be small so it hides very easily in a large program. It might hide in a
compiler, a data base manager or a file manager.Macro virus so named because it’s a macro
in Microsoft Word, Excel and others. The number one spot is an attachment to email or
some public download file.
Virus code is both prepended and appended to the host file. Virus code could be split into
several segment and interspersed throughout the infected file using JUMP statement at the
end of each virus segment.
Fig. 4.11.1 shows virus infected host file.Host file is not damage and easy to clean the file.
It is called prepended.
Viruses that surround a program : Virus code runs the original program but has control
before and after its execution.
Characteristics of Virus
1. Propagates when the host program is executed
2. All the virus code need not be located at the start of the infected file.
3. Virus makes a set of system call.
Preventing Virus Infection
Ways to prevent Virus infections
1. Test all new software on an isolated computer.
2. Use only commercial software acquired from reliable, well established vendors.
3. Do not put a floppy disk in the machine unless it has been scanned first.
4. Do not open attachments to email unless they have been scanned. Including turn off the
auto open of attachments in mail readers.
5. Scan any downloaded files before they are run.
6. At least once a week update the virus signature data files.
Make a bootable disk/CD with a virus scan program on it and write protected.
Make and retain backup copies of executable system files in the event the virus detection
program can't remove the virus.
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.
4.11.2 Types of Virus
1. Boot Sector Virus : It infects a master boot record or partition boot record and spreads
when a system is booted from the disk containing the virus. Virus gains control very early
in the boot process before most detection tools are active. Operating systems usually make
files in the boot area invisible to the user, therefore, virus code is not readily noticed.
2. File Infector : This type of virus infects files that the operating system or shell consider to
be executable. File viruses infect executable files.Most really successful file infectors are
classified as Worms.
3. Macro Virus : Infects files with macro code that is interpreted by an application.
4. Appended Viruses : Virus code attaches itself to a program and is activated whenever the
program is run.
5. Integrated Viruses : This type of virus replace some of the target program or the entire
target and give the effect that the target program worked.
6. Document Virus : This virus is implemented within a formatted document. For example
database, written document, picture, spreadsheet and slide presentation. Document is
structured files which contains data and commands. Commands are part of programming
language. Virus uses features of programming language to perform malicious actions.
7. Macro Viruses : A macro is an executable program embedded in a word processing
document (MS Word) or spreadsheet (Excel). When infected document is opened, virus
copies itself into global macro file and makes itself auto-executing. Melissa was really
successful macro virus.
8. Metamorphic Virus : A metamorphic virus mutates with every infection. Virus rewrites
itself completelyateach iteration, increasing the difficulty of detection. Some even have the
ability to dynamically disassemble themselves, change their code, and reassemble
themselves into an executable form. It may change their behavior as well as their
appearance in every incarnation.
9. Memory Resident Viruses : Memory resident viruses remain in memory after the
initialization of virus code. They take control of the system and allocate a block of memory
for their own code. They remain in memory while other programs run and infect them.
10. E-mail Viruses : If the recipient opens the email attachment, the Word Macro is activated.
Thee-mail virus sends itself to everyone on the mailing list in the user’s e-mail package.
The virus does local damage. The first rapidly spreading e-mail viruses, such as Melissa,
made use of a Microsoft Word Macro embedded in an attachment.
11. Polymorphic Virus : A virus can change its appearance is called a polymorphic virus.
12. Stealth Virus : Virus explicitly designed to hide itself from detection by antivirus
software. Thus, the entire virus, not just a payload is hidden.
13. Multipartite Viruses : Viruses that use more than one infection mechanism like file and
boot viruses.
TECHNICAL PUBLICATIONS® - An up thrust for knowledge
Cyber Forensics (4 - 40) Ethical Hacking
4.12 Worm
A worm is a sophisticated piece of replicating code that uses its own program coding to
spread, with minimal user intervention. A worm usually exists as a standalone program that
executes itself automatically on a remote machine, without any user interaction. Worms are
network viruses, primarily replicating on networks.
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. Morris 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 behavior to discover new targets
Worm Virus
Worms do not need hosts. Virus needs hosts
Worm can spread quicker than virus Virus can spread slower than worm
Example : Self modified virus, stealth virus Example : Multi-vector worm, Email
worm
Q. 9 Define keyloggers.
Ans. : A keylogger is a type of surveillance software that has the capability to record every
keystroke you make to a log file. A keylogger recorder can record instant messages, e-mail,
and any information you type at any time using your keyboard.
Q. 10 What is steganography?
Ans. : Steganography is the science of hiding information. The purpose of steganography is
covert communication-to hide the existence of a message from a third party.
Q. 11 What is footprinting ?
Ans. : Footprinting is process of collecting as muchinformation as possible about a target
system/network for identifying different ways of intrudingan organization's network.
Q. 12 What is reconnaissance ?
Ans. : 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.
Q. 13 What is network scanning ?
Ans. : Network scanning is a procedure for identifying active hosts on a network, either for
the purpose of attacking them or for network security assessment. In the enumeration phase,
the attacker gathers information such as network user and group names, routing tables, and
Simple Network Management Protocol (SNMP) data.
Q. 14 Define port scanning.
Ans. : Port scanning refers to the surveillance of computer ports, most often by hackers for
malicious purposes. Hackers conduct port-scanning techniques in order to locate holes within
specific computer ports. For an intruder, these weaknesses represent opportunities to gain
access for an attack. There are 65,535 ports in each IP address, and hackers may scan each and
every one to find any that are not secure.
Q. 28 The software or hardware component that records each keystroke a user enters into a
word processing document is called a _________
(a) sniffer (b) keylogger (c) trojan program (d) buffer overflow
Ans. : (b) keylogger
Q. 29 What type of network attack relies on multiple servers participating in an attack on one
host system?
(a) Trojan attack (b) Buffer overflow
(c) Denial of service attack (d) Distributed Denial of service attack
Ans. : (d) Distributed Denial of service attack
Q. 30 What are the types of scanning ?
(a) Port, network, and services (b) Network, vulnerability, and port
(c) Passive, active, and interactive (d) Server, client, and network
Ans. : (b) Network, vulnerability and port
Social Engineering - Denial of Service - Session Hijacking - Hacking Web servers - Hacking
Web Applications - SQL Injection - Hacking Wireless Networks - Hacking Mobile Platforms.
(5 - 1)
Cyber Forensics (5 - 2) Ethical Hacking in Web
2. Choosing the victim/target : Based on the information collected, the attacker then
analyzes and chooses the most vulnerable person who could reveal sensitive information
to engage with.
3. Establish trust relationship : Once the victim has been chosen, the attacker
communicates with the victim through various ways, like instant messaging, email,or a
direct call. The attacker claims to be someone the victim can relate to and trust.
4. Exploit the relationship : The attacker now tries to exploit the established trust
relationship. By engaging the victim in deceptive talk, the attacker tries to extract as
much as information as possible.
Social engineering can be broken into two common types :
1. Human-based social engineering refers to person-to-person interaction to retrieve the
desired information. An example is calling the help desk and trying to find out a
password.
2. Computer-based social engineering refers to having computer software that attempts to
retrieve the desired information. An example is sending a user an e-mail and asking
them to reenter a password in a web page to confirm it. This social-engineering attack is
also known as phishing.
Common social engineering attacks :
Social engineering is a tactic used by cyber criminals that uses lies and manipulation to
trick people into revealing their personal information.
Social engineering attacks frequently involve very convincing fake stories to lure victims
into their trap. Common social engineering attacks include :
1. Sending victims an email that claims there's a problem with their account and has a link
to a fake website. Entering their account information into the site sends it straight to the
cyber criminal (phishing).
2. Trying to convince victims to open email attachments that contain malware by claiming
it is something they might enjoy (like a game) or need (like anti-malware software).
3. Pretending to be a network or account administrator and asking for the victim's
password to perform maintenance.
4. Claiming that the victim has won a prize but must give their credit card information in
order to receive it.
5. Asking for a victim's password for an Internet service and then using the same password
to access other accounts and services since many people re-use the same password.
6. Promising the victim, they will receive millions of dollars, if they will help out the
sender by giving them money or their bank account information.
The SYN attack is denial of service attack. It is related to TCP connection setup. In a SYN
attack, a remote attacker floods user machine with SYN packets, causing it to spend all its
cycles setting up bogus TCP connections.
Telnet protocol establish virtual connection with server is called session. Session is
established with three way TCP handshake protocol. Each TCP packet has flag bits, two of
which are denoted SYN and ACK. To establish a TCP connection, the originators send a
packet with the SYN bit on.
If the recipient is ready to establish a connection, it replies with a packet with both the SYN
and ACK bits on. The first party then sends a packet with the ACK bits on. Sometime,
packets get lost or damaged in transmission. Destination maintains a queue called
SYN_RECV connection.
If ACK or SYN-ACK packet is lost, the destination host will time out the incomplete
connection and discard it from its waiting queue. The attacker can deny service to the target
by sending many SYN requests and never responding ACK with ACKs, thereby filling the
victim SYN_RECV queue and never processes it. This queue is small which contain up to
20 entries. Therefore the target system keeps on waiting. The result may be a hard disk
crash or reboot.
If a few SYN packets are sent by the attacker every 10 seconds, the victim will never clear
the queue and stops to respond.
Another DoS attack is to send a stream of packets to a router. Packets contains all bits turn
on. The router spends so much time processing these options that it fails to process BGP
updates.
The denial of service attack does not result in information theft or any kind of information
loss. DoS attacks affect the destination rather than a data packet or router.
DoS attack affects a specific network service, such as e-mail or domain name system. One
way of initiating this attack is by causing buffer overflow. Inserting an executable code
inside memory can potentially by causing buffer overflow. Fig. 5.2.1 shows denial of
service attack.
2. New distributed server architecture makes it harder for one denial of service to take
down an entire site.
3. New software protections deactivate existing DoS attacks quickly
4. Service Providers know how to prevent these attacks from affecting their networks.
DDoS attack, uses many devices and multiple Internet connections, often distributed
globally into what is referred to as a botnet. A DDoS attack is much harder to deflect,
simply because there is no single attacker to defend from, as the targeted resource will be
flooded with requests from many hundreds and thousands of multiple sources.
The applications/databases that users connect to through these Web servers are called
websites. Any vulnerability occurring in the front end applications, database or OS can
translate to Web Server vulnerabilities.
Types of Web Server Vulnerabilities :
1. Web server software misconfiguration
2. Lack of proper security policies and procedures
3. Application bugs, or flaws in programming code
4. Vulnerable default installation of operating system and web server software
Attacks against Web Servers :
A website defacement is an attack on a website that changes the visual appearance of the
site.
A message is often left on the webpage. Most times the defacement is harmless, however, it
can sometimes be used as a distraction to cover up more sinister actions such as uploading
malware.
Defacing a website means the hacker exploits a vulnerability in the operating system or
web server software and then alters the website files to show that the site has been hacked.
Often the hacker displays their hackername on the website’s home page.
A web site defacement consist of following key elements :
1) A system with a vulnerability is identified and exploited, allowing unauthorized access
by a malicious third party
2) Existing web pages are modified or replaced with new text or graphics
3) Something that an attacker might hope to accomplish as a result of a web site
defacement
Common website attacks that enable a hacker to deface a website include the following :
1. Using man-in-the-middle attack, capture administrator credentials
2. Compromising an FTP or e-mail server
3. Misconfiguring web shares
4. Using SQL injection attacks
5. Using Telnet or Secure Shell intrusion
6. Carrying out URL poisoning, which redirects the user to a different URL
Patch Management Techniques
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.
Managing patches thus becomes easy and simple.
Generally, software patches can be categorized into three different categories: feature
updates, bug fixes, and security updates.
1. Feature patches: they improve software functionality and provide additional capabilities.
2. Bug fix patches: they address certain errors found in software, helping it run smoothly
and prevent crashes.
3. Security patches: through security patch management they correct known software
vulnerabilities and cover holes in your systems, thus preventing malicious actors from
exploiting the flaws and compromising your organization.
Countermeasures for Web server-based attacks are :
a) Keep web software patched and updated.
b) Disable client-side scripting.
c) Block unsigned applets.
d) Disable cookies.
e) Use a proxy server with content filtering.
f) Don’t install scripting languages on Web servers.
g) Inspect all scripts before deploying them.
h) Audit and log activity.
i) Deny access from known malicious domains.
j) Disable harmful or exploited URL constructions such as directory traversals (..),
backslashes, or multiple CGI processes in a single URL.
k) Restrict non-Web file types from being referenced in a URL.
l) Disable unused script extension mappings.
SQL Injection Example: An example SQL injection attack starts with code utilizing an SQL
statement, such as:
$db_statement = "SELECT COUNT(1) FROM `users` WHERE `username` =
'$username' AND `password` ='$password'";
In an SQL injection attack against code such as this, the attacker supplies input, such as the
following, to the application:
$username = "badUser";
$password = "' OR '1'='1";
Using this example, the SQL statement executed becomes the following:
SELECT COUNT (1) FROM `users` WHERE `username`='badUser' AND `password`=''
OR '1'='1';
In the above example, this results in returning a count of all rows in the "users" table,
regardless of the user name or password supplied, since the conditional '1'='1' always
returns as true. If the query shown in this example is used for authentication purposes, the
example SQL injection attack has just bypassed the authentication process for the
application in question.
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.
In web application, the values received from a Web form, cookie, input parameter, etc., are
not typically validated before passing them to SQL queries to a database server. Then
dynamically built SQL statements. An attacker can control the input that is sent to an SQL
query and manipulate that input.
Attacker may be able to execute the code on the back-end database. Fig. 5.6.1 shows three
tier application with SQL commands.
2. Mobility : Wireless devices are far more portable and mobile, thus resulting in a
number of risks.
3. Accessibility : Some wireless devices, such as sensors and robots, may be left
unattended in remote and/or hostile locations, thus greatly increasing their vulnerability
to physical attacks.
WEP aims to provide security by encrypting data over radio waves so that it is protected as
it is transmitted from one end point to another. However, WEP is not as secure as believed.
WEP is used at the two lowest layers of the OSI model - the data link and physical layers; it
therefore does not offers 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.
Fig. 5.7.1 : Basic WEP Encryption where RC4 Keystream XORed with Plaintext
Standard 64-bit WEP uses a 40 bit key, which is concatenated to a 24-bit initialization
vector (IV) to form the RC4 traffic key. But restrictions on cryptographic technology limit
the key size. Once the restrictions were lifted, all of the major manufacturers eventually
implemented an extended 128-bit WEP protocol using a 104-bit key size.
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.
There are other weakness in WEP, including the possibility of IV collisions and altered
packets, that are not helped at all by a longer key.
Because RC4 is a stream cipher, the same traffic key must never be used twice. The
purpose of an IV, which is transmitted as plain text, is to prevent any repetition, but a 24-bit
IV is not long enough to ensure this on a busy network. The way the IV was used also
opened WEP to a related key attack. For a 24-bit IV, there is a 50% probability the same IV
will repeat after 5000 packet.
WEP security involves two parts: Authentication and Encryption.
When device initially join the LAN, then authentication starts. It prevents the device or
station to join the network unless they know the WEP key. Fig. 5.7.2 shows WEP
authentication.
Wireless device sends authentication request to the wireless access point, then wireless
access point sends 128 bit random challenge in a clear text to the requesting client. The
wireless device uses the shared secret key to sign the challenge and sends it to the wireless
access point.
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.
In WEP, same key is used for authentication and encryption. So it is difficult to tell whether
the subsequent message come from the trusted device or from an impostor. There is
possibility of man in the middle attack.
Strengthening WEP
Following are the solution to overcome the weakness of WEP :
1. Initialization Vector size should be increases.
2. The hashed value of IV can be pre-pended or appended to the cipher-text instead of the
clear-text.
3. For the data integrity verification, use different method instead of CRC checksum.
4. Change secret key regularly.
5. Better key management using security handshake protocols.
6. New authentication mechanisms using the Extensible Authentication Protocol(EAP).
An attacker at large on the Internet has other techniques that make it possible to install a
sniffer remotely on the victim machine.
Scanning is the act of sniffing by tuning to various radio channels of the devices. A passive
network scanner instructs the wireless card to listen to each channel for a few messages.
This does not reveal the presence of the scanner.
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 networksare 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.
If Beacon transmission is disabled, the attacker has two choices. The attacker can keep
sniffing waiting for a voluntary Associate Request to appear from a legitimate station that
already has a correct SSID and sniff the SSID as described above. The attacker can also
chose to actively probe by injecting frames that he constructs, and then sniffs the response.
When the above methods fail, SSID discovery is done by active scanning.
Collecting the MAC Addresses :
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.
1. The attacker wishes to use these values in spoofed frames so that his station or AP is not
identified.
2. The targeted AP may be controlling access by filtering out frames with MAC addresses
that were not registered.
5.8.1 Mishing
Mishing is the combination of the words mobile phone and phishing. It is just like
phishingbut instead of using a computer, the scammer targets mobile devices. This is
especially true for users thatbuy goods and services on their mobile device or useit for
banking.
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 afraudulent 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
Hacking means indexing the weakness in the computer system or network or cracking the
system to gain access. Hacking is not all about cracking the password and stealing,
anything. if you use anything without the owner permission is known ashacking.
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.
This is done by installing software on the phone to provide the functionality that is remotely
accessed. The phone user is not aware of the operation of the software. Information is sent
using the phone data capability and is not readily identifiable from the phone bill
Q. 9 Session hijacking is made possible by tools that perform __________ number prediction.
(a) sequence (b) serial (c) random (d) all of these
Ans. : (a) sequence
Q. 10 What is a sequence number?
(a) A number that indicates where a packet falls in the data stream
(b) A way of sending information from the sending to the receiving station
(c) A number that the hacker randomly chooses in order to hijack a session
(d) A number used in reconstructing UDP session
Ans. : (b) A way of sending information from the sending to the receiving station
Q. 11 The term “computer contaminant” refers to:
(a) Excessive dust found inside the computer case
(b) Viruses, worms, and other malware
(c) Spam e-mails
(d) Nigerian scam e-mails
Ans. : (b) Viruses, worms, and other malware
Q. 12 What is the art of exploiting the human elements to gain access to un-authorized
resources?
(a) Ethical Hacking (b) Social Engineering
(c) Caller ID Spoofing (d) Reverse Engineering
Ans. : (b) Social Engineering
Q. 13 Which attack is used to crash Web Server?
(a) SQL Injection (b) ARP poisoning
(c) DOS attack (d) Cross Site Scripts
Ans. : (a) SQL Injection
Q. 14 Buffer overflow, SQL injection, and stack smashing are examples of:
(a) Vulnerabilities (b) Exploits
(c) Input attacks (d) Injection attacks
Ans. : (c) Input attacks
Q. 15 The purpose for putting a “canary” value in the stack is:
(a) To detect a dictionary attack (b) To detect a stack smashing attack
(c) To detect parameter tampering (d) To detect script injection
Ans. : (b) To detect a stack smashing attack
Q. 16 The following are characteristics of a computer virus EXCEPT:
(a) Polymorphic (b) Downloadable
(c) Self-propagating (d) Embedded in spam
Ans. : (c) Self-propagating
Q. 25 An attempt to slow down or stop a computer system or network by flooding the system
with requests for information is called a __________.
(a) virus (b) worm (c) denial-of-service attack (d) trojan horse
Ans. : (c) denial-of-service attack
Q. 26 __________ is a computer virus encoded as a macro in programs that support a macro
language.
(a) Virus (b) Macro virus (c) Worm (d) Trojans
Ans. : (b) micro virus
Q. 27 __________ is a computer program that replicates and propagates itself without having
to attach itself to a host.
(a) Virus (b) Worm (c) Trojan (d) Spyware
Ans. : (b) worm
Q. 28 Nimda and code red are __________.
(a) Viruses (b) Spyware (c) Worms (d) Adware
Ans. : (c) worms
Q. 29 What is the main purpose of malware?
(a) To learn passwords (b) To do harm to a computer system
(c) To discover open ports (d) To identify an operating system
Ans. : (b) To do harm to a computer system
Q. 30 The software or hardware component that records each keystroke a user enters into a
word processing document is called a __________.
(a) sniffer (b) keylogger
(c) trojan program (d) buffer overflow
Ans. : (b) Keylogger
Q. 31 What type of network attack relies on multiple servers participating in an attack on one
host system?
(a) Trojan attack (b) Buffer overflow
(c) Denial of service attack (c) Distributed Denial of service attack
Ans. : (d) Distributed Denial of service attack
Notes
Q.5 What is the purpose of PUK ? (Refer Two Marks Q.12 of Chapter - 3)
Q.9 Define order of volatility (OOV). (Refer Two Marks Q.17 of Chapter - 5)
PART - B (5 13 = 65 Marks)
b) Explain the process of acquiring data with a linux boot CD. (Refer section 1.7) [13]
(M - 1)
Cyber Forensics M-2 Solved Model Question Paper
Q.12 a) i) While processing crime, how will you work with windows and DOS systems ?
(Refer section 2.2) [7]
ii) Explain in details the various computer forensic tools. (Refer section 2.3) [6]
OR
Q.14 a) What is hacking ? How hackers hack the system ? Explain various phase of hacking.
(Refer section 4.1) [13]
OR
Q.15 a) i) What is SQL injection ? Explain blind SQL injection. (Refer section 5.6) [6]
ii) What is WEP ? Explain its working. (Refer section 5.7) [7]
OR
b) What is mishing ? What is IMEI and EIR ? Explain security challenges posed by
mobile device. (Refer section 5.8) [13]
PART - C (1 15 = 15 Marks)
Q.16 a) A public institution was the victim of a hacker. The subject got into the network and
placed several large media files on several computers and changed the desktop
configurations. Management decided against calling law enforcement initially (because
of media attention) and instructed the IT department to get a CFS to privately
investigate. How did the CFS go about conducting the investigation ?
(Refer section 4.13) [15]
OR
b) A patient with a heart ailment was transported to a hospital where an angiogram was
performed. The patient later had a stint inserted into an artery, along with a second
angiogram, but died shortly thereafter. A third angiogram was performed immediately
after the patient’s death. Images of the angiogram procedures were purportedly stored
on computer hard drives. The day following the patient’s death, hospital staff were able
to locate images for the first and third angiograms but could not find any images of the
second procedure. The hospital and doctor were sued for medical malpractice and
wrongful death. The plaintiffs also claimed the defendants had deliberately deleted the
images of the second angiogram that allegedly proved the wrongful death claim. A CFS
team (CFST) was engaged by the doctor’s insurance company to locate images of the
second angiogram on the computer hard drive. Explain the possible actions that the
CFST took to locate the images. (Refer section 1.8) [15]
Notes