Chapter 36 of 41

Network Attacks

Computer networks allow devices to communicate and share information, but they can also be targeted by attackers.

An attacker may try to steal information, gain unauthorized access, disrupt services, or manipulate network communication.

These malicious activities are known as network attacks.

A network attack is an attempt to compromise the confidentiality, integrity, or availability of a network, its systems, or the data traveling through it.

In simple words:

Network attack = An attempt to misuse, disrupt, or gain unauthorized access to a network or its resources.

Let's look at some common types.


Why Do Attackers Target Networks?

Attackers may target networks for different reasons, such as:

  • Stealing sensitive information

  • Taking control of systems

  • Disrupting services

  • Spying on communication

  • Stealing user credentials

  • Installing malware

  • Financial gain

For example, an attacker might compromise an exposed server and use it as a starting point to access other systems.


Common Types of Network Attacks

Some important network attacks include:

  1. DoS and DDoS

  2. Man-in-the-Middle

  3. Packet Sniffing

  4. IP Spoofing

  5. ARP Spoofing

  6. DNS Attacks

  7. Session Hijacking

  8. Port Scanning

  9. Password Attacks

  10. Ransomware and Malware

Let's understand them one by one.


1. DoS and DDoS Attacks

DoS

DoS (Denial-of-Service) attacks attempt to make a service unavailable by overwhelming or disrupting the target.

Attacker
   ↓
Target Server
   ↓
Service becomes unavailable

DDoS

DDoS (Distributed Denial-of-Service) attacks use multiple systems to generate attack traffic.

Device ──┐
Device ──┤
Device ──┼──→ Target
Device ──┤
Device ──┘

Because traffic comes from many sources, DDoS attacks can be difficult to mitigate.

Goal

Make a service unavailable or severely degrade its performance.


2. Man-in-the-Middle Attack

In a Man-in-the-Middle (MITM) attack, an attacker attempts to position themselves between two communicating parties.

User ───→ Attacker ───→ Server
          ↑
       Intercepts

Depending on the attack, the attacker may try to observe or modify communication.

Strong authentication and properly configured encryption, such as TLS, can help defend against many MITM scenarios.


3. Packet Sniffing

Packet sniffing involves capturing network traffic for analysis.

Network administrators legitimately use packet-capture tools for troubleshooting and monitoring. However, attackers can also capture traffic to obtain information if the traffic is not adequately protected.

For example:

User ───────── Network ───────── Server
                ↑
             Attacker
             captures traffic

Using encryption such as HTTPS/TLS helps prevent an attacker who merely captures the traffic from reading its protected contents.


4. IP Spoofing

IP spoofing occurs when an attacker sends packets with a forged source IP address.

For example:

Actual Attacker IP
       ↓
Fake Source IP
       ↓
Target

The packet appears to originate from a different address.

IP spoofing can be used in various attacks, including certain reflection/amplification attacks.

However, simply spoofing an IP address does not automatically allow an attacker to receive replies sent to that address.


5. ARP Spoofing

ARP spoofing is an attack against IPv4 local networks that abuses the trust model of ARP.

An attacker may send forged ARP messages so that devices associate the attacker's MAC address with another device's IP address.

For example:

Normal:

PC ─────→ Router

Attack:

PC ─────→ Attacker ─────→ Router

This can allow the attacker to intercept or manipulate local traffic.

Using encrypted protocols such as HTTPS can reduce the impact of traffic interception, although ARP spoofing can still cause other problems.


6. DNS Attacks

Because DNS helps translate domain names into network addresses, attackers may try to manipulate DNS communication or infrastructure.

One example is DNS cache poisoning, where false DNS information is inserted into a cache.

User
 ↓
DNS Resolver
 ↓
Wrong DNS Information
 ↓
Wrong Destination

Attackers may attempt to redirect users to malicious destinations.

Security technologies such as DNSSEC can help authenticate DNS data, while encrypted DNS protocols such as DoH and DoT can protect the communication channel to a resolver.


7. Session Hijacking

A session hijacking attack attempts to take over an authenticated user's session.

Many web applications use a session identifier, often stored in a cookie, to remember that a user has already authenticated.

If an attacker obtains a valid session credential, they may be able to impersonate the user.

User → Login → Server
          ↓
     Session Created
          ↓
Attacker obtains session credential
          ↓
     Attempts access

Using HTTPS, secure cookie settings, short session lifetimes, and proper session management can reduce the risk.


8. Port Scanning

Port scanning is the process of checking a system to determine which network ports are reachable or have services listening.

Security professionals use port scanning for legitimate network assessment.

Attackers may also use it during reconnaissance to identify potentially exposed services.

For example:

Server
├── Port 22 → Open
├── Port 80 → Open
├── Port 443 → Open
└── Other Ports → Closed/Filtered

Port scanning itself is not necessarily an attack. It is often a reconnaissance technique that can be used before other attacks.


9. Password Attacks

Attackers may attempt to gain access to accounts by targeting passwords.

Common techniques include:

  • Brute force → Trying many possible passwords

  • Password spraying → Trying a small number of common passwords against many accounts

  • Credential stuffing → Using stolen username/password combinations from other breaches

  • Phishing → Tricking users into revealing credentials

Strong, unique passwords and multi-factor authentication (MFA) provide important protection.


10. Malware and Ransomware

Malware is malicious software designed to perform unauthorized or harmful actions.

Examples include:

  • Viruses

  • Worms

  • Trojans

  • Spyware

  • Ransomware

A worm, for example, can automatically spread across vulnerable networked systems.

Ransomware can encrypt or otherwise make data unavailable and then demand payment from victims.

Network segmentation, software updates, endpoint protection, access control, and reliable backups are important defenses.


Active vs Passive Attacks

Network attacks can also be broadly described as active or passive.

Passive Attack

The attacker primarily attempts to observe information without directly changing it.

Example:

Network Traffic
      ↓
   Attacker
    observes

Packet interception can be an example when the attacker only captures traffic.

Active Attack

The attacker attempts to modify, disrupt, inject, or otherwise interfere with communication or systems.

Examples include:

  • DoS/DDoS

  • Traffic manipulation

  • Certain spoofing attacks

Passive

Active

Mainly observes

Interferes or modifies

Harder to notice

May be easier to detect

Example: Traffic capture

Example: DoS


How Can We Protect Against Network Attacks?

There is no single tool that protects against every attack. Network security normally uses multiple layers.

Use Encryption

Protocols such as TLS protect data while it travels across networks.

Use Firewalls

Firewalls can restrict unauthorized network traffic.

Keep Systems Updated

Security vulnerabilities should be patched regularly.

Use Strong Authentication

Use strong passwords and enable MFA where available.

Segment Networks

Separating systems into different network segments can limit the spread of an attack.

Monitor Network Activity

Monitoring can help detect unusual traffic and suspicious behavior.

Use Secure Protocols

Prefer secure alternatives such as:

HTTPS → Instead of plain HTTP
SSH   → Instead of Telnet

Maintain Backups

Reliable, tested backups can help recover from incidents such as ransomware.


Network Attacks and the CIA Triad

Remember the CIA Triad from network security:

  • Confidentiality

  • Integrity

  • Availability

Different attacks can target different security goals.

Attack

Main Security Goal Targeted

Packet Sniffing

Confidentiality

MITM

Confidentiality + Integrity

DNS Manipulation

Integrity

DoS/DDoS

Availability

Ransomware

Availability + Integrity

Some attacks can affect multiple properties at the same time.

Conclusion

Network attacks are attempts to compromise network systems, communication, or data.

Some common attacks include:

  • DoS/DDoS → Disrupt services

  • MITM → Intercept or manipulate communication

  • Packet Sniffing → Capture network traffic

  • IP Spoofing → Forge source IP information

  • ARP Spoofing → Manipulate local IPv4 address-to-MAC mappings

  • DNS Attacks → Manipulate or abuse domain resolution

  • Session Hijacking → Take over authenticated sessions

  • Port Scanning → Discover exposed services

  • Password Attacks → Attempt to compromise accounts

  • Malware/Ransomware → Damage, steal, or deny access to data

The easiest way to remember the goal of network security is:

Protect Confidentiality, Integrity, and Availability.

And remember that good security is layered—encryption, firewalls, authentication, updates, segmentation, monitoring, and backups all work together to reduce risk.