Hot Standby Router Protocol (HSRP) is a Cisco proprietary redundancy protocol for establishing a fault-tolerant default gateway, and has been described in detail in RFC 2281
HSRP is used in enterprise networks to provide default gateway redundancy in access layer. Enabling HSRP is as simple as executing two commands. The problem is that by default it uses clear text authentication with password of "cisco". This can be captured as seen below and used to inject malicious HSRP packets.
We will use "Yersinia" http://www.yersinia.net/ to capture and inject our own packets (this is always fun).
Our network topology looks as follows:
Let's ping the two "real" addresses .2 & .3 and the vitual IP .1 to confirm everything is working:
Now let's fire up Yersinia in GUI mode (the GUI is a bit buggy and sometimes crashes):
# yersinia -G
Let's go to "HSRP" tab and select "Edit Interaces" (in my case it's eth1).
Once correct interface is selected Yersinia autmatically starts capturing interesting packets.
Here we go to "Launch attack" and pick what we want to do. For the purpose of this lab I selected option "becoming active router" and hit "OK" (first option crashes the GUI)
Yersinia starts sending HSRP "Hello (state Active)" packets, which basically say that I'm now taking over the virtual IP address. At this point both "R2" and "R4" become "stand by" routers and all traffic bound for the gateway flows to the attacker.
There two implications, firtsly it can be used for Man in the middle (MITM) attack (the same thing can be accomplished with ARP poisoining) or cause a denial of service (DoS) condition where clients on the VLAN using this gateway wouldn't be able to connect to anything outside of the local network.
As seen below the virtual address didn't respond to ping while bogus HSRP packets were being injected.
This is not a great scenario to have to deal with during business hours, specially on a crowded access VLAN.