MAB (MAC Authentication Bypass) คืออะไร?
MAC Authentication Bypass (MAB) เป็นกลไกการยืนยันตัวตนเครือข่ายสำหรับอุปกรณ์ที่ ไม่รองรับ 802.1X (EAP) เช่น Printer, IP Phone แบบเก่า, IoT Devices, Medical Devices, Industrial Controllers, Building Automation
MAB ทำงานอย่างไร?
- อุปกรณ์เชื่อมต่อพอร์ต Switch/Port
- Switch ส่ง Ethernet Frame แรกของอุปกรณ์ (Source MAC Address)
- Switch ส่ง MAC Address นั้นไปที่ RADIUS Server (ISE, Aruba ClearPass, FreeRADIUS, NPS) เพื่อยืนยันตัวตน
- RADIUS ตรวจสอบใน Database (Internal/AD/LDAP): MAC นี้ลงทะเบียนไว้? Authorized?
- Access-Accept: ส่ง VLAN, DACL, Session Timeout, CoA Capability กลับมา > Port Authorized
- Access-Reject: Port อยู่ใน Unauthorized State (Guest VLAN / Quarantine VLAN / Shutdown)
MAB ปลอดภัยไหม? (Security Analysis)
| ด้าน | รายละเอียด |
|---|---|
| จุดอ่อนหลัก | MAC Spoofing ง่ายมาก - แฮกเกอร์เปลี่ยน MAC Address ให้ตรงกับอุปกรณ์ที่ Authorized ได้ในไม่กี่วินาที |
| No Mutual Authentication | อุปกรณ์ไม่ยืนยัน Server (ไม่มี Certificate Validation) - ระดมได้ด้วย Rogue AP/NAS |
| No Encryption | Credential (MAC) ส่งแบบ Cleartext ระหว่าง Switch-RADIUS (เว้นแต่จะใช้ RADSEC/TLS) |
| Scalability | จัดการ MAC Database ยาก (เพิ่ม/ลบ/หมดอายุ) สำหรับอุปกรณ์จำนวนมาก |
| จุดแข็ง | รองรับอุปกรณ์ Legacy/Headless ที่ไม่มี 802.1X Supplicant |
| Fallback Role | ใช้เป็น Fallback เมื่อ 802.1X Fail (MAB after 802.1X Timeout) |
Cisco MAB / ISE MAB Implementation
Catalyst Switch Config (Legacy)
interface GigabitEthernet1/0/1
authentication port-control auto
authentication host-mode multi-auth
authentication order mab dot1x
authentication priority mab dot1x
mab
dot1x pae authenticator
spanning-tree portfast
!
radius server ISE
address ipv4 10.1.1.10 auth-port 1812 acct-port 1813
key 7 SharedSecret
!
ISE Policy (Modern)
- Policy Set: MAB Flow
- Conditions: RADIUS Protocol = EAP-MD5 (MAB uses RADIUS Access-Request with User-Name=MAC, Password=MAC)
- Identity Source: Internal Endpoints / AD / LDAP / External REST API
- Authorization Profile: VLAN, DACL (Downloadable ACL), SGT, CoA, Reauth Timer
- Profiling: ISE Profiler ระบุ Device Type (Printer, Camera, Phone) จาก DHCP, HTTP, NMAP, CDP, LLDP > Auto-group > Policy
MAB vs 802.1X vs No Auth
| คุณสมบัติ | No Auth (Open) | MAB | 802.1X (EAP-TLS/PEAP) |
|---|---|---|---|
| Security Level | None | Low (MAC Spoofable) | High (Mutual Auth, Encryption, Certs) |
| Device Support | All | All (No Supplicant Needed) | Requires 802.1X Supplicant |
| Management Overhead | None | Medium (MAC DB) | High (PKI, Certs, Supplicant Config) |
| Visibility | None | Good (MAC, IP, Profile) | Excellent (User, Device, Posture) |
| Recommended For | Guest (Captive Portal) | IoT, OT, Legacy, Printer | Corporate Devices (Laptop, Phone) |
แนวทางปฏิบัติที่ดี (MAB Best Practices)
- ใช้เป็น Last Resort เท่านั้น: พยายาม 802.1X ก่อน (Authentication Order: dot1x มาก่อน mab)
- ผสาน Profiling: ให้ ISE/NAC ระบุ Device Type อัตโนมัติ แล้ว Mapping Policy
- จำกัดสิทธิ์ (Least Privilege): ให้ VLAN/DACL แคบที่สุด (Printer: Print Port Only, Camera: RTSP to NVR Only)
- Enable RADSEC (RADIUS over TLS): เข้ารหัส RADIUS Traffic ระหว่าง Switch-ISE
- Short Session Timeout + Reauth: Re-authenticate บ่อย (เช่น 1 ชั่วโมง) ลดช่วงเวลาที่ Spoof ได้
- Port Security + Sticky MAC: จำกัดจำนวน MAC ต่อพอร์ต, Sticky Learning
- Monitor & Alert: SIEM Alert เมื่อ MAB Fail มาก / MAC Spoofing Detected (Duplicate MAC)
- Segment MAB Devices: ใส่ VLAN แยก (IoT VLAN, Printer VLAN) + Firewall ระหว่าง VLAN
MAB ในมุมมอง Zero Trust
MAB ไม่ใช่ Zero Trust เพราะ:
- ยืนยันแค่ MAC (Identity Weak)
- ไม่มี Device Posture Check (Health, Patch, Compliance)
- ไม่มี Continuous Verification
แนวทาง: ใช้ MAB เพื่อ Onboard อุปกรณ์ Legacy/OT ให้เข้าสู่เครือข่าย แล้วค่อยๆ ย้ายไป Zero Trust (Device Certificate, Agent, SASE) เมื่ออุปกรณ์รองรับ