Lecture-8 Network Protocols Overview
Lecture-8 Network Protocols Overview
Overview
Prof. Osama Abdel Raof
Lecture-8
1. What Are Network
Protocols?
Network protocols are standardized rules that
dictate how data is transmitted, formatted, and
processed over a network. They enable
communication between devices, ensuring that
data is sent and received correctly.
Why Are Protocols Important?
o Ensure seamless communication between
diverse systems and applications.
o Provide a common language for devices
across the internet and private networks.
o Define error handling, connection setup, and
termination procedures.
2. Key Protocols in Packet
Analysis
o Vulnerabilities:
1. SYN (Synchronize):
• The client sends a SYN packet to the server, indicating it wants to start a
connection.
• This packet contains an initial sequence number for tracking communication.
2. SYN-ACK (Synchronize-Acknowledge):
• The server responds with a SYN-ACK packet, acknowledging the client’s SYN and
providing its own sequence number.
3. ACK (Acknowledge):
• The client replies with an ACK packet, confirming the server's SYN-ACK.
• The connection is now established, and data transmission can begin.
Synchronizes sequence
numbers to track packets.
Provides a reliable
foundation for data
exchange.
The handshake plays a critical role
in maintaining a reliable and secure
network:
• Connection Reliability:
Connectio
without follow-up ACKs.
attempting to hijack a session.
Unexpected Resets (RST):
• Symptoms: Sudden RST packets
n Setups
during or after the handshake.
• Possible Cause: Scanning tools,
firewalls blocking connections, or
malicious attempts to disrupt
communication.
Wireshark:
4. Tools • Filter to analyze handshakes:
for tcp.flags.syn == 1 && tcp.flags.ack ==
0
Analyzing • Detect SYN floods: Monitor high
volumes of SYN packets with no
TCP corresponding
Intrusion ACKs.
Detection
Systems (IDS):
Handshak • IDS like Snort can alert on anomalies
during handshake processes.
es • Custom rules can identify irregular
handshake patterns indicative of
attacks.
For SYN Floods:
Details in
• Destination IP: Indicates the intended
recipient of the packet. Helps verify whether
traffic is directed to legitimate or suspicious
Packet targets.
• Port Numbers:
Headers • Source and destination ports define the
applications or services involved in the
communication (e.g., HTTP uses port 80,
HTTPS uses port 443).
• Anomalous or uncommon ports may
indicate malicious activity.
Protocol Information:
o Specifies the protocol used (e.g., TCP, UDP, ICMP).
o Knowing the protocol helps interpret the data structure
and identify potential exploits.
2. Key
Flags and Control Bits:
o TCP flags (SYN, ACK, RST, FIN, etc.) indicate the state of
Details in
the connection and any special actions required.
o Example: Repeated SYN packets without ACKs may
signify a SYN flood attack.
Time-to-Live (TTL):
o Indicates how many hops a packet can take before being
discarded.
o Abnormal TTL values can signal spoofed packets.
Tracing Source IPs:
o The source IP in the packet header helps identify the
origin of traffic. Analysts use it to:
Headers
Correlate with logs from firewalls and intrusion
detection systems (IDS).
to Track
o Challenges:
Attackers often use spoofed IPs or proxy services to
hide their true location.
Intrusion Detection
Wireshark: tcpdump:
Systems (IDS):
• Use filters to isolate • Command-line tool to • Tools like Snort or
traffic by capture and analyze Suricata flag
source/destination IP packet headers. suspicious header
or port. • Example: tcpdump -n patterns (e.g.,
• Inspect header fields src 192.168.1.1 malformed packets,
in detail for anomalies (captures traffic unusual ports).
or key indicators. originating from a
• Example filter: ip.addr specific source IP)
== 192.168.1.1
(analyzes all traffic
involving a specific IP).
6. Challenges in Using Headers to
Track Attackers
Spoofed IPs:
• Attackers often use proxies, VPNs, or The Onion Router (TOR) to anonymize
their traffic.
Encrypted Traffic:
to 4. Entropy Analysis:
Data: 5.
Traffic:
Inspecting HTTP/HTTPS
• 1. Understanding Anomalies in
Traffic Flow
Anomalies in traffic flow refer to
patterns or behaviors that deviate
from the expected network
activity. These irregularities are
often indicators of malicious
activity or underlying network
issues. Detecting and analyzing
these anomalies is critical for
identifying security threats, such
as attacks, data breaches, or
malware infections.
2. Indicators of Malicious Traffic
Sudden Spikes in Traffic:
o Description:
A significant and unexplained increase in traffic volume over a short period.
May occur on specific ports, IP addresses, or entire subnets.
o Potential Causes:
Distributed Denial of Service (DDoS) attacks overwhelming a server.
Malware spreading across the network, generating excessive outbound traffic.
Data exfiltration attempts involving large file transfers to an external server.
o Detection:
Use network monitoring tools to identify sudden changes in traffic volume.
Analyze flow data to isolate the source and destination of the spikes.
Repeated Connection Attempts:
o Description:
Multiple attempts to establish connections to the same or different destinations,
often without completing them.
o Potential Causes:
Port scanning by attackers searching for open or vulnerable services.
Brute force login attempts targeting authentication systems.
Malware beaconing to Command-and-Control (C2) servers.
o Detection:
Monitor failed connection attempts using Intrusion Detection Systems (IDS) or
network logs.
Look for patterns, such as SYN packets without corresponding ACKs.
3. Tools
Wireshark:
o Apply filters to focus on specific traffic types (e.g., TCP SYN
packets).
for
o Example filters:
tcp.flags.syn == 1 && tcp.flags.ack == 0: Detects SYN
packets without ACKs (potential port scan).
Anomali
o Look for sudden spikes in traffic graphs or alerts for abnormal
behavior.
Flow-Based Tools:
IDS/IPS Systems:
o Systems like Snort or Suricata can flag suspicious behaviors
such as repeated connection attempts or high volumes of traffic
on uncommon ports.
4. Case Studies of Anomalies in Traffic Flow