-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Channel hopping/setting no longer works on macOS Sonoma 14.4.1+ due to airport being deprecated
Environment
- Bettercap version: v2.32.0 (built for darwin arm64 with go1.21.1)
- OS version and architecture: macOS Sonoma 14.4.1 / ARM64
Steps to Reproduce
NOTE: assumes the last channel set was anything other than the channel used in this example (6) as this is to show that channels cannot be changed.
- Start
bettercapwith proper interface
sudo ./bettercap -iface en0 - Set the wireless channel to 6
wifi.recon.channel 6- Start wireless recon
wifi.recon onExpected behavior: Channel should be set to '6'
Actual behavior: The channel is not changed to '6' and is still on the previous channel (in my example '1')

Analysis
net_darwin.go for macOS systems relies on the use of airport command to set the interface's channel.
As of macOS Sonoma 14.4.1 the airport command has been deprecated, is none-functional, and will only return a warning when attempting to run any commands.
The command used to set an interface's channel via this line
Example:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -c6
will now not change the interface's channel and will instead only return the warning message:
WARNING: The airport command line tool is deprecated and will be removed in a future release.
For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.