Top MAC Spoofing Tools and Commands (2027): Ethical Hacking and Network Privacy Guide
Discover the best MAC spoofing tools in 2026 with real command examples. Learn how to spoof MAC addresses in Linux and Windows using macchanger, Technitium, SpoofMAC, and more. Perfect for ethical hackers, cybersecurity students, and network engineers.
Topic: Ethical Hacking in Cybersecurity & Ethical Hacking · Commands & reference
Also covers: Network Security
Quick answer: On Linux, change a MAC address with ip link set dev eth0 address 02:11:22:33:44:55, macchanger, or NetworkManager's cloned-mac-address setting for a permanent change. On Windows, use the adapter's "Network Address" property, PowerShell Set-NetAdapter -MacAddress, or Technitium MAC Address Changer. On macOS, use ifconfig or the built-in private Wi-Fi address. Use these only on your own devices or authorised tests.
Key takeaways
- Pick a valid address before changing it: a locally administered MAC such as 02:11:22:33:44:55 avoids clashing with real manufacturer ranges.
- Changes made with ip link or macchanger disappear after reboot, so use NetworkManager's cloned-mac-address setting when you need it to persist.
- Practise spoofing only on your own devices or an authorised lab, and keep the original address noted so you can undo the change.
Changing a MAC address is a routine task for privacy, network troubleshooting, lab work and authorised testing of MAC-based controls. This page lists the tools that still work in 2026, the exact commands for each operating system, how to make a change permanent or undo it, and how to fix the errors people usually hit.
If you want the concepts first (how spoofing is abused, how to detect it and how to prevent it), read MAC spoofing: how it works, real risks and prevention.
MAC address tools at a glance
| Tool | Platform | Type | Persists after reboot? | Status in 2026 |
|---|---|---|---|---|
ip link (iproute2) | Linux | Built-in command | No | Standard, recommended |
NetworkManager (nmcli) | Linux desktops | Built-in setting | Yes, per connection | Recommended for persistent or random MACs |
| macchanger | Linux | CLI tool | No | Still packaged in Kali, Debian and Ubuntu; old but works |
Adapter properties / Set-NetAdapter | Windows | Built-in | Yes | Recommended |
| Random hardware addresses | Windows 10/11 | Built-in Wi-Fi setting | Yes | Recommended for Wi-Fi privacy |
| Technitium MAC Address Changer | Windows | Free GUI | Yes | Convenient GUI option |
ifconfig / private Wi-Fi address | macOS | Built-in | No (ifconfig) / Yes (setting) | ifconfig may fail on some Wi-Fi hardware |
| SpoofMAC | macOS, Linux, Windows | Python script | No | Unmaintained; prefer built-in tools |
| SMAC | Windows | Commercial GUI | Yes | Legacy; not needed on current Windows |
Before you start: pick a valid address
Use a locally administered, unicast address. In practice that means the second hex digit of the first byte should be 2, 6, A or E, for example 02:xx:xx:xx:xx:xx or 0A:xx:xx:xx:xx:xx. This avoids clashing with a real manufacturer's address and, on Windows Wi-Fi adapters, is often the only kind the driver accepts. Note your original address first so you can restore it.
How do you change a MAC address with ip link on Linux?
The ip command is built into every modern Linux distribution, so it is the most dependable option. The change lasts until the interface resets or the machine reboots.
# 1. Find the interface name and current MAC
ip -br link
# 2. Bring the interface down, set the new address, bring it up
sudo ip link set dev eth0 down
sudo ip link set dev eth0 address 02:11:22:33:44:55
sudo ip link set dev eth0 up
# 3. Confirm
ip link show eth0
Replace eth0 with your real interface name, which on modern systems often looks like enp0s3 or wlp2s0. The older ifconfig eth0 hw ether... syntax still works where net-tools is installed, but ip is the current standard. For more everyday commands, see essential Linux networking commands.
Linux: persistent or random MAC with NetworkManager
On Ubuntu, Fedora, RHEL and most desktops, NetworkManager will undo a manual change when it reconnects. Set the address in the connection profile instead:
# List connection profiles
nmcli connection show
# Wired: fixed custom MAC for this connection
nmcli connection modify "Wired connection 1" ethernet.cloned-mac-address 02:11:22:33:44:55
# Wi-Fi: new random MAC each time you connect
nmcli connection modify "CafeWiFi" wifi.cloned-mac-address random
# Wi-Fi: a stable random MAC for this network (privacy without breaking logins)
nmcli connection modify "HomeWiFi" wifi.cloned-mac-address stable
# Back to the hardware address
nmcli connection modify "HomeWiFi" wifi.cloned-mac-address permanent
# Apply
nmcli connection up "HomeWiFi"
The accepted values (preserve, permanent, random, stable or a specific address) are listed in the NetworkManager documentation. stable is a good default for networks you use often: you keep privacy from other networks, and the router still recognises you.
Linux: macchanger
macchanger is a small tool that sets random, vendor-style or specific addresses. It hasn't had a major release in years but is still in the Kali, Debian and Ubuntu repositories and works fine.
sudo apt install macchanger
sudo ip link set dev eth0 down
sudo macchanger -s eth0 # show current and permanent MAC
sudo macchanger -r eth0 # fully random address
sudo macchanger -e eth0 # keep vendor bytes, randomise the rest
sudo macchanger -m 02:11:22:33:44:55 eth0 # set a specific address
sudo macchanger -p eth0 # restore the permanent (factory) MAC
sudo ip link set dev eth0 up
During installation on Debian-based systems you may be asked whether to change the MAC automatically whenever a device comes up. Choose "No" unless you specifically want that, because it can confuse DHCP reservations and network access control.
Windows: Device Manager, PowerShell and random addresses
Device Manager (any adapter that supports it)
- Open Device Manager and expand Network adapters.
- Right-click the adapter, choose Properties, then the Advanced tab.
- Select Network Address (some drivers call it "Locally Administered Address").
- Enter 12 hex digits with no separators, for example
021122334455, and click OK. - Choose Not Present later to go back to the factory address.
If there's no Network Address option, the driver doesn't support changing it.
PowerShell (run as administrator)
# See adapter names and current MACs
Get-NetAdapter | Select-Object Name, MacAddress, Status
# Set a new MAC (dashes optional)
Set-NetAdapter -Name "Ethernet" -MacAddress "02-11-22-33-44-55"
# Restore the original address
Reset-NetAdapterAdvancedProperty -Name "Ethernet" -DisplayName "Network Address"
The display name of the property can differ by driver, so check it with Get-NetAdapterAdvancedProperty -Name "Ethernet" if the reset fails. Microsoft documents the -MacAddress parameter on its Set-NetAdapter page, and notes that not all adapters support it.
What are random hardware addresses for Wi-Fi?
For privacy on public Wi-Fi you usually don't need a tool at all. In Windows 11, go to Settings > Network & internet > Wi-Fi and turn on Random hardware addresses, either for all networks or for one network from its properties page.
Technitium MAC Address Changer
Technitium's free GUI lists every adapter with its vendor, lets you pick a random or specific address, and restores the original with one click. It is handy if you change addresses often or prefer not to edit driver settings. Download it only from the developer's official site.
macOS: ifconfig and private Wi-Fi addresses
# Find the interface (Wi-Fi is usually en0)
networksetup -listallhardwareports
# Temporary change (disconnect from Wi-Fi first)
sudo ifconfig en0 ether 02:11:22:33:44:55
ifconfig en0 | grep ether
On recent Macs, especially with Apple silicon, a manual Wi-Fi change may not stick or may be reset on reconnect. For privacy, the supported route is System Settings > Wi-Fi > Details for a network, then set Private Wi-Fi address to Fixed or Rotating.
Android and iPhone
You don't need a spoofing app on phones. Android 10 and later use a randomised MAC per network by default (set under the network's privacy options), and iPhones use a private Wi-Fi address per network. Changing to an arbitrary address on Android generally needs root, which weakens the phone's security and isn't worth it for privacy alone.
Legitimate uses, matched to the right tool
| Goal | Best tool |
|---|---|
| Privacy on public Wi-Fi | Built-in randomisation (Windows, macOS, Android, iOS, NetworkManager) |
| Replacing a router or NIC without re-registering with an ISP or DHCP reservation | Router "MAC clone" setting or nmcli/Device Manager |
| Lab exercises and CTFs | ip link or macchanger in a VM |
| Authorised test of a client's MAC filtering or NAC | ip link/macchanger, documented in the test plan |
| Testing your own detection (port security, DAI, NAC alerts) | Any of the above on a lab switch you control |
Using a copied address to get onto a network, past a captive portal or around a ban that you aren't authorised to bypass is unauthorised access. In India that can lead to liability under Section 43 and charges under Section 66 of the IT Act, 2000. For practice, build an isolated setup as described in how to set up a penetration testing lab.
Troubleshooting common errors
| Problem | Cause | Fix |
|---|---|---|
RTNETLINK answers: Cannot assign requested address | Multicast or invalid address (first byte odd) | Use a locally administered unicast address such as 02:... |
Device or resource busy | Interface still up | Run ip link set dev IFACE down first |
| MAC reverts after a few seconds | NetworkManager reapplies its profile | Set cloned-mac-address in the connection instead |
| Windows Wi-Fi ignores the new address | Driver only accepts certain first bytes | Use a first byte of 02, 06, 0A or 0E, or use Random hardware addresses |
| No internet after the change | DHCP reservation, NAC or MAC filtering tied to the old address | Restore the original MAC or ask the network admin |
| Change lost after reboot | Temporary methods (ip, macchanger, ifconfig) | Use NetworkManager, systemd-networkd or the Windows adapter property |
What defenders should know about these tools
Because every tool above is free and takes seconds to use, network admins should assume any device can present any MAC address. Rely on 802.1X or NAC for access decisions, and use port security, DHCP snooping and Dynamic ARP Inspection on managed switches to catch duplicates and mismatches. Those controls are a core part of the CCNA (200-301) training if you want to configure them hands-on.
Next step
Open a Linux VM and practise the full cycle: record the original address, change it with ip link, make it persistent with nmcli, then restore it with permanent. Then turn on random or private Wi-Fi addresses on your own phone and laptop, which is the privacy win most people actually need.
Related reading
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0