root@sparrow:~/writeups$ cat macchanger.md
// recon
macchanger
22 Jul 2026
· 1 min read
macchanger changes ("spoofs") the MAC address of a network interface — the network card's physical "plate". Used to increase privacy, bypass MAC-based filters, avoid tracking on Wi-Fi networks, and in security testing/pentesting.
| Type | CLI |
| Install | sudo apt install macchanger (bundled in Kali) |

Full flow
Check the current MAC:
ip link
# or
ifconfig
Before changing it, bring the interface down:
sudo ip link set wlan0 down
Change to a random MAC:
sudo macchanger -r wlan0
Current MAC: 00:11:22:33:44:55
New MAC: aa:bb:cc:dd:ee:ff (random)
Change to a specific MAC:
sudo macchanger -m 11:22:33:44:55:66 wlan0
Restore the original factory MAC:
sudo macchanger -p wlan0
Bring the interface back up and verify:
sudo ip link set wlan0 up
ip link show wlan0
Quick summary
sudo ip link set wlan0 down
sudo macchanger -r wlan0
sudo ip link set wlan0 up
Responsible use
These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.