Skip to content

Instantly share code, notes, and snippets.

@peddamat
Last active January 15, 2023 05:19
Show Gist options
  • Save peddamat/598407456f32c46eb2fc6982eaae073b to your computer and use it in GitHub Desktop.
Save peddamat/598407456f32c46eb2fc6982eaae073b to your computer and use it in GitHub Desktop.
mitm setup using hostapd in kali
#!/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