Skip to content
Visual explainer 2h 30m to learn 4 steps

Common network attacks & defences

Explain spoofing, man-in-the-middle and DoS attacks and the controls that stop them.

By Invicly Tech, , in Cyber Security Fundamentals. About 9 minutes to read.

Topic 10 of 49

In short

Classic network attacks target the gaps between trusting hosts: spoofing forges identity, man-in-the-middle sits between two parties, and denial of service exhausts resources. Each has a known defence, from encryption to rate limiting and monitoring.

Explained simply

Many network protocols were designed when everyone on a network was trusted. They believe what they are told. Network attacks abuse that trust by lying about who someone is, sitting secretly in the middle of a conversation, or overwhelming a service until it stops working.

Spoofing means faking an identity: a fake IP address, a fake MAC address, or a fake DNS answer. It is like someone answering the door wearing a delivery uniform they do not own.

A man-in-the-middle (MITM) attacker places themselves between two parties so traffic flows through them. They can read or change it. Denial of service (DoS) floods a target so real users cannot get through. When the flood comes from thousands of machines at once, it is called DDoS (distributed denial of service).

The good news is that each attack has well-known defences. Encryption with TLS makes intercepted data useless. Switch features stop spoofing on local networks. DDoS protection services absorb floods. Monitoring spots the warning signs early.

Press Play on a diagram to walk through it one step at a time.

SequenceMan-in-the-middle
Victim
Attacker
Gateway
  1. 1I am the gateway (spoof)
    Attacker to Victim: I am the gateway (spoof)
  2. 2Traffic sent to attacker
    Victim to Attacker: Traffic sent to attacker
  3. 3Relayed on
    Attacker to Gateway: Relayed on
  4. 4Reply
    Gateway to Attacker: Reply
  5. 5Relayed back, now readable
    Attacker to Victim: Relayed back, now readable
CompareThree attack families and how they show up
Spoofing
  • Fake IP, MAC or DNS answer
  • Sign: one MAC claims many IPs
  • Sign: DNS answers that differ from public ones
  • Fix: DAI, DHCP snooping, DNSSEC
Man-in-the-middle
  • Attacker relays traffic
  • Sign: certificate warnings
  • Sign: gateway MAC suddenly changes
  • Fix: TLS everywhere, HSTS, 802.1X
Denial of service
  • Floods links, tables or apps
  • Sign: traffic spike, many half-open connections
  • Sign: one URL hit thousands of times
  • Fix: DDoS service, SYN cookies, rate limits

In depth

Why ARP spoofing works

On a local network, devices use ARP (address resolution protocol) to find which MAC address owns an IP. A laptop broadcasts "who has 192.168.1.1?" and the router replies with its MAC. The laptop stores the answer in its ARP cache.

ARP has no authentication. Any device can send a reply saying "I am 192.168.1.1", and many systems simply accept it. The attacker then receives traffic meant for the router. Defences include dynamic ARP inspection on managed switches, which checks ARP replies against known DHCP leases, and alerts when one MAC claims several IPs.

  • ARP trusts any reply
  • Spoofing redirects local traffic
  • Fix: dynamic ARP inspection, DHCP snooping
  • Detect: one MAC claiming many IPs

DNS spoofing and DNS tunnelling

DNS spoofing gives a victim a false answer, so a real name points to an attacker's server. It can happen through a poisoned resolver cache, a rogue DHCP server handing out a bad DNS server, or malware changing a host's settings. DNSSEC (signed DNS records) and locked-down resolver settings help.

DNS tunnelling is different: malware hides data inside DNS queries, like long random subdomains, because DNS is rarely blocked. Signs include very long query names, high volumes of TXT queries, and many unique subdomains under one domain.

SequenceData hidden in DNS (tunnelling)
Malware
Company resolver
Attacker's DNS server
  1. 1Query: long random label under attacker's domain
    Malware to Company resolver: Query: long random label under attacker's domain
  2. 2Forwarded, since DNS is rarely blocked
    Company resolver to Attacker's DNS server: Forwarded, since DNS is rarely blocked
  3. 3TXT answer carrying data
    Attacker's DNS server to Company resolver: TXT answer carrying data
  4. 4Answer passed back
    Company resolver to Malware: Answer passed back

Types of denial of service

Volumetric attacks fill the network pipe with traffic, often using amplification: small spoofed requests to open DNS, NTP or memcached servers trigger huge replies to the victim. Protocol attacks, like SYN floods, exhaust connection tables in servers and firewalls. Application attacks send many expensive but legitimate-looking requests, such as repeated searches, to wear out the app.

Defences differ by type. Volumetric floods need upstream help from an ISP or a DDoS protection service, because your own link is already full. SYN cookies handle SYN floods. Rate limiting, caching and a CDN help with application floods.

CompareThree kinds of denial of service
Volumetric
  • Fills the network link
  • Amplified via DNS, NTP, memcached
  • Needs ISP or DDoS service help
Protocol
  • Exhausts connection tables
  • Example: SYN flood
  • SYN cookies
Application
  • Costly, legit-looking requests
  • Example: repeated searches
  • Rate limiting, caching, CDN

Rogue devices and Wi-Fi attacks

An attacker with physical access can plug a small device into a spare network port, or set up an evil twin Wi-Fi access point with the same name as the real one. Users who connect to the fake network send their traffic through the attacker.

Defences include 802.1X network access control (devices must authenticate before a port works), WPA3-Enterprise Wi-Fi with certificate checks, wireless intrusion detection that spots unknown access points broadcasting your network name, and disabling unused wall ports.

Learn it in 4 short steps

About 40m each. Track them with a timer in your plan.

  1. 1
    Explain ARP spoofing and MITM~40m
  2. 2
    Explain DoS and DDoS~40m
  3. 3
    Explain DNS spoofing and tunnelling~40m
  4. 4
    Match each attack to a defence~40m

Key points

  • ARP spoofing lets an attacker intercept local traffic.
  • Encryption like TLS defeats passive man-in-the-middle reading.
  • DoS and DDoS exhaust bandwidth or resources.
  • Rate limiting and filtering blunt denial of service.

Key terms

Tap a card to flip it. 0/4 known

Examples

Spotting ARP spoofing in your lab

In your own isolated lab, compare ARP tables before and after suspicious activity. Step 1: On a lab client, note the gateway's MAC with "ip neigh". Step 2: Later, check again. Step 3: If the gateway IP now shows a different MAC, and that MAC also belongs to another lab host, something is claiming to be the gateway. Step 4: In Wireshark, the filter arp.duplicate-address-detected or Expert Info warnings highlight the conflict. Step 5: Response: find the switch port for that MAC and disconnect it.

bash
# Before
ip neigh show 192.168.56.1
# 192.168.56.1 dev eth0 lladdr 52:54:00:aa:bb:01 REACHABLE
# After
ip neigh show 192.168.56.1
# 192.168.56.1 dev eth0 lladdr 08:00:27:3c:4d:5e REACHABLE   <- changed
ip neigh | grep 08:00:27:3c:4d:5e
# 192.168.56.30 ... lladdr 08:00:27:3c:4d:5e   <- same MAC as another host

Recognising DNS tunnelling in logs

Step 1: Pull DNS query logs from your resolver for one host over an hour. Step 2: Group by parent domain and count unique subdomains. Step 3: Normal domains show a handful of names like www and api. One domain shows 4,000 unique, long, random-looking subdomains. Step 4: Check the domain's age and reputation: registered last week. Step 5: Conclusion: likely data being sent out through DNS. Block the domain at the resolver and investigate the host.

text
Query name                                                   Type
aGVsbG8gd29ybGQgdGhpcyBpcyBkYXRh.x7q.badcdn.example          TXT
c2VjcmV0IGZpbGUgY29udGVudHMgaGVyZQ.x7q.badcdn.example        TXT
bW9yZSBkYXRhIGluIGNodW5rcyBvZiAzMg.x7q.badcdn.example        TXT
# 4,012 unique subdomains in 60 minutes, all under badcdn.example

Quick reference

  • ARP has no authentication; dynamic ARP inspection fixes that on managed switches
  • Certificate warnings on many machines at once can mean a MITM
  • Amplification DDoS abuses open DNS, NTP or memcached servers with spoofed requests
  • SYN cookies defend against SYN floods
  • DNS tunnelling signs: long random subdomains, many TXT queries, one new domain
  • 802.1X stops rogue devices getting network access from wall ports

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1Why can't you stop a large volumetric DDoS with your own firewall alone?

Question 2

2Which sign most strongly suggests DNS tunnelling?

Question 3

3An evil twin attack targets which kind of network?

Question 4

4What does HSTS help prevent?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    Look at the ARP table on your own computer and identify your gateway's MAC address. Explain what would change if someone spoofed it.

  2. Exercise 2medium

    Generate one hour of DNS logs in your lab (for example with Pi-hole or systemd-resolved logging). Write a short script or query that lists the parent domains with the most unique subdomains.

  3. Exercise 3hard

    Write a one-page defence plan for a small company against these four attacks: ARP spoofing, evil twin Wi-Fi, SYN flood on the website, DNS tunnelling. Include one prevention and one detection for each.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

Is public Wi-Fi dangerous?
Less than it used to be, because most sites use HTTPS. The main risks are fake hotspots and devices with old apps. Use HTTPS sites, keep devices updated and consider a VPN on untrusted networks.
Can a small business afford DDoS protection?
Often yes. Many CDNs and hosting providers include basic DDoS protection on free or low-cost plans, which is enough for most small sites.
Does a VPN stop all man-in-the-middle attacks?
It protects traffic between you and the VPN server from local attackers. It does not protect against a compromised VPN provider or attacks after traffic leaves the VPN.

Go deeper

ShareXLinkedInWhatsApp