OSI Layer Attacks · Topic 3 of 5
ICMP Smurf Attacks and Prevention
Learn how an ICMP smurf attack uses broadcast addresses and a spoofed source to flood a victim, and how to block it on MikroTik with simple firewall rules.
- 5 min
- A smurf attack sends ICMP echo requests to a broadcast address.
- The source address is forged and is set to the victim.
- Every host replies, and all replies hit the victim.
What it is
A smurf attack is a denial of service attack that uses ICMP echo requests, a broadcast address and a forged source address.
The attacker never sends traffic straight at the victim. Instead, many innocent hosts send the replies, so the victim receives a flood from many places at once.
The attack depends on two weaknesses. Networks may answer pings sent to a broadcast address, and the source address of a packet can be faked.
How it works
A smurf attack turns one small request into many large replies, so the attacker multiplies the attacker's bandwidth.
The steps
- The attacker picks a network that accepts traffic sent to its broadcast address.
- The attacker sends an ICMP echo request to that broadcast address. The source address is forged and is set to the victim's address.
- Every host on the network sees the broadcast and sends an echo reply.
- All the replies go to the victim, not to the attacker.
For example, a network with 200 active hosts turns one request into about 200 replies. This is the amplification effect, and it grows with the size of the network.
Two roles
Your network can play two roles in a smurf attack. It can be the amplifier, when your hosts answer a broadcast ping. It can be the victim, when replies arrive from someone else's network.
| Role | What you control | Defence |
|---|---|---|
| Amplifier | Whether broadcast pings enter and are answered | Drop ICMP sent to broadcast addresses |
| Victim | Only what reaches your router | Rate limit ICMP, filter at the edge, ask the upstream provider |
Preventing the amplifier role
The main defence is to refuse ICMP that is addressed to a broadcast address. RouterOS can match the destination address type.
/ip firewall raw add chain=prerouting protocol=icmp dst-address-type=broadcast action=drop
This single raw rule drops any ICMP packet sent to a broadcast address, before tracking. It protects the router and the hosts behind it.
If you prefer filter rules, place them on the input and forward chains.
/ip firewall filter add chain=input protocol=icmp dst-address-type=broadcast action=drop
/ip firewall filter add chain=forward protocol=icmp dst-address-type=broadcast action=drop
The input rule protects the router itself. The forward rule stops a packet from reaching hosts on other networks behind the router.
Preventing forged sources
A smurf attack needs a forged source. Stop forged addresses at the edge of your network by dropping packets whose source cannot be valid.
/ip firewall address-list add list=bogons address=10.0.0.0/8
/ip firewall raw add chain=prerouting in-interface=ether1 src-address-list=bogons action=drop
/ip settings set rp-filter=strict
The first two commands drop private addresses that arrive on the WAN port. Reverse path filtering drops packets that arrive on an interface that is not the route back to their source.
Defending as the victim
If you are the victim, the flood has already crossed the WAN link. Your own router can only limit what it passes to the inside, so the real fix is upstream.
/ip firewall filter add chain=forward protocol=icmp icmp-options=0:0 in-interface=ether1 limit=50,20:packet action=accept
/ip firewall filter add chain=forward protocol=icmp icmp-options=0:0 in-interface=ether1 action=drop
This pair allows echo replies up to a rate and drops the excess. The numbers are only an example. Contact your provider if the link itself is full.
Related attacks
A Fraggle attack is the same idea with UDP echo instead of ICMP. The defence is also similar. Drop traffic to broadcast addresses from outside and close unneeded services.
Two simple controls stop most smurf attacks. Do not accept broadcast traffic from the WAN and do not accept forged sources.
What to remember for the exam
Seven facts summarise the smurf attack.
- A smurf attack sends ICMP echo requests to a broadcast address.
- The source address is forged and is set to the victim.
- Every host replies, and all replies hit the victim.
- The attack amplifies traffic, and a bigger network gives a bigger effect.
- Drop ICMP with
dst-address-type=broadcastto avoid being an amplifier. - Reverse path filtering and bogon lists help against forged sources.
- A Fraggle attack is the UDP version of the same idea.
Common mistakes
Four mistakes are common.
Believing the attacker is the one sending the replies. The replies come from innocent hosts that answered the broadcast.
Dropping only on the forward chain. The router can itself be an amplifier, so protect the input chain too.
Blocking all ICMP to stop smurf. This breaks diagnosis. Drop only ICMP sent to broadcast addresses and limit the rest.
Confusing amplifier and victim. The defences differ. The amplifier blocks broadcast pings, and the victim limits and asks upstream.
Strict reverse path filtering can break valid traffic on a router with several uplinks. Use loose mode when the return path may differ.
Check yourself
Work through these three questions.
Why does the victim of a smurf attack receive the replies?
The attacker forges the source address of the echo request, setting it to the victim. Every host that answers the broadcast sends its reply to that address.
Which RouterOS matcher helps you drop pings sent to a broadcast address?
Use
dst-address-type=broadcasttogether withprotocol=icmp. A raw rule drops them before tracking.What is a Fraggle attack?
It is the UDP version of the smurf attack. It uses UDP echo to a broadcast address instead of ICMP.
Topic 3 of 5 in OSI Layer Attacks
Test yourself on OSI Layer Attacks
The full MikroTik MTCSE question bank has 446 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.