L2 Attacks
L2 Attacks
L2 Attacks
Protection:
Port security- statically assign port to 1 mac add device.
12.VLAN Hopping
Double tagging
• For this exploit to work, the following conditions must exist in the
network configuration:
■ The attacker is connected to an access switch port.
■ The same switch must have an 802.1Q trunk.
■ The trunk must have the attacker’s access VLAN as its native VLAN.
• Therefore, to avoid VLAN hopping, you always should carefully
configure trunk links with the following steps:
• Step 1. Set the native VLAN of a trunk to a bogus or unused VLAN ID.
• Step 2. Prune the native VLAN off both ends of the trunk.
• One alternative is to force all 802.1Q trunks to add tags to frames for
the native VLAN, too. To force a switch to tag the native VLAN on all
its 802.1Q
• trunks, you can use the following command:
• Switch(config)# vlan dot1q tag native
13.STP Spoofing
• Negotiate for re-election process by sending superior BPDUs.
• Attacker can act as a root bridge also ; in that time all the traffic will
be forwarded via the attacker.
14.Private VLAN Attack
• A Private VLAN is a feature in Layer 2 which is used to isolate the
traffic only at layer2. When a layer 3,device such as a router is
connected to a Private VLAN, it supposed to forward all the traffic
received by the router to whatever destination it’s meant for.
Sometimes a malicious user might use it for his advantage.
• This can be prevented by configuring the VLAN access list.
• # vlan access-mapmap_name [0-65535]
15.VTP Attack
• The VLAN Trunking Protocol (VTP) is a proprietary Cisco protocol.
• The VTP attack involves a station sending VTP messages through the
network, advertising that there are no VLANs on the network.
• Thus, all client VTP switches erase their valid VLAN information
databases.
Mitigation
• Use Authentication for all VTP messages to ensure no VTP message is
processed by the client switches if the password contained in the
message is not correct.
The commands used to set the VTP password for your VTP Domain are:
Switch#vlan database
Switch(vlan)# vtp domain
password
Switch(vlan)#
Switch(vlan)#exit
Thank you!!