You Tryin’ To Be a Cybersecurity Pro?

Layer 2 Attacks You Must Know!

Sean Byrne
2 min readFeb 25, 2023
Photo by Lars Kienle

Sorry, I couldn’t resist making that stupid rhyme so let’s pretend that didn’t happen. Let’s get to layer 2 attacks.

Layer 2 attacks:

Network attacks that target the data link layer (Layer 2) of the Open Systems Interconnection (OSI) model. These attacks take advantage of vulnerabilities in the way devices communicate with each other over a network, including switches, bridges, and other network
infrastructure components.

Here are some examples of Layer 2 attacks:

MAC address spoofing:

An attacker spoofs a MAC address, which is a unique identifier assigned to network interface cards, to gain unauthorized access to a network. By spoofing a legitimate MAC address, the attacker can bypass security measures that rely on MAC addresses for authentication.

ARP spoofing:

In Address Resolution Protocol (ARP) spoofing, an attacker sends fake ARP messages to associate their own MAC address with the IP address of a legitimate network device. This allows the attacker to intercept,
modify, or block traffic between two devices, or to launch other types of attacks, such as a man-in-the-middle attack.

VLAN hopping:

VLAN hopping is a type of attack that exploits vulnerabilities in switch configuration to gain access to traffic on a different VLAN. An attacker can use techniques like double tagging, switch spoofing, or MAC address spoofing to hop between VLANs and gain access to sensitive information.

Spanning Tree Protocol (STP) attacks:

Spanning Tree Protocol is a network protocol that prevents loops in a network topology. An attacker can manipulate the STP configuration to create a loop, causing the network to crash or resulting in a man-in-the-middle attack.

CDP/LLDP manipulation:

Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) are used to discover information about network devices. An attacker can manipulate the information exchanged through these protocols to gather information or to launch an attack.

Final Thoughts and Some Solutions

These are just a few examples of Layer 2 attacks. By exploiting vulnerabilities in the data link layer, attackers can gain access to sensitive information, bypass security measures, and disrupt network operations. It’s important for organizations to implement security measures to protect against these types of attacks, such as enabling port security, implementing VLAN access controls, and using encryption to protect against sniffing and eavesdropping.

--

--

Sean Byrne
Sean Byrne

No responses yet