Lecture-7 Investigating Network Traffic
Lecture-7 Investigating Network Traffic
2-Evidence Collection:
• Captured packets can serve as digital
evidence in investigations.
• They may reveal an attacker's IP
address, the tools they used, or the
payload of malicious communications.
Why Packet Analysis
Matters in Digital Forensics:
3- Incident Response:
• Packet analysis plays a crucial role during incident
response. Analysts can pinpoint the source of an
attack, understand its nature, and develop
immediate countermeasures.
4- Reconstruction of Events:
• By analyzing packets, forensic experts can
reconstruct an attack timeline, including when and
how a system was breached.
Scenarios Where Packet
Analysis is Essential
1. Intrusion Detection:
1. Identifying unauthorized access attempts or
network scans.
2. Malware Detection:
1. Analyzing communication between infected
devices and Command-and-Control (C2) servers.
3. Data Exfiltration Monitoring:
1. Detecting unauthorized transfers of sensitive data.
Packet Analysis: A Key Tool
• 1. Intrusion Detection
Packet analysis plays a vital role in intrusion detection systems (IDS) by
identifying unusual or unauthorized network activities. Here’s how:
• Detecting Unauthorized Access Attempts:
• Suspicious login attempts, such as brute force attacks or repeated
failed login attempts, often leave telltale signs in packet data. By
analyzing these packets, investigators can identify potential
unauthorized access to sensitive systems.
• Identifying Network Scans:
• Attackers often perform reconnaissance to find vulnerabilities by
scanning ports or probing specific IP addresses. Packet analysis can
reveal this activity by identifying a high number of connection
attempts to multiple ports or a rapid sequence of connection
requests, which are hallmarks of port scanning.
• Example:
• A series of SYN packets to various ports without completing the
handshake process may indicate a SYN scan, a common
reconnaissance technique used by attackers.
Packet Analysis: A Key Tool
7. Payload Inspection:
I. Unexpected Content: Unusual or sensitive
data in the payload, such as passwords, binary
files, or encoded data.
II. Obfuscation: Encoded or encrypted payloads
in plain-text protocols (e.g., HTTP) may signal
an attempt to conceal malicious activity.
8.Latency and Timing Issues:
Unusually high latency or jitter in packet delivery
might indicate congestion or an attack like a man-
in-the-middle (MITM) or packet injection.
Packet Analysis: A Key Tool
9-TLS/SSL Anomalies:
Use of self-signed or invalid certificates might
indicate a fake website or MITM attack.
Suspicious TLS versions or cipher suites not
aligned with best practices.
10-Command and Control Indicators:
Persistent connections to specific external IPs
or domains associated with known threat
actors.
Tools for Detecting Telltale
Signs
• 2. Malware Detection
Analyzing packets can help detect malicious software (malware)
communication and block its activity before it causes significant
harm.
• Command-and-Control (C2) Communication:
• Many malware types establish communication with C2 servers
for instructions, updates, or data exfiltration. Packet analysis
can uncover these hidden communications by detecting:
• Outbound connections to suspicious IP addresses or
domains.
• Irregular traffic patterns, such as small, frequent packets
often used for heartbeat signals.
Packet Analysis: A Key Tool
2. Malware Detection
Payload Analysis: Inspecting the contents of
packets (when unencrypted) can reveal malicious
payloads, such as encoded commands or embedded
malware.
Example: A spike in DNS requests to random
subdomains of a domain may indicate a Domain
Generation Algorithm (DGA), commonly used by
malware to avoid detection.
Components of Packet
Analysis
• Header:
• The header contains metadata about the packet, essential
for routing and processing. Key elements include:
• Source and Destination Addresses: Indicates the
sender and recipient of the packet (e.g., IP addresses).
• Protocol Information: Specifies the protocol used
(e.g., TCP, UDP, ICMP).
• Sequence Numbers: Used to reassemble packets in
the correct order.
• Flags: Indicate the status of the connection (e.g., SYN,
ACK in TCP).
Components of Packet Analysis
1. Dissecting a Packet: Header,
Payload, and Protocols
Payload:
• The payload contains the actual data being
transmitted. It may include:
• Application-specific data (e.g., HTTP requests,
email content).
• Encoded commands or messages in malware
communications.
• Binary data or files.
Components of Packet Analysis
1. Dissecting a Packet: Header,
Payload, and Protocols
• Protocols:
• Protocols define the rules for packet communication and
ensure interoperability. Common protocols analyzed include:
• TCP (Transmission Control Protocol): Reliable,
connection-oriented protocol used in web traffic.
• UDP (User Datagram Protocol): Lightweight,
connectionless protocol used in video streaming and
VoIP.
• ICMP (Internet Control Message Protocol): Used for
diagnostic tools like ping.
• HTTP/HTTPS: Protocols for web communications.
Components of Packet Analysis
2. Understanding the Flow of
Data in Networks
Wiresh Speedt
Feature Iperf Ping ark est-cli
Bandwidth
✅ ❌ ❌ ✅
Testing
Packet Loss ✅ (UDP) ❌ ✅ ❌
Protocol ✅
❌ ✅ ❌
Flexibility (TCP/UDP)
Comple
Ease of Use Moderate Easy Easy
x
Packet Capturing
Techniques
Active Passive
Feature Inline Tools
Capture Capture
Minimal if
Network Potential No
configured
Impact interference interference
well
Use in
Productio Rare Common Common
n
Setup
Medium to
Complexit Medium Low
High
y
Wireshark is a powerful,
open-source network
protocol analyzer widely
used by cybersecurity
professionals, network
administrators, and forensic
investigators. It captures
and visualizes network
traffic in real-time, allowing
for detailed packet
inspection.
Introduction to Wireshark
• When you launch Wireshark, the interface is divided into several sections to
facilitate easy navigation and analysis:
• Menu Bar:
• Provides access to file operations, configuration settings, and analysis
tools.
• Includes options for saving captures, applying filters, and exporting
data.
• Toolbar:
• Quick access to common functions like starting/stopping captures,
opening files, and managing filters.
• Capture Interface List:
• Displays available network interfaces for capturing traffic (e.g., Ethernet,
Wi-Fi).
• Users select the interface they want to monitor.
2. Overview of
Wireshark's Interface