Module3.1
Module3.1
Computer Forensics
Part 1
1. Introduction to Computer Forensics
Computer Forensics is a scientific method of investigation and analysis in order
to gather evidence from digital devices or computer networks and components
which is suitable for presentation in a court of law or legal body.
Computer proof can be useful in illegal cases, civil disputes and human resources
or employ proceedings.
Computer Forensics is not just about “detective work”, searching for and trying
to find out information.
1
Computer forensics is also worried with:
i. Sensitive data handling responsibility and confidentiality.
2
iii. Extracted and possibly applicable evidence is correctly handled and endangered
from later mechanical or electromagnetic damage.
iv. A continuing chain of custody is familiar and maintained.
v. Business operations are affected for a incomplete amount of time, if at all.
vi. Any client-attorney information that is reluctantly learned during a forensic
examination is ethically and formally respected and not disclosed or revealed.
1. Protect: Protect the subject computer system during the forensic examination from
any possible alteration, damage, data corruption, or virus introduction.
2. Discover: Discover all files on the subject system. This includes existing normal files,
deleted yet remaining files, hidden files, password-protected files and encrypted files.
4. Reveal: Reveal (to the greatest extent possible) the contents of hidden files as well
as temporary or swap files used by both the application programs and the operating
system.
5. Access: Access (if possible and legally appropriate) the contents of protected or
encrypted files.
6. Analyze: Analyze all possibly relevant data found in special (and typically
inaccessible) areas of a disk. This includes but is not limited to what is called
unallocated space on a disk as well as slack space in a file (the remnant area at the end
of a file in the last assigned disk cluster, that is unused by current file data, but once
3
again, may be a possible site for previously created and relevant evidence).
7. Print: Print out an overall analysis of the subject computer system, as well as a listing
of all possibly relevant files and discovered file data.
8. Provide: Provide an opinion of the system layout, the file structures discovered, any
discovered data and authorship information, any attempts to hide, delete, protect and
encrypt information and anything else that has been discovered and appears to be
relevant to the overall computer system examination. Also provide expert consultation
and/or testimony, as required.
1. Future Prevention: Without knowing what happened, there is no hope of ever being
able to stop someone else from doing it again.
4
5. Ensuring Justice: Properly collected and preserved evidence is useful for ensuring
justice. It helps the legal system make fair and informed decisions, preventing wrongful
convictions and ensuring that the guilty are held accountable.
Any paper trail of computer records they may leave can be easily altered or may
be only temporary.
Auditing programs may mechanically destroy the records left when computer
contacts are finished with them.
b) Account for any changes and keep detailed logs of your actions: Sometimes
evidence alteration is inevitable. In these cases, it is unconditionally essential
that the nature, extent and reasons for the variations be documented.
c) Comply with the five rules of evidence: Subsequent these rules are essential for
assuring successful evidence collection.
5
d) Do not exceed your knowledge: If someone find himself out of his depth, he
should learn more before ongoing (if time is available) or find someone who
knows the territory.
e) Follow local security policy: If one fails to observe with his company’s security
policy, he may find manually with some difficulties.
g) Wok fast: The earlier work can be done, the less likely the data is going to
change. Unstable evidence may vanish entirely, if it is not collected in time. If
multiple systems are involved, need to work parallelly.
i) Don’t shutdown before collecting evidence: A system should not be never ever
shut down before the indication is collected. If so, not only any volatile
information is lost, but also the attacker may have trojan the startup and shut
down scripts , plug-and-play plans may alter the system shape and provisional
file systems may be wiped out.
6
b) Volatile data: It is the data that is stored on a volatile memory type storage
such as memory, registers, cache, RAM, or it exists in transit, that will be lost
once the computer is turned off or it loses power. Since volatile data is
temporary, it is crucial that an investigator knows how to reliably capture it.
c) Original Evidence: These are the pieces of evidence of a statement that is made
by a person who is not a testifying witness. It is done in order to prove that the
statement was made rather than to prove its truth.
d) Testimony: Testimony is when a witness takes oath in a court of law and gives
their statement in court. The shreds of evidence presented should be authentic,
accurate, reliable, and admissible as they can be challenged in court.
7
11. Methods of Evidence Collection:-
There are two basic forms of collection:
1. freezing the scene
2. Honey potting.
2. Honey Potting:
It is a trap for hackers. It mimics a target for hackers and uses their intrusion
attempts to gain information about cybercriminals and the way they are
operating or to distract them from other targets.
Honey potting is the process of making the replica system and luring the attacker
into it for further monitoring.
The assignment of confusing information and the attacker’s reply to it is a good method
for decisive the attacker’s motive.
a) Find the Evidence: A checklist is used. Not only does it help to assemble
indication, but also it can be used to double-check that everything which need to
look for is there.
8
b) Find the relevant data: Once the signal has originated, then it is easy to figure
out what part of it is applicable for the case.
c) Create an order of Volatility: The order of volatility for a system is a good guide
and guarantees that one can minimize loss of virtuous evidence.
e) Collect the Evidence: Collect the evidence consuming the suitable tools for the
job.
9
xiii. Identify file programs and storage anomalies
xiv. Evaluate program functionality
xv. Document all the findings
xvi. Retain copes of software used
c) The crime scene technicians (usually a person who is an expert in computer forensic).
a) Identifying the crime location: The person, who arrives first at the crime scene,
should be able to identify depth of the crime and restrict access to the crime
location.
b) Protecting the crime scene: All the devices, including non-functional computers,
mobile phones, notebooks, PDAs or other portable devices are considered a
part of the crime scene. First respondent should freeze the condition of all the
devices and wait for the IT incident response team or investigator in-charge to
decide if any equipment can be excluded.
10
available, then it is easier to have a record of the crime. But if there is no
surveillance, then identifying crime scene is a challenge for investigation.
2. Role of Investigators:
a) A chain of order: This refers to the flow investigation process. All the systems
and other equipment's at the crime scene should not be touched, replaced,
accessed or unplugged without the permission of a senior investigator. The role
of investigator is to control and manage the investigation.
b) Conducting the crime scene search: Officers should seek all the systems, written
documents and notes, manuals and log files related to the crime. It involves
mobile phones, printers, scanners, external device such as flash drive, hard disk
etc.
c) Preserving integrity of the facts or evidence: Criminals always removes all the
evidences. That’s why it is needed to preserve all the evidences in order to take
action against the offender. Investigator should make exact copy of all the
evidences, if possible and should be able to analyse the footprints of criminal.
b) Shutting down the computer system for transport: To preserve the integrity of
original evidence, systems should be properly shut down. All the running
applications should be properly closed in order to avoid corruption of files.
11
c) Marking and recording the evidence: All the evidences should be marked with
time and date of evidence collected, initials of the investigator, case
identification number and other related information all of which should be
recorded in evidence log files.
d) Packaging of the evidence: All the digital evidences such as handheld, computer,
laptops, PDAs, hard disks should be properly packed in antistatic bag for
transport. Written documents such as notes, manuals and books should be
placed in plastic bags in order to protect them from damage.
e) Securely transport the evidence: All the data should be securely transported to a
secure evidence locker. The evidence should not come directly in contact with
magnetic fields during transport nor left in direct contact with sunlight etc.
f) Processing the evidence: Special tools will be used to analyse the data at last.
The following steps should be followed to collect the live data from windows system.
12
b. Preparing the Response toolkit: There are several stages to prepare toolkit
13
There are four options available when the information has been retrieved.
Two advantages :
1. It helps to quickly get on and off the target system.
2. It also provides offline feature of reviewing the information
which was previously attained.
14
III. Obtaining Volatile Data for live response:
The following volatile or temporal data is collected before forensic duplication
i. The date and time of the system
ii. List of users that are currently logged on.
iii. Entire file system’s time and date stamp.
iv. List of processes that are currently running.
v. List of sockets that are open currently.
vi. Applications that are listening on the open sockets.
vii. List of systems that have current or had recent connections to the
system.
1. Run a trusted cmd.exe: There might be need to run cmd.exe on victim’s system
only to find that actually del *.* is done in the \winnt\system32 directory.
2. Record system time and date: After executing trusted command shell, it is a
good idea to capture the local system date and time. This is important to
correlate the system logs as well as to mark the times at which the response has
15
been performed.
A:\>date>record.txt // Saves date in record.txt
A:\>time>>record.txt // Updates record.txt with time
3. Determine logged users: Identifying the active connections of the user accounts
is the next step. It is necessary to identify which user accounts have remote
access rights on the target system, in order to respond to a system that offers
remote access via modem. PsLoggedOn is an applet that is used to display both
the locally logged on users and the users logged on via resources for either the
local computer or a remote one.
4. For all files, record modification, creation and access times: To get the list of all
the directory files on the target machine, “dir” command is used. It includes the
size, access, alteration and creation time. The time and date stamps become the
evidence, if the significant information about the time frame when an event
occurred is identified.
5. Determine open ports: There are several networking commands available, out of
which Netstat can be used to determine which ports are open. It also enlists all
listening port and current connections to those port. Volatile data, such as
recently terminated connections and current connections can be recorded
using Netstat.
6. List of applications that are associated with those ports: Knowing which
services listen on which ports is helpful. A free tool fport is used to enlist listening
ports for all the processes.
7. List of all running process: It is necessary to record all the processes that are
currently executing on the system before turning off the target system, as it may
destroy this information. To manage the process and maintain statistical
information about the process, the kernel object is created by the operating
system.
16
8. List of current and recent connections: To know who is connected or who has
connected recently, the networking commands like:
9. Record date and time of target system: Recording date and time of the target
system ensures that you have a record of when you were logged on to that
system. It can be used as an evidence, if anything changed on the system outside
the timeframe you have recorded, you are not responsible for that alteration.
10. Commands access at the time of initial response: Doskey/history command can
be used to show the history of the commands that was currently accessed on the
system.
1. Run a trusted shell: Attacker attacks the UNIX shell to log all the commands
executed on the system or to perform criminal activities hidden to the
investigator. This is the reason to run someone’s trusted own shell.
2. Record the time and date of the system: Local date and time can be
recorded using “date” command. It is necessary for future reference. It will
also display when someone was on the system. The following command can
be used to capture this information:
17
[root@conan / root]# date
Tue Feb 20 16:12:43 UTC 2024
4. Record creation, alteration and access time of each file: All the available
time/date stamps for each file in Windows and UNIX system – atime(i.e.
access time), mtime(i.e. modification time) and ctime(i.e. inode change time)
can be obtained by using the proper command line arguments such as:
ls –alRu / > /floppy/atime
ls –alRc / > /floppy/ctime
ls –alR / > /floppy/mtime
5. Identify open ports: The most widely used command for listing open ports on
a UNIX system is Netstat. To view all the open ports –an command is used. To
tell the Netstat command not to resolve the host name which reduces the
impact on the system and speed up the execution of the command, -n option
is used.
7. Identify the running process: The “ps” command displays all the running
processes in the system.
8. List the current and recent connections: Netstat and arp commands are used
to get the information about the current and recent connections.
9. Record the time of the system: Date command can be used to record time.
Recording time of the target system ensures that someone has a record on
18
when he/she was logged on to that system. It can be an evidence, if anything
changed to the system outside the timeframe he/she has recorded, he/she is
not responsible for that alteration.
10. Record the steps taken: History command can be used to show the history of
the commands that was currently accessed on the system. “vi” can be used if
live response is performed from the editor.
11. Record cryptographic checksum: “Md5sum” can be used against all the files
in data directory to record cryptographic checksum of all collected
information:
[root@conan / root]# md5sum * > md5sums.txt
19