Module 4_ Network Forensics
Module 4_ Network Forensics
Forensics
-By
Asst Prof Rohini M. Sawant
Introduction to Network Forensics
● Network forensics is a specialized subfield of digital forensics that focuses on the collection,
analysis, and investigation of network data in order to trace cybercrimes, detect security threats,
and monitor network behavior.
● It aims to uncover how malicious activities or network incidents occurred by studying traffic
patterns, packet data, and network logs.
● Network forensics refers to the practice of capturing, storing, and analyzing network traffic to
investigate incidents such as security breaches, hacking attempts, malware infections, or
unauthorized access. Unlike traditional digital forensics (which focuses on hard drives, devices,
or files), network forensics revolves around traffic that flows through the network, including:
1. Data packets: Small units of data transmitted across the network.
2. Network Logs: Logs from devices such as firewalls, routers, and intrusion detection systems.
3. Protocols: Protocols such as HTTP, FTP, DNS, and others, which define how data is exchanged
over the network.
The goal of network forensics is to reconstruct events, trace the path of an attacker, identify
vulnerabilities, and even identify perpetrators.
Key Goals of Network Forensics
● Incident Response: Network forensics helps identify and respond to incidents in real-time. By
analyzing network traffic, investigators can determine the scope and nature of a security breach,
understand the attack's vector (how it entered the system), and track the movement of attackers
across the network.
● Investigation and Attribution: Once a security event occurs, network forensics can be used to
trace the origin of the attack. This involves following network paths to understand how the attack
progressed, which systems were targeted, and which methods were used.
● Evidence Collection: In legal or compliance contexts, network forensic investigations can be
used to gather digital evidence of cybercrime or malicious activities that may lead to criminal
charges. Network logs, packet captures, and communication data are crucial for providing
evidence that can stand up in court.
● Threat Detection and Prevention: By continuously monitoring network traffic, potential threats
can be identified early, even before they cause damage. Forensic data analysis can highlight
unusual patterns in traffic, signaling a possible attack or breach.
Key Components of Network Forensics
Network forensics typically involves several components that work together to provide a detailed understanding
of network incidents:
a. Data Capture: Network forensics starts with capturing data that flows through the network. This data may
include:
● Packets: Small chunks of data transmitted across the network. Each packet contains detailed information
such as source, destination, protocol, and payload.
● Network Logs: Logs from network devices (routers, firewalls, switches) that record traffic activity. These
logs provide insights into what is happening on the network at any given time.
Network forensic experts try to reconstruct the timeline of events by piecing together data captured from
multiple sources, such as:
● Session Reconstruction: Rebuilding user sessions to see what the user did during the attack or
incident.
● Timeline of Attack: Understanding the sequence of steps the attacker took to gain access,
escalate privileges, or move through the network.
d. Data Correlation
Network forensics often involves correlating network traffic data with other logs or data sources, such as
system logs, application logs, and event logs. This cross-referencing allows for a more complete picture
of the incident, making it easier to identify the root cause.
Evidences in Network Forensics
● Application and OS logs: There are various logs that will be generated in
different locations depending on the events occurring. Application logs such as
access logs and database logs, event logs generated by the operating systems in
use(Windows event logs and Linux syslog), logs from network devices such as
firewalls and routers are some examples of various log locations to look at.
● Intrusion Detection System/Intrusion Prevention System (IDS/IPS)
alerts: Many investigations begin from an alert from IDS or IPS. These logs
from IDS or IPS usually include alert data such as an identifier that has caused
the alert and the description of the alert. In addition to it, we may find packet
headers and payload in the alert. Depending on the tool being used, these logs
may be extracted from various locations such as a file on the disk, web gui or
email.
Evidences in Network Forensics
● Routers, Firewalls and proxy logs: Routers are used to route the traffic from one
network to another and they are the most commonly used devices in enterprise networks and they
often contain many features that are of interest during a network forensic investigation.
● Firewalls perform packet filtering based on a predefined ruleset. For example, let us assume that a
rule has been defined to block any incoming traffic on port 3389.
● Any firewall will be able to do this as specified in the firewall rules. Modern firewalls can do
much more than just packet filtering.
● They are often termed as Next Generation Firewalls and come with additional features such as
VPN, Intrusion Prevention Systems, Intrusion Detection Systems, Anti Virus, Web Application
Firewalls and more.
● Often, the goal of these modern firewalls is to effectively monitor the content within the packets
and determine whether to allow the packets or not and thus they contain logs of our interest.
● Captured Network traffic: When an alert is generated by tools like IDS/IPS, a packet
capture can be recorded and saved for further analysis in many tools. Most of these captures can
be analysed using tools like Wireshark later. Additionally, in the event of suspicion of an ongoing
attack, tools like tcpdump for Wireshark can be used for packet capturing and analysis.
Evidence Collection and Acquisition in Wired
Networks
Wired networks refer to networks where data is transmitted through physical cables (e.g., Ethernet). In wired network
environments, evidence collection generally focuses on monitoring network traffic, capturing system logs, and
examining the devices and storage media that are part of the network infrastructure.
● Routers and Switches: These devices act as central points through which network traffic flows. Routers often
maintain detailed logs of network traffic, IP addresses, source and destination port numbers, connection
attempts, and other network activity. This data can be crucial in identifying unusual patterns or unauthorized
connections.
Example: Logs from a router might show a series of failed login attempts from an external IP address, which
could indicate an attempted intrusion.
● Firewalls: Firewalls typically log both allowed and denied network traffic. These logs can provide detailed
information about what types of traffic are coming in and out of the network. Forensic investigators can
examine firewall logs to identify anomalous traffic or potential attack attempts.
Example: A spike in failed connection attempts in the firewall log could indicate a brute-force attack against the
network.
Evidence Collection and Acquisition in Wired
Networks
● Packet Sniffing and Network Traffic Analysis: Tools like Wireshark, tcpdump, and NetFlow allow forensic
investigators to capture packets of data traveling across the network. Capturing raw packets can provide insights
into:
■ Source/Destination IPs: Identifying the source and destination of suspicious traffic.
■ Protocol Used: Understanding what protocols are in use (e.g., HTTP, FTP, SSH, etc.).
■ Payloads and Metadata: Analyzing the data portion of the packets can sometimes reveal
unauthorized communications or malicious content.
■ Example: By examining the payload of a packet, investigators might discover that sensitive data
like credit card numbers or passwords are being exfiltrated.
Evidence Collection and Acquisition in Wired
Networks
● Flow Data:
○ NetFlow and sFlow are technologies used for gathering traffic flow data. These protocols provide
summary information about traffic patterns, including source and destination IPs, ports, and the volume
of data transferred. This data is typically stored in flow records and can be analyzed to understand large-
scale network activity.
■ Example: Investigators can use flow data to detect large amounts of data being transferred from an
internal server to an external IP address, which might indicate data extrusion.
Evidence Collection and Acquisition in Wired
Networks
● Device Logs: Routers, switches, servers, and other network devices generate logs that contain timestamps, IP
addresses, traffic patterns, and error messages. These logs are extremely useful for tracking down potential
incidents and understanding what happened at each device.
■ Example: A switch log might show a specific port being accessed repeatedly by a certain MAC
address, which could point to a compromised device or unauthorized access.
● Application Logs: Logs from specific applications such as web servers (Apache, Nginx), database servers
(MySQL, MSSQL), or authentication systems (e.g., RADIUS) are critical in digital forensics. For example:
■ Web Server Logs: Can show unauthorized login attempts, failed script executions, or exploitation
of known vulnerabilities.
■ Database Logs: Can show suspicious queries or abnormal activity, like bulk data exports or access
from unusual IP addresses.
■ Example: A database log might show unauthorized SQL queries attempting to extract sensitive
customer data.
Evidence Collection and Acquisition in Wired
Networks
● Rogue AP Detection: A rogue access point is an unauthorized device pretending to be a legitimate access point.
Tools like Kismet and Wireshark can detect rogue APs by identifying anomalies such as:
■ A sudden appearance of an AP with the same SSID as the legitimate network.
■ Devices connecting to unauthorized APs.
■ Example: If an attacker sets up a rogue AP to capture sensitive data (e.g., a man-in-the-middle
attack), identifying this rogue AP is critical.
Evidence Collection and Acquisition in Wireless
Networks
● Rogue AP Detection: A rogue access point is an unauthorized device pretending to be a legitimate access point.
Tools like Kismet and Wireshark can detect rogue APs by identifying anomalies such as:
■ A sudden appearance of an AP with the same SSID as the legitimate network.
■ Devices connecting to unauthorized APs.
■ Example: If an attacker sets up a rogue AP to capture sensitive data (e.g., a man-in-the-middle
attack), identifying this rogue AP is critical.
Intrusion Detection Systems
The network intruder or attacker has traditionally been able to boast of
a certain amount of skill, unlike the cyber scam artist who needs to
know only enough about computers to send mass e-mail or the an
attacker whose technical knowhow is limited to uploading and
downloading files.
Intrusion detection systems (IDSs) help information systems prepare
for and deal with attacks. They accomplish this by collecting
information from a variety of systems and network sources, and then
analyzing the information for possible security problems.
Intrusion Detection Systems
Offerings of Intrusion Detection System
2. Passive IDS: The system that is configured only to observe and analyze network traffic
activity and alert an operator to potential vulnerabilities and attacks is called passive IDS. It
cannot perform any protective or corrective functions on its own. It only detects and alerts
the user about it.
2. Recognizing Direct versus Distributed Attacks: A direct attack is launched from a computer used
by the attacker (often after pre-intrusion/attack tools, such as port scanners, are used to find potential
victims). As compared to direct attack, the distributed attack is more complex. This type of attack
includes multiple victims, which include not only the target of the attack, but also intermediary remote
systems from which the attack is launched that are controlled by the attacker.
3. Automated Attacks: Attacks implemented by a computer program rather than the attacker physically
carrying out the phases in the attack sequence are called automated attack.
4. Accidental Attacks: Sometimes, intrusions and attacks may really be unintentional.The user who
appears to have sent the virus via e-mail is frequently a victim of the attack himself/herself.
In numerous cases, huge quantities of virus attacks are introduced accidentally or unknowingly. When a
lower state of obligation is present, some acts are still considered criminal.
Understanding Network Intrusions and Attacks
5. Preventing Intentional Internal Security Breaches Attack
Security breaches is an event that affects authorized access of data, applications, services,
networks, and/or devices by avoiding their core security mechanisms. It happens when an
individual or an application illegally move in a private, confidential, or unauthorized logical
IT perimeter.
Internal attackers are more hazardous for several reasons:
a. People inside the network generally know more about the company, the network, and the
layout of the buildings, normal working process, and other information that makes it easier
for them to gain access without recognition.
b. Internal attackers generally have at least some degree of legal access and could find it
easy to determine passwords and fleapits in the current security system.
c. Internal hackers know what activities will incur the most damage, what information is on
the network.
● Packet Captures (PCAPs): Full packet data provides insight into communication patterns
and payload details.
● Log Files: Firewall, proxy, and system logs offer context on network interactions.
● Deep Packet Inspection (DPI): Examines payloads for malicious signatures and
anomalies.
● Host-Based Data: IDSs like HIDS analyze system logs, file integrity, and running
processes for suspicious activity.
Analysis of Network Evidences for IDS
IDS relies on different types of network evidence to detect anomalies and threats:
● Packet Captures (PCAPs): Full packet data provides insight into communication patterns and
payload details.
● Flow Data (NetFlow, IPFIX): Summarized metadata of network traffic, including
source/destination IPs, ports, protocols, and byte counts.
● Log Files: Firewall, proxy, and system logs offer context on network interactions.
● Deep Packet Inspection (DPI): Examines payloads for malicious signatures and anomalies.
● Host-Based Data: IDSs like HIDS analyze system logs, file integrity, and running processes for
suspicious activity.
● Unusual Traffic Spikes: Large data transfers may indicate data exfiltration.
● Port Scanning Activity: Multiple connection attempts to various ports can signal reconnaissance.
● Spoofed or Anomalous IP Addresses: Traffic from unexpected geolocations.
● Malformed Packets: Packets that deviate from protocol standards.
● Repeated Failed Login Attempts: Brute-force attack indicators.
● Command & Control (C2) Traffic: Encrypted or obfuscated connections to external servers.
Analysis of Network Evidences for IDS
Techniques for Analyzing Network Evidence
IDS uses various methodologies to analyze network evidence and detect intrusions:
A. Signature-Based Detection
● Compares network traffic against known attack signatures (e.g., Snort, Suricata).
● Strength: Effective for identifying known threats.
● Weakness: Cannot detect novel attacks.
B. Anomaly-Based Detection
● Uses machine learning and statistical models to identify deviations from normal network behavior.
● Strength: Detects zero-day attacks.
● Weakness: Prone to false positives.
C. Behavioral Analysis
D. Heuristic Detection
🔹 Methods of Attack:
● DDoS (Distributed Denial of Service): Flooding the router with massive traffic
● TCP SYN Floods: Overloading connection requests
● Exploiting Firmware Bugs: Triggering crashes through malformed packets
🔹 Impact:
🔹 Examples:
🔹 Possible Solutions:
● Log aggregation tools (Splunk, ELK Stack).
● Standardized log formats (Common Event Format - CEF).
● Automated log parsing & normalization.
Challenges in Network forensics
5. Real-Time Analysis & Response Constraints
🔹 Challenge: Detecting and stopping cyberattacks in real-time is difficult due
to processing delays.
🔹 Examples:
● Zero-day attacks require instant detection & mitigation.
● Advanced Persistent Threats (APTs) operate stealthily over long
periods.
🔹 Possible Solutions:
● Intrusion Detection & Prevention Systems (IDS/IPS).
● Automated response mechanisms (e.g., blocking malicious IPs
dynamically).
● Threat hunting to proactively identify hidden threats.
Tools used in network forensics.
1. Packet Sniffers & Traffic Analyzers: Packet sniffers capture and analyze network traffic to
help identify security threats, anomalies, and malicious activities.
Wireshark
Description:
● A powerful open-source packet analyzer used for deep network inspection.
● Captures real-time traffic and allows forensic investigators to analyze packets at a granular
level.
Key Features:
✔ Live packet capture and offline analysis.
✔ Supports various network protocols (TCP, UDP, HTTP, etc.).
✔ Offers filtering, coloring, and statistical analysis.
✔ Available on Windows, macOS, and Linux.
Use Case: Detecting suspicious network activity (e.g., malware communication).
● Investigating unauthorized data exfiltration.
Tools used in network forensics.
Tcpdump
📌 Description:
📌 Key Features:
✔ Captures packets in real time.
✔ Uses BPF (Berkeley Packet Filter) for efficient filtering.
✔ Saves packet logs in pcap format for later analysis.
📌 Use Case:
🔹 Snort
📌 Description:
● An open-source intrusion detection and prevention system (IDS/IPS)
developed by Cisco.
● Uses signature-based and anomaly-based detection techniques.
📌 Key Features:
✔ Detects malware, port scans, and DoS attacks.
✔ Uses custom rule sets to detect suspicious traffic.
✔ Can be integrated with SIEM (Security Information and Event Management) tools.
📌 Use Case:
● Detecting intrusion attempts on enterprise networks.
Preventing exploits from known vulnerabilities.
Tools used in network forensics.
Log Analysis Tools: Log analysis tools help collect, analyze, and visualize network logs for
forensic investigations.
🔹 Autopsy
📌 Description:
● A free and open-source digital forensic platform.
● Used by law enforcement and cybersecurity professionals.
📌 Key Features:
✔ Recovers deleted files and emails.
✔ Analyzes disk images and network logs.
✔ Identifies malicious artifacts in compromised systems.
📌 Use Case:
● Investigating cybercrime incidents.
● Extracting evidence from digital devices.