
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Cross-platform MAC address and DUID spoofing utility for macOS, Windows, and Linux
✅ Cross-Platform Support: This is a modernized fork of the original
spoofproject, updated for compatibility with modern macOS (Sequoia 15.4+, Tahoe 26+), Windows 10/11, and Linux. All platforms are now fully supported!
A Node.js utility for changing MAC addresses and DHCPv6 DUIDs across all major platforms. Features reliable macOS support, modern Windows PowerShell integration, and Linux ip link commands. This fork includes enhanced error handling, automatic verification, retry logic, and improved cross-platform compatibility.
This repository (TT5H/spoof-d) is a fork of basedbytes/spoofy, which itself is a fork of the original spoof project. This fork extends the functionality with full cross-platform support and enhanced features.
ip link commands (replaces deprecated ifconfig)airport dependency: The deprecated airport -z command has been replaced with modern networksetup commands--verbose) for detailed debugging output--json) for scripting and automation.spoofyrc in home directory)npm install -g spoof-d
After installation, use the spoofy command from anywhere (the package name is spoof-d, but the CLI command is spoofy).
git clone https://github.com/TT5H/spoof-d.git
cd spoof-d
npm install
npm install -g .
This gives you the latest development version with all the latest features.
spoof-d includes shell completion support for bash, zsh, fish, and PowerShell, making it easier to use the CLI with tab completion.
The easiest way to install completions is using the built-in command:
spoofy completion
This will automatically detect your shell and install the appropriate completion file. You can also specify a shell explicitly:
spoofy completion --shell=bash
spoofy completion --shell=zsh
spoofy completion --shell=fish
spoofy completion --shell=powershell
# Copy completion file
mkdir -p ~/.bash_completion.d
cp completions/spoofy.bash ~/.bash_completion.d/spoofy
# Add to ~/.bashrc
echo "source ~/.bash_completion.d/spoofy" >> ~/.bashrc
source ~/.bashrc
Or install globally (requires root):
sudo cp completions/spoofy.bash /etc/bash_completion.d/spoofy
# Copy completion file
mkdir -p ~/.zshrc.d
cp completions/spoofy.zsh ~/.zshrc.d/_spoofy
# Add to ~/.zshrc
echo "fpath=(~/.zshrc.d \$fpath)" >> ~/.zshrc
echo "autoload -U compinit && compinit" >> ~/.zshrc
source ~/.zshrc
Or install globally (requires root):
sudo cp completions/spoofy.zsh /usr/local/share/zsh/site-functions/_spoofy
# Copy completion file
mkdir -p ~/.config/fish/completions
cp completions/spoofy.fish ~/.config/fish/completions/spoofy.fish
Fish will automatically load completions from ~/.config/fish/completions/. Just restart your fish shell.
Or install globally (requires root):
sudo cp completions/spoofy.fish /usr/share/fish/completions/spoofy.fish
# Create profile directory if needed
New-Item -ItemType Directory -Force -Path (Split-Path $PROFILE)
# Copy completion file next to your profile
$completionPath = Join-Path (Split-Path $PROFILE) "spoofy-completion.ps1"
Copy-Item completions/spoofy.ps1 $completionPath
# Add sourcing line to your PowerShell profile
Add-Content $PROFILE ". `"$completionPath`""
# Reload profile
. $PROFILE
Or add manually to your profile:
. C:\path\to\completions\spoofy.ps1
list, set, randomize, duid, etc.)--wifi, --verbose, etc.)macOS/Linux:
spoofy list
Windows (run PowerShell as Administrator):
spoofy list
macOS (WiFi is typically en0):
sudo spoofy randomize en0
Windows:
# Run PowerShell as Administrator
spoofy randomize "Ethernet"
Linux:
sudo spoofy randomize eth0
Note: WiFi will disconnect briefly and may need to reconnect to networks. On Windows, ensure you're running as Administrator.
You can always see up-to-date usage instructions by running spoofy --help.
spoofy list
Output:
- "Ethernet" on device "en4" with MAC address 70:56:51:BE:B3:00
- "Wi-Fi" on device "en0" with MAC address 70:56:51:BE:B3:01 currently set to 70:56:51:BE:B3:02
- "Bluetooth PAN" on device "en1"
spoofy list --wifi
Using hardware port name:
sudo spoofy randomize wi-fi
Or using device name:
sudo spoofy randomize en0
sudo spoofy set 00:11:22:33:44:55 en0
sudo spoofy reset wi-fi
Note: On macOS, restarting your computer will also reset your MAC address to the original hardware address.
spoof-d also supports DHCPv6 DUID (DHCP Unique Identifier) spoofing for complete IPv6 network identity management.
A DUID (DHCP Unique Identifier) is used in DHCPv6 to uniquely identify a client on IPv6 networks. Unlike MAC addresses which identify network interfaces, DUIDs identify DHCP clients across all interfaces and persist across reboots.
The first time you spoof your DUID, your original DUID is automatically saved to:
/var/db/dhcpclient/DUID.original/var/lib/spoofy/duid.original%PROGRAMDATA%\spoofy\duid.originalThis allows you to restore to your pre-spoofing state at any time using spoofy duid restore.
spoofy duid list
Generate and set a random DUID (automatically saves your original on first use):
sudo spoofy duid randomize en0
You can specify the DUID type:
sudo spoofy duid randomize en0 --type=LLT
sudo spoofy duid set 00:03:00:01:aa:bb:cc:dd:ee:ff en0
Match DUID to the current MAC address of an interface (useful after MAC spoofing):
sudo spoofy duid sync en0
With specific type:
sudo spoofy duid sync en0 --type=LLT
Typical workflow for complete identity spoofing:
sudo spoofy randomize en0 # Spoof MAC first
sudo spoofy duid sync en0 # Then sync DUID to match
This ensures both layers show the same spoofed identity on IPv6 networks.
Return to your original (pre-spoofing) DUID:
sudo spoofy duid restore en0
Delete current DUID and let the system generate a NEW random one:
sudo spoofy duid reset en0
Important: reset generates a NEW DUID, while restore returns to your ORIGINAL.
| Type | Name | Description |
|---|---|---|
| 1 | DUID-LLT | Link-layer address + timestamp (most common) |
| 2 | DUID-EN | Enterprise number + identifier |
| 3 | DUID-LL | Link-layer address only (default) |
| 4 | DUID-UUID | UUID-based identifier |
spoofy info en0
Shows detailed information about an interface including hardware MAC, current MAC, vendor information, and change history.
spoofy validate 00:11:22:33:44:55
Validates and normalizes a MAC address, showing vendor information if available.
spoofy vendor 00:11:22:33:44:55
Looks up the vendor/manufacturer of a MAC address using the OUI database.
Create a batch file (e.g., batch.json):
[
{
"type": "randomize",
"device": "en0",
"local": true
},
{
"type": "set",
"device": "eth0",
"mac": "00:11:22:33:44:55"
},
{
"type": "reset",
"device": "wlan0"
}
]
Then run:
sudo spoofy batch batch.json
spoofy history
View all MAC address changes, or filter by device:
spoofy history en0
spoofy duid history
View all DUID changes, or filter by device:
spoofy duid history en0
Get detailed debugging information:
spoofy list --verbose
spoofy randomize en0 --verbose
Output results in JSON format for scripting:
spoofy list --json
spoofy randomize en0 --json
Example JSON output:
{
"success": true,
"device": "en0",
"mac": "00:11:22:33:44:55",
"message": "MAC address changed successfully"
}
Create a configuration file at ~/.spoofyrc (or %USERPROFILE%\.spoofyrc on Windows):
{
"randomize": {
"local": true
},
"defaults": {
"verbose": false,
"json": false
}
}
The configuration file allows you to set default options that will be used automatically.
All MAC address and DUID changes are automatically logged to ~/.spoofy_history.json. You can:
spoofy historyspoofy history en0spoofy duid historyspoofy duid history en0The tool includes an OUI (Organizationally Unique Identifier) database to identify device vendors:
spoofy list outputspoofy vendor <mac> commandLong-running operations show progress indicators:
⏳ Changing MAC address... ✓ Successfully set MAC address
Install the package as spoof-d; the CLI command is spoofy.
const spoofy = require('spoof-d');
// Get current DUID
const current = spoofy.duid.getCurrentDUID();
console.log('Current DUID:', spoofy.duid.formatDUID(current));
// Parse DUID info
const info = spoofy.duid.parseDUID(current);
console.log('Type:', info.typeName);
console.log('MAC:', info.lladdr);
// Check if original is stored
if (spoofy.duid.hasOriginalDUID()) {
const original = spoofy.duid.getOriginalDUID();
console.log('Original DUID:', spoofy.duid.formatDUID(original));
}
// Generate a random DUID
const newDuid = spoofy.duid.generateDUID(spoofy.duid.DUID_TYPES.DUID_LL);
console.log('Generated:', spoofy.duid.formatDUID(newDuid));
// Set DUID (requires root) - automatically saves original on first call
spoofy.duid.setDUID(newDuid, 'en0');
// Randomize DUID
spoofy.duid.randomizeDUID(spoofy.duid.DUID_TYPES.DUID_LLT, 'en0');
// Sync DUID to current MAC address
spoofy.duid.syncDUID('en0', spoofy.duid.DUID_TYPES.DUID_LL);
// Restore to original DUID
spoofy.duid.restoreDUID('en0');
For complete identity change on IPv6 networks, you should change both MAC and DUID.
Recommended workflow using sync:
sudo spoofy randomize en0 # Spoof MAC first
sudo spoofy duid sync en0 # Sync DUID to match spoofed MAC
The sync command automatically matches the DUID to your current (spoofed) MAC address.
Alternative - randomize both separately:
sudo spoofy randomize en0
sudo spoofy duid randomize en0
Manual sync for advanced use:
When using DUID-LL or DUID-LLT types, the DUID includes the MAC address. For consistent spoofing, ensure the MAC in your DUID matches your spoofed MAC:
const spoofy = require('spoof-d');
// Spoof MAC
const newMac = '00:11:22:33:44:55';
spoofy.setInterfaceMAC('en0', newMac, 'Wi-Fi');
// Create matching DUID
const duid = spoofy.duid.generateDUID(spoofy.duid.DUID_TYPES.DUID_LL, newMac);
spoofy.duid.setDUID(duid, 'en0');
networksetup and ifconfig commandsGet-NetAdapter and Set-NetAdapter commandsWindows Usage:
# Run PowerShell or CMD as Administrator
spoofy list
spoofy randomize "Ethernet"
spoofy set 00:11:22:33:44:55 "Wi-Fi"
ip link commandsifconfig if ip command is not availablesudo)Linux Usage:
sudo spoofy list
sudo spoofy randomize eth0
sudo spoofy set 00:11:22:33:44:55 wlan0
On Linux systems using NetworkManager, MAC address changes may be immediately overwritten by NetworkManager if the interface is managed. spoof-d includes NetworkManager detection and integration to help prevent this issue.
When changing MAC addresses on Linux, spoof-d automatically:
--nm-reconnectTo automatically reconnect the NetworkManager device after a MAC change:
sudo spoofy randomize eth0 --nm-reconnect
This will:
If normal reconnection doesn't work, you can force NetworkManager to restart networking (use with caution):
sudo spoofy randomize eth0 --nm-reconnect --force
Warning: The --force flag will temporarily disable all NetworkManager networking, which may disconnect all network interfaces briefly.
If you prefer to manage NetworkManager manually:
Temporarily disconnect the device:
nmcli dev disconnect eth0
sudo spoofy randomize eth0
nmcli dev connect eth0
Mark device as unmanaged (persistent):
Edit /etc/NetworkManager/NetworkManager.conf:
[keyfile]
unmanaged-devices=interface-name:eth0
Then restart NetworkManager:
sudo systemctl restart NetworkManager
Disable NetworkManager for specific interface (temporary):
nmcli device set eth0 managed no
sudo spoofy randomize eth0
nmcli device set eth0 managed yes
Use --verbose to see detailed NetworkManager status:
sudo spoofy randomize eth0 --verbose
This will show:
The project includes test suites for core functionality:
Test DUID generation, parsing, and conversion:
# Run all DUID tests
npm run test:duid
# or
node test/test-duid.js
# Run specific test
node test/test-duid.js --test=generation
node test/test-duid.js --test=parsing
Test NetworkManager detection and device status parsing:
# Run all NetworkManager tests
npm run test:nm
# or
node test/test-networkmanager.js
# Run specific test (parsing tests work on any platform)
node test/test-networkmanager.js --test=parsing
npm run test:all
Note: NetworkManager tests require a Linux system with NetworkManager installed. Parsing tests work on any platform.
sudo (required for network changes)networksetup -detectnewhardware if changes don't take effectSet-NetAdapter fails, the tool will automatically try the registry methodsudo (required for network changes)ip command is available (usually in iproute2 package)--nm-reconnect to automatically reconnect after MAC changenmcli dev disconnect <iface> then nmcli dev connect <iface>nmcli device statusThis is an active fork. Contributions, bug reports, and feature requests are welcome!
To contribute:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)MIT License (inherited from original project)
spoof by Feross AboukhadijehThis fork maintains compatibility with modern operating systems and extends support to Windows and Linux.
FAQs
Cross-platform MAC address and DUID spoofing utility for macOS, Windows, and Linux
We found that spoof-d demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.