Skip to contentSkip to conversation

ICMP Land Attack

DISCUSSION Manish Jain 4 participants 4 messages Apr 9, 2007 netfilter

lore
Share & tools
lore
#0 lore raw

Hello,

We are experiencing ICMP Land Attach (ICMP packet with [source ip = dest ip] && [source mac == dest mac]).

Do we have any standard mechanism to counter this attach using iptable/ipsets? Or any other suggestion?

Whether it is possible to write iptable rule saying "source ip == dest ip" instead of specifying hard-coded values?

Any pointers will be appreciated.

Best Regards,
Manish Jain

#1 lore raw
Quoted 4 lines · Manish Jain

We are experiencing ICMP Land Attach (ICMP packet with [source ip = dest ip] && [source mac == dest mac]).
Do we have any standard mechanism to counter this attach using iptable/ipsets? Or any other suggestion?

Activate Reverse Path Filtering that checks if incoming interface is consistent to routing table, and drops it if not:

for i in /proc/sys/net/ipv4/conf/*/rp_filter; do

	echo 1 > $i;

done

Don't forget to activate martians logging to see them in your logs:

for i in /proc/sys/net/ipv4/conf/*/log_martians; do

	echo 1 > $i;

done

In addition to this, when a packet reaching a Linux box comes from one of its own IP address and is received on an external interface, it is silently dropped.

Signature · 2 lines
http://sid.rstack.org/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
Quoted 2 lines
Quoted 2 lines

Hi! I'm your friendly neighbourhood signature virus. Copy me to your signature file and help me spread!

#2 lore raw
In reply to Manish Jain

mån 2007-04-09 klockan 17:23 +0530 skrev Manish Jain:

Quoted 2 lines

Whether it is possible to write iptable rule saying "source ip == dest ip" instead of specifying hard-coded values?

A quite trivial custom match to write if not supported by any of the existing matches..

The addrtype match is a reasonable complex template to start from.

Regards
Henrik

#3 lore raw
In reply to Manish Jain
Quoted 4 lines · Manish Jain

Hello,

We are experiencing ICMP Land Attach (ICMP packet with [source ip = dest ip] && [source mac == dest mac]).

If the source mac == the dest mac, then the evil sender is right at your network, just one hop away. Kill him.

Jan