Skip to content

Commit

Permalink
Change name of hostapd to avoid airmon-ng check kill, etc and fix hyp…
Browse files Browse the repository at this point in the history
…erv error maxmemory
  • Loading branch information
r4ulcl committed Dec 7, 2024
1 parent 9fbcc0b commit f691421
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions APs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ RUN a2ensite default-ssl.conf
RUN touch /var/run/hostapd_wps_pin_requests


#Change name of wpa_supplicant to avoid airmon-ng check kill, etc
RUN mv /usr/sbin/hostapd /usr/sbin/hostapd_aps
#Change name of hostapd to avoid airmon-ng check kill, etc
RUN mv /usr/sbin/hostapd /usr/sbin/host_aps_apd


COPY config/ns-inet.sh /root/
Expand Down
30 changes: 15 additions & 15 deletions APs/config/startAPs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,62 +94,62 @@ mkdir /root/logs/ 2> /dev/nil

# Open
ip addr add $IP_OPN.1/24 dev $WLAN_OPN
hostapd_aps /root/open/hostapd_open.conf > /root/logs/hostapd_open.log &
host_aps_apd /root/open/hostapd_open.conf > /root/logs/hostapd_open.log &
# opennds
opennds > /root/logs/opennds.log 2>&1

# Open hidden
ip addr add $IP_OPN_HIDDEN.1/24 dev $WLAN_OPN_HIDDEN
hostapd_aps /root/open/hostapd_open_hidden.conf > /root/logs/hostapd_open_hidden.log &
host_aps_apd /root/open/hostapd_open_hidden.conf > /root/logs/hostapd_open_hidden.log &

# PSK
ip addr add $IP_PSK.1/24 dev $WLAN_PSK
hostapd_aps /root/psk/hostapd_wpa.conf > /root/logs/hostapd_wpa.log &
host_aps_apd /root/psk/hostapd_wpa.conf > /root/logs/hostapd_wpa.log &

# MGT
ip addr add $IP_MGT.1/24 dev $WLAN_MGT
hostapd_aps /root/mgt/hostapd_wpe.conf > /root/logs/hostapd_wpe.log &
host_aps_apd /root/mgt/hostapd_wpe.conf > /root/logs/hostapd_wpe.log &
ip addr add $IP_MGT2.1/24 dev $WLAN_MGT2
hostapd_aps /root/mgt/hostapd_wpe2.conf > /root/logs/hostapd_wpe2.log &
host_aps_apd /root/mgt/hostapd_wpe2.conf > /root/logs/hostapd_wpe2.log &

# MGT Relay
ip addr add $IP_MGTRELAY.1/24 dev $WLAN_MGTRELAY
hostapd_aps /root/mgt/hostapd_wpe_relay.conf > /root/logs/hostapd_wpe_relay.log &
host_aps_apd /root/mgt/hostapd_wpe_relay.conf > /root/logs/hostapd_wpe_relay.log &

# MGT Relay tablets
ip addr add $IP_MGTRELAY_TABLETS.1/24 dev $WLAN_MGTRELAY_TABLETS
hostapd_aps /root/mgt/hostapd_wpe_relay_tablets.conf > /root/logs/hostapd_wpe_relay_tablets.log &
host_aps_apd /root/mgt/hostapd_wpe_relay_tablets.conf > /root/logs/hostapd_wpe_relay_tablets.log &

# MGT TLS
ip addr add $IP_MGTTLS.1/24 dev $WLAN_MGTTLS
hostapd_aps /root/mgt/hostapd_wpe_tls.conf > /root/logs/hostapd_wpe_tls.log &
host_aps_apd /root/mgt/hostapd_wpe_tls.conf > /root/logs/hostapd_wpe_tls.log &

#TODO
#ip addr add $IP_8.1/24 dev $WLAN_MGTTLS


# PSK Other
ip addr add $IP_OTHER0.1/24 dev $WLAN_OTHER0
hostapd_aps /root/psk/hostapd_other0.conf > /root/logs/hostapd_other0.log &
host_aps_apd /root/psk/hostapd_other0.conf > /root/logs/hostapd_other0.log &

ip addr add $IP_OTHER1.1/24 dev $WLAN_OTHER1
hostapd_aps /root/psk/hostapd_other1.conf > /root/logs/hostapd_other1.log &
host_aps_apd /root/psk/hostapd_other1.conf > /root/logs/hostapd_other1.log &

ip addr add $IP_OTHER2.1/24 dev $WLAN_OTHER2
hostapd_aps /root/psk/hostapd_other2.conf > /root/logs/hostapd_other2.log &
host_aps_apd /root/psk/hostapd_other2.conf > /root/logs/hostapd_other2.log &

ip addr add $IP_OTHER3.1/24 dev $WLAN_OTHER3
hostapd_aps /root/psk/hostapd_other3.conf > /root/logs/hostapd_other3.log &
host_aps_apd /root/psk/hostapd_other3.conf > /root/logs/hostapd_other3.log &

# WPA3 WPE
ip addr add $IP_BRUTEFORCE.1/24 dev $WLAN_BRUTEFORCE
hostapd_aps /root/wpa3/hostapd_bruteforce.conf > /root/logs/hostapd_bruteforce.log &
host_aps_apd /root/wpa3/hostapd_bruteforce.conf > /root/logs/hostapd_bruteforce.log &

ip addr add $IP_DOWNGRADE.1/24 dev $WLAN_DOWNGRADE
hostapd_aps /root/wpa3/hostapd_downgrade.conf > /root/logs/hostapd_downgrade.log &
host_aps_apd /root/wpa3/hostapd_downgrade.conf > /root/logs/hostapd_downgrade.log &

ip addr add $IP_WEP.1/24 dev $WLAN_WEP
hostapd_aps /root/wep/hostapd_wep.conf > /root/logs/hostapd_wep.log &
host_aps_apd /root/wep/hostapd_wep.conf > /root/logs/hostapd_wep.log &

#ip addr del $IP_190.15/24 dev enp0s3

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- ip netns exec ns-ap /bin/bash -c '
curl -f -s http://localhost/login.php >/dev/null || exit 1;
curl -s http://localhost:8080 >/dev/null || exit 2;
if [ $(ps aux | grep hostapd_aps | grep -v grep | grep -c hostapd_aps) -ne 15 ]; then exit 3; fi'
if [ $(ps aux | grep host_aps_apd | grep -v grep | grep -c host_aps_apd) -ne 15 ]; then exit 3; fi'
interval: 5s
timeout: 5s
retries: 3
Expand Down
1 change: 1 addition & 0 deletions vagrant/vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Vagrant.configure("2") do |config|
hyper_v_vm.vm.hostname = "WiFiChallengeLab"
hyper_v_vm.vm.provider "hyperv" do |hv|
hv.vmname = "WiFiChallenge Lab v2.1"
hv.maxmemory = 4096
hv.memory = 4096
hv.cpus = 4
end
Expand Down

0 comments on commit f691421

Please sign in to comment.