Cyber - Forensics Unit 3
Cyber - Forensics Unit 3
== Equal (eq)
!= Not equal (ne)
> Greater than (gt)
< Less than (lt)
Logical expressions
Tests can be combined using logical expressions. These too are
expressible in C-like syntax or with English like abbreviations:
Symbol Meaning
|| Logical OR
! Logical NOT
Snort
• 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.
• Snort uses rules stored in text files. Text editor can use for modifying the
rules. Rules are grouped in categories. Separate file is maintained for each
group. The “snort.conf “is the main configuration file and all group files are
included in this file. At startup time, snort reads these rules and builds data
structure.
Components of snort
A snort IDS contains the following components:
1. Packet decoder
2. Preprocessors
3. Detection engine
4. Logging and alerting system
5. Output modules
1. Packet decoder: It takes packets from different types of network interfaces
like Ethernet, SLIP, PPP and prepare for processing. Packets are passed into
the packet decoder. Translates specific protocol elements into an internal data
structure.
2. Preprocessor: Preprocessors are components that can be used with snort to
arrange or modify data packets before the detection engine does some
operation to find out if the packet is being used by an intruder. They are also
used to prepare data for detection engine; detect anomalies in packet headers;
packet defragmentation; decode HTTP URI and reassemble TCP streams.
3. Detection engine: The most important part, applies rules to packets. The
detection engine performs simple tests on a single aspect of each packet to
detect intrusions.
4. Logging and alerting system: It generates alert and log messages depending
upon what the detection engine finds inside a packet. Logs are kept in simple
text files and TCP dump- style files. Log files are stored under /var/log/snort
folder by default.
Snort components
5. Output modules: It process alerts and logs and generate final output.
Depending on the configuration, output modules can take following actions:
1. Simply logging to /var/log/snort/alerts file
2. Sending SNMP traps c. Sending messages to syslog facility
3. Logging to a database like MySQL or Oracle.
4. Generating XML output
5. Modifying configuration on routers and firewalls
Email Investigations
• Email is used in criminal acts, but also in inappropriate actions, such as
threats and frauds (phishing). While in principle email is hard to connect to
an individual, in practice, email can be traced and connected to the
perpetrator.
• Over a period of year's e-mail protocols have been secured through several
security extensions and producers, however, cybercriminals continue to
misuse it for illegitimate purposes by sending spam, phishing e-mails,
distributing child pornography, and hate e- mails besides propagating
viruses, worms, hoaxes and trojan horses.
• E-mail forensic analysis is used to study the source and content of e-mail
message as evidence, identifying the actual sender, recipient and date and
time it was sent, etc. to collect credible evidence to bring criminals to
justice.
• 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:
> Examining sender's e-mail 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 idiosyncratic 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 control 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 (MS Outlook), 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.
SIM
Legal Framework IT Act, Criminal laws, Contracts IT Act, Data Protection Laws