marc:linux:hacking
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| marc:linux:hacking [2022/01/06 17:26] – marcv | marc:linux:hacking [2022/01/16 12:40] (current) – [Capturing traffic:] marcv | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== Spoofing Ethernet Mac address: ===== | ===== Spoofing Ethernet Mac address: ===== | ||
| - | To spoof the MAC address of the NIC we can use a // | + | To spoof the MAC address of the NIC we can use a // |
| ==== using ifconfig: ==== | ==== using ifconfig: ==== | ||
| Line 27: | Line 27: | ||
| ip link show interface # to check | ip link show interface # to check | ||
| </ | </ | ||
| + | |||
| + | ===== Capturing traffic: ===== | ||
| + | |||
| + | In order to hack a (wireless) connection we need to be able to sniff the traffic on a network. For this we need the NIC we use to capture all traffic, including traffic for another destination. | ||
| + | |||
| + | < | ||
| + | iwconfig | ||
| + | eth0 no wireless extensions | ||
| + | wlan0 IEEE 802.11 ESSID: | ||
| + | Mode: | ||
| + | ... | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | **Mode: | ||
| + | |||
| + | There are 2 methods of changing the mode to **Monitor** (which captures all traffic) and dependant of the NIC/chipset one of these methods will probably work: | ||
| + | |||
| + | ==== Using iwconfig: ==== | ||
| + | |||
| + | < | ||
| + | ifconfig wlan0 down # bring NIC down | ||
| + | airmon-ng check kill # to stop any running processes using the NIC | ||
| + | |||
| + | Killing these processes: | ||
| + | PID Name | ||
| + | 719 wpa_supplicant | ||
| + | 11318 dhclient | ||
| + | |||
| + | iwconfig wlan0 mode monitor | ||
| + | |||
| + | ifconfig wlan0 up # bring NIC up | ||
| + | |||
| + | iwconfig | ||
| + | eth0 no wireless extensions | ||
| + | wlan0 IEEE 802.11 Mode: | ||
| + | ... | ||
| + | ... | ||
| + | </ | ||
| + | Now the NIC captures all traffic (**Mode: | ||
| + | |||
| + | ==== Using airmon-ng: ==== | ||
| + | |||
| + | < | ||
| + | ifconfig wlan0 down # bring NIC down | ||
| + | airmon-ng check kill # to stop any running processes using the NIC | ||
| + | |||
| + | Killing these processes: | ||
| + | PID Name | ||
| + | 719 wpa_supplicant | ||
| + | 11318 dhclient | ||
| + | |||
| + | airmon-ng start wlan0 # bring wlan0 adapter in //monitor// mode | ||
| + | |||
| + | PHY Interface | ||
| + | phy3 | ||
| + | |||
| + | (mac80211 monitor mode vif enabled for [phy3]wlan0 on [phy3]wlan0mon) | ||
| + | (mac80211 station mode vif disabled for [phy3]wlan0) | ||
| + | iwconfig | ||
| + | eth0 no wireless extensions | ||
| + | wlan0mon | ||
| + | ... | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Now the NIC captures all traffic (**Mode: | ||
| + | **Notice that using airmon-ng a new device (wlan0mon) is created and wlan0 no longer exists. Also we do not need to bring the interface up manually. | ||
marc/linux/hacking.1641486417.txt.gz · Last modified: (external edit)
