Last active
January 15, 2023 05:19
-
-
Save peddamat/598407456f32c46eb2fc6982eaae073b to your computer and use it in GitHub Desktop.
mitm setup using hostapd in kali
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on: https://mirzafahad.github.io/2021-03-07-wifi-rouge-access-point-part3/ | |
sudo apt-get update && sudo apt-get install hostapd bridge-utils | |
mkdir conf | |
cat > conf/wifi_ap.config <<EOF | |
interface=wlan0 | |
bridge=br0 | |
driver=nl80211 | |
hw_mode=g | |
ssid=WifiTest | |
channel=1 | |
EOF | |
sudo brctl addbr br0 | |
sudo brctl addif br0 eth0 | |
sudo ifconfig br0 up | |
brctl show | |
sudo /etc/init.d/networking stop | |
sudo ifconfig eth0 down | |
sudo ifconfig wlan0 down | |
sudo ifconfig br0 up | |
sudo ifconfig eth0 up | |
sudo hostapd -d conf/wifi_ap.config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment