En yaygın The most common Layer 2 MAC saldırısı, saldırganın bir anahtar içindeki CAM arabelleğini taşırmak ve böylece anahtarı tüm arayüzlerde paket yayınladığı bir moda zorlamak amacıyla rastgele MAC adresleriyle çok sayıda paket oluşturduğu bir MAC taşma saldırısıdır.
Bunun nedeni, meşru MAC adreslerinin saldırgan tarafından üretilen çok sayıda rastgele MAC adresi lehine CAM tablosundan çıkarılmasıdır. Buna HUB modu denir ve bir anahtar hub modunda çalışırken, çarpışma alanlarının doğal ayrımı bozulur ve anahtardan geçen tüm çerçeveler bağlı tüm cihazlara iletilir. Bu, cihazdan geçen tüm trafiğin pasif olarak dinlenmesine olanak tanırattack is a MAC flooding attack, where an attacker generates a large number of packets with random MAC addresses in an attempt to overflow the CAM buffer within a switch and thus force the switch into a mode where it broadcasts packets on all interfaces.
This is because legitimate MAC addresses are removed from the CAM table in favor of a large number of random MAC addresses generated by the attacker. This is called HUB mode, and when a switch is operating in hub mode, the natural separation of collision domains is broken and all frames passing through the switch are forwarded to all connected devices. This allows passive eavesdropping of all traffic passing through the device.
MAC Flooding Attack , CAM tablosunun rastgele MAC adresleri ile dolmasına neden olur. Anahtar daha sonra bir hub gibi çalışmaya zorlanır (yani çerçeveler tüm bağlantı noktalarına iletilir). Buna karşılık dinamik olarak kaydedilen MAC adresleri CAM protokolünün 180 saniyede bir paket gönderimi ile MAC adresinin canlılığını kontrol eder ve paket geri dönüşü sağlanmadığında CAM tablosundan ilgili MAC adresi silinir. Bu sayede MAC sayısı girişinden fazla atak yapılmaması için sticky komutu uygulanır. Aynı zamanda ilgili port üzerinden kullanıcı tarafından maksimum MAC giriş sayısı belirlenir ve MAC girişlerinde maksimum değerin taşmasına neden olunursa porta protect, restrict veya shutdown komutları göndererek güvenli hale getirilircauses the CAM table to be flooded with random MAC addresses. The switch is then forced to operate like a hub (i.e. frames are forwarded to all ports). In contrast, dynamically stored MAC addresses allow the CAM protocol to check MAC address liveness by sending packets every 180 seconds and deleting the corresponding MAC address from the CAM table when no packet is returned. In this way, the sticky command is applied to prevent more attacks than the MAC number entry. At the same time, the maximum number of MAC entries is set by the user on the relevant port and if the maximum value is exceeded in MAC entries, the port is secured by sending protect, restrict or shutdown commands to the port.
switchport port-security maximum 2
...