Nac Bypass
Nac Bypass
1. These EAPOL frames are forwarded from "the client desiring access to the network" to
"the switch".
2. The switch unpacks the EAPOL and forwards the EAP packet to an authentication server,
which in most cases will be a RADIUS server.
From there everything goes vice versa. As EAP is more a framework than a protocol, it
contains several EAP methods for authentication. The most commonly known variants are
EAP-TLS, EAP-MD5, EAP-PSK and EAP-IKEv2, allowing to authenticate by preshared keys,
passwords, certificates or other mechanisms.
Authors
The Hacker Recipes Ctrl K Tools Exegol
A short overview from Gartner lists and reviews many NAC solutions: NAC Reviews & MAC-based + authentic…
Systems & services
Ratings. Using a Hub
Using a transparent…
Evasion
Mitigation
Physical
Offensive tooling (dropbox) Resources
Locks
Networking Hardware
Network Access Control
A device, known as "dropbox", is needed to carry out according attacks when conducting
Machines
NAC penetration tests. The following setup is a commonly used for this type of
Super secret zones
engagement.
Raspberry Pi 4 8GB
Intelligence gathering
SD card
Radio 3.5” TFT with Case
Additional USB Ethernet Adapter Power Adapter
Mobile apps Keyboard
(optional) Powerbank
Contributing to THR
(optional) LTE USB modem
Guide
Template
The Raspberry can be flushed with the official ARM image of Kali.
The integrated wireless interface can be used to spawn a hotspot to be able to connect via
SSH.
Initial setup
The following commands can then be run to install the necessary libraries and tools.
Authors
sudo apt-get install isc-dhcp-server
sudo apt-get install hostapd
sudo systemctl enable isc-dhcp-server
sudo systemctl unmask hostapd
The Hacker Recipes sudo Ctrl K
systemctl enable hostapd Tools Exegol
Contributing to THR
Guide
Template Abuse
There are several scenarios to take into consideration with specific bypass possibilities.
Companies usually have devices that don't fully support 802.1x. Among them can be
printers, VOIP equipment, cameras, etc. These will usually be granted access to the
network only by having their MAC address in a whitelist. This is often dubbed "MAC-based
NAC".
Devices like the Basilisk, Basilisk Zero, or Skunk can be helpful in NAC-bypass engagements.
Nota bene: keep in mind ghosted Linux machines will require custom iptable rules to work
smoothly.
MAC Authentication Bypass (MAB) can be done by spoofing an authorized MAC address.
The first step in spoofing an authorized MAC address is to find one. This can be done by
physically searching addresses on printers, labels, IP phones and similar equipment, or by
using Wireshark to manually inspect broadcast and multicast packets that travel on the
The Hacker Recipes Ctrl K
network and obtain some MAC addresses in the traffic.c.
Tools Exegol
macchanger can then be used to spoof the a MAC address. Once there, cables can be
new_releases Welcome to THR v2! swapped to access the customer's network.
On this page
bash Theory
Active Directory # manually set the address
macchanger -m "AA:BB:CC:DD:EE:FF" eth0 Basics
Reconnaissance
Infrastructure & auth flow
Movement # reset the address to the permanent physical MAC
Offensive tooling (dropbox)
Persistence macchanger -p eth0
Hardware
Initial setup
Web services Some errors may be raised when the interface settings cannot be changed. This is usually due to DHCP configuration
Reconnaissance the interface being used.
Wi-Fi configuration
Configuration bash
ifdown eth0 Abuse
Accounts and sessions macchanger -m "AA:BB:CC:DD:EE:FF" eth0
MAC-based only
User inputs ifup eth0
Authentication only
MAC-based + authentic…
Systems & services
Using a Hub
Authentication only Using a transparent…
Evasion
Same thing as MAC-based + authentication, without the MAC-based verification bypass. Mitigation
Physical Resources
A regular authentication to 802.1x (and others) systems can be conducted with xsupplicant
Locks
(C).
Networking
Network Access Control MAC-based + authentication
Machines
In this case, access to the network is granted if the supplicant's MAC address is whitelisted
Super secret zones
and if the authentication then succeeds.
Intelligence gathering Just like with MAC-based bypass, the first step is to find an authorized MAC address.
The second step is to access the port without authentication, which leaves at least two
Radio
possible ways, both relying on the dropbox.
But there is a downside to this method. As long as stateless protocols like UDP are used, both
devices can communicate just fine. However when it comes to using stateful protocols like TCP,
they will for certain run into issues, as one device behind the Hub will be the first to receive and
drop or answer a package e.g. in the 3-way-handshake. One could unplug the original device after
it opened the port and have a fully capable device inside the network, but this might very quickly
raise alarms, when the device is somewhat monitored and will block access to the network when
the next authentication needs to be done.
There is an awesome tool called nac_bypass from Mick Schneider which he walks through
in this blog post.
Authors
The steps are as follows:
Intelligence gathering
run other offensive tools for NTLM capture, relay, etc.
Radio
Responder needs to bet set up to listen on the bridge interface, but change the answering IP
Mobile apps address to the one of the victim.
bash
Contributing to THR responder --interface br0 --externalip $VICTIM
Guide
Template
Mitigation
In general an 802.1x implementation will prevent employees or service providers from
connecting rogue devices to the network. To a certain extend it may also block script
kiddies that don't have the l33t skillz to bypass it. For more advanced adversaries, the
attacks will most likely be successful.
Here are some general guidelines for keeping things as secure as possible:
Access to systems and services that normally don´t get accessed (firewall logs)
Monitor network traffic and detect attacks / unknown patterns (IDS/IPS/SIEM)
Unneeded ports must be disabled/disconnected.
Don't expose unneeded info. Stickers with IP/MAC addresses will make it much easier for
The Hacker Recipes Tools
Ctrl K Same goes for access to IP phone or printer menus to gather network intel.
an attacker. Exegol
Restrict them as much as possible.
Restrict access to the systems. If someone is not able to get in between, he can't carry
new_releases Welcome to THR v2! out attacks.
On this page
Awareness: train employees to ask questions and inform people, when they see a
Theory
Active Directory suspicious device hanging from a printer or stuff like that.
Basics
Reconnaissance
Infrastructure & auth flow
Movement
Offensive tooling (dropbox)
Persistence Resources Hardware
Initial setup
Web services DEF CON 19 - Alva 'Skip' Duckwall - A Bridge Too Far: Defeating Wir…
Wir…
Share DHCP configuration
Reconnaissance
Wi-Fi configuration
Configuration
Abuse
Accounts and sessions
MAC-based only
User inputs
Authentication only
MAC-based + authentic…
Systems & services
Using a Hub
Using a transparent…
Evasion
Mitigation
Physical Resources
Watch on
Locks
Networking
https://www.gremwell.com/marvin-mitm-tapping-dot1x-links
Network Access Control
Machines https://github.com/Orange-Cyberdefense/fenrir-ocd 802.1x bypass tool
Super secret zones
https://github.com/nccgroup/phantap An "invisible" network tap aimed at red teams
Contributing to THR
Guide Contribute to this page Last updated: 10/24/24, 1:12 AM
Template
Authors