Install spoof-mac with the terminal command: $ brew install spoof-mac
.
Then follow the instructions at https://github.com/feross/SpoofMAC#startup-installation-instructions to randomize your MAC address on computer startup:
# Download the startup file for launchd
curl https://raw.githubusercontent.com/feross/SpoofMAC/master/misc/local.macspoof.plist > local.macspoof.plist
# Customize location of `spoof-mac.py` to match your system
cat local.macspoof.plist | sed "s|/usr/local/bin/spoof-mac.py|`which spoof-mac.py`|" | tee local.macspoof.plist
# Copy file to the OS X launchd folder
sudo cp local.macspoof.plist /Library/LaunchDaemons
# Set file permissions
cd /Library/LaunchDaemons
sudo chown root:wheel local.macspoof.plist
sudo chmod 0644 local.macspoof.plist
Finally, restart your computer and verify that your MAC address has been modified with the following command via the terminal: $ spoof-mac list --wifi
.
$ scutil --get HostName
$ scutil --get LocalHostName
$ scutil --get ComputerName
sudo scutil --set ComputerName <new name>
sudo scutil --set HostName <new host name>
sudo scutil --set LocalHostName <new local host name>
After the scutil
commands you should run dscacheutil -flushcache
to help make the changes take effect.
Allegedly the following will help:
sudo launchctl disable system/netbiosd
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.netbiosd.plist
$ sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist NoMulticastAdvertisements -bool YES
Verify that Bonjour multicast advertising has been disabled:
$ /usr/bin/sudo /usr/bin/defaults read /Library/Preferences/com.apple.mDNSResponder | /usr/bin/grep NoMulticastAdvertisements
If an error is returned, nothing is returned, or "NoMulticastAdvertisements" is not set to "1", this is a finding. source
$ sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.captive.control.plist Active -bool false
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -quiet -deactivate -stop
https://support.apple.com/en-sg/guide/mac-help/mh32356/mac
$ sudo defaults write NSGlobalDomain WebAutomaticSpellingCorrectionEnabled -bool false
https://github.com/usnistgov/macos_security
https://github.com/usnistgov/macos_security/blob/main/rules/os/os_messages_app_disable.yaml
Should you stumble upon this gist and find it useful or have suggestions, please feel free to email me.