Got it

What is VLAN Hopping? How to Mitigate VLAN hooping attacks

Latest reply: Jan 17, 2022 12:44:30 482 16 16 0 0

What is VLAN Hopping?

 

It is a type of exploit that allows an attacker to bypass any layer2 restrictions built to divide hosts. With proper switch port configuration, an attacker would have to go through a router and any other layer3 devices, to access their target.

Since many networks either have poor VLAN implementation or have misconfigurations which will allow for attackers to perform above mentioned exploit. There are two primary methods of VLAN hopping, known as 'Switched Spoofing', and 'Double Tagging'.

It is important to understand how switches operate if we would like to find and exploit their vulnerabilities. We are not necessarily exploiting the device itself, but rather the protocols and configurations which are instructing how they operate.

On a switch, a port is either configured as an access port or a trunking port. An access port is typically used when connecting a host to a switch. With the implementation of VLANs, each access port is assigned to only one VLAN. A trunking port is used when connecting two switches or a switch and a router together. Trunking ports allow for traffic from multiple VLANs.

 

VLAN hooping types:


VLAN Hooping attacks

1.  Switched Spoofing VLAN Attack

An attacker acts as a switch in order to trick a legitimate switch into creating a trunking link between them. As mentioned before, packets from any VLAN are allowed to pass through a trunking link. Once the trunk link is established, the attacker then has access to traffic from any VLAN.

This exploit is only successful when the legitimate switch is configured to negotiate a trunk. This occurs when an interface is configured with either "dynamic desirable", "dynamic auto" or "trunk" mode. If the target switch has one of those modes configured, the attacker then can generate a DTP message from their computer and a trunk link can be formed.

 

2.  Double Tagging Attack

Double tagging occurs when an attacker adds and modifies tags on an Ethernet frame to allow the sending of packets through any VLAN. This attack takes advantage of how many switches process tags. Most switches will only remove the outer tag and forward the frame to all native VLAN ports. With that said, this exploit is only successful if the attacker belongs to the native VLAN of the trunk link. Another important point is, this attack is strictly one way as it is impossible to encapsulate the return packet. An attacker can use the program Yersinia to craft and send a DTP message. Yersinia is a penetration testing framework built to attack many protocols that reside on layer2. It comes pre-installed with kali Linux and has an easy-to-use graphical user interface (GUI).

An attacker can use the program Scapy, to create the specially crafted frames needed for processing this attack. Scapy is a Python program created to manipulate packets.

 

 

 

How Can You Mitigate VLAN Hopping attacks?

To prevent a Switched Spoofing attack, there are a few steps you should take: Do not configure any access points with either of the following modes: "dynamic desirable", "dynamic auto", or "trunk". Manually configure access ports and disable DTP on all access ports.

·       Switchport mode access

·       Switchport mode no negotiate

Manually configure all trunk ports and disable DTP on all trunk ports.

 

·       Switchport mode trunk

·       Switchport mode no negotiate

Shutdown all interfaces that are not currently in use.

 

 

To prevent a Double Tagging attack, there is only one step you need to take: keep the native VLAN of all trunk ports different from user VLANs. The best approach to mitigating double-tagging attacks is to ensure that the native VLAN of the trunk ports is different from the VLAN of any user ports. In fact, it is considered a security best practice to use a fixed VLAN that is distinct from all user VLANs in the switched network as the native VLAN for all 802.1Q trunks.

 

 

Ref:

Luminisindia.com


Excellent! Keep up the good work!
View more
  • x
  • convention:

hemin88
hemin88 Created Nov 10, 2021 06:12:41 (0) (0)
Thank you for your support  
andersoncf1
MVE Author Created Nov 17, 2021 13:01:42

Well done! Thanks for sharing
View more
  • x
  • convention:

good one
View more
  • x
  • convention:

IndianKid
Moderator Author Created Nov 17, 2021 14:38:02

well done explaining the new topic. thanks Hemin
View more
  • x
  • convention:

zaheernew
MVE Author Created Nov 17, 2021 16:11:21

Thanks for your sharing!
View more
  • x
  • convention:

Well done! Thank you for the post
View more
  • x
  • convention:

Good post , thank you for sharing this
View more
  • x
  • convention:

Thanks for your sharing!
View more
  • x
  • convention:

good one
View more
  • x
  • convention:

12
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.