From ac870b757cfa6eeebb48ec40dc26def46204d29b Mon Sep 17 00:00:00 2001
From: r4ulcl
Date: Sat, 10 Feb 2024 00:44:55 +0000
Subject: [PATCH 01/38] Add platform arm
---
.github/workflows/docker-image-aps-dev.yml | 2 +-
.github/workflows/docker-image-aps.yml | 2 +-
.github/workflows/docker-image-clients-dev.yml | 2 +-
.github/workflows/docker-image-clients.yml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
mode change 100644 => 100755 .github/workflows/docker-image-aps-dev.yml
mode change 100644 => 100755 .github/workflows/docker-image-aps.yml
mode change 100644 => 100755 .github/workflows/docker-image-clients-dev.yml
mode change 100644 => 100755 .github/workflows/docker-image-clients.yml
diff --git a/.github/workflows/docker-image-aps-dev.yml b/.github/workflows/docker-image-aps-dev.yml
old mode 100644
new mode 100755
index 3cb84da..350a2f8
--- a/.github/workflows/docker-image-aps-dev.yml
+++ b/.github/workflows/docker-image-aps-dev.yml
@@ -30,6 +30,6 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./APs
- platforms: linux/amd64
+ platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/wifichallengelab-aps:dev
diff --git a/.github/workflows/docker-image-aps.yml b/.github/workflows/docker-image-aps.yml
old mode 100644
new mode 100755
index 55e23dd..ec662b2
--- a/.github/workflows/docker-image-aps.yml
+++ b/.github/workflows/docker-image-aps.yml
@@ -42,7 +42,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./APs
- platforms: linux/amd64
+ platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
\ No newline at end of file
diff --git a/.github/workflows/docker-image-clients-dev.yml b/.github/workflows/docker-image-clients-dev.yml
old mode 100644
new mode 100755
index fb89ab9..5adf986
--- a/.github/workflows/docker-image-clients-dev.yml
+++ b/.github/workflows/docker-image-clients-dev.yml
@@ -29,6 +29,6 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./Clients
- platforms: linux/amd64
+ platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/wifichallengelab-clients:dev
diff --git a/.github/workflows/docker-image-clients.yml b/.github/workflows/docker-image-clients.yml
old mode 100644
new mode 100755
index dd39784..9776379
--- a/.github/workflows/docker-image-clients.yml
+++ b/.github/workflows/docker-image-clients.yml
@@ -42,7 +42,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: ./Clients
- platforms: linux/amd64
+ platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
\ No newline at end of file
From b700137ebd31c8fd08e840c0719d8c8c5918d21b Mon Sep 17 00:00:00 2001
From: r4ulcl
Date: Tue, 13 Feb 2024 00:33:14 +0100
Subject: [PATCH 02/38] Replace docker-compose, add hashcat 6, update openssl
and eaphammer
---
Attacker/installTools.sh | 36 +++++++++++++++++++++++++++++-------
docker-compose.yml | 4 ++--
vagrant/create.sh | 2 +-
vagrant/install.sh | 17 ++++++-----------
4 files changed, 38 insertions(+), 21 deletions(-)
diff --git a/Attacker/installTools.sh b/Attacker/installTools.sh
index 75ebf14..d59b5a6 100644
--- a/Attacker/installTools.sh
+++ b/Attacker/installTools.sh
@@ -5,13 +5,14 @@ if [ "$EUID" -ne 0 ]
exit
fi
+sudo apt-get install curl git -y
+
# Rockyou
cd
curl https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt -s -L | head -n 1000000 > ~/rockyou-top100000.txt
#wget https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt
wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Usernames/top-usernames-shortlist.txt
-
# Hacking tools
FOLDER=`pwd`
TOOLS=$FOLDER/tools
@@ -40,10 +41,11 @@ git clone https://github.com/blackarrowsec/EAP_buster
# OpenSSL 3 for ubuntu
sudo apt-get install build-essential checkinstall zlib1g-dev -y
cd /usr/local/src/
-wget https://www.openssl.org/source/openssl-3.0.2.tar.gz
-sudo tar -xvf openssl-3.0.2.tar.gz
-rm openssl-3.0.2.tar.gz
-cd openssl-3.0.2
+VERSION='openssl-3.2.1'
+wget https://www.openssl.org/source/$VERSION.tar.gz
+tar -xvf $VERSION.tar.gz > /dev/null
+rm $VERSION.tar.gz
+cd $VERSION
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
make
make test
@@ -53,6 +55,14 @@ make install
cd $TOOLS
sudo apt-get install python3-pip sqlitebrowser -y
sudo DEBIAN_FRONTEND=noninteractive apt-get install tshark -y
+sudo apt install pkg-config libcurl4-openssl-dev libssl-dev zlib1g-dev make gcc -y
+
+git clone https://github.com/ZerBea/hcxtools.git
+cd hcxtools
+make
+sudo make install
+cd ..
+
git clone https://github.com/r4ulcl/wifi_db
cd wifi_db
pip3 install -r requirements.txt
@@ -64,7 +74,7 @@ chmod +x pcapFilter.sh
#Eaphhammer
cd $TOOLS
-git clone https://github.com/r4ulcl/eaphammer.git
+git clone https://github.com/s0lst1c3/eaphammer.git
cd eaphammer
for L in `cat kali-dependencies.txt` ; do echo $L; apt-get install $L -y ;done
sudo apt-get install dsniff apache2 -y
@@ -105,8 +115,20 @@ make install
#aircrack
apt-get install aircrack-ng -y
-apt-get install hashcat -y
+# hashcat
+#apt-get install hashcat -y
+sudo apt purge hashcat
+
+wget https://hashcat.net/files/hashcat-6.0.0.7z
+sudo p7zip -d hashcat-*
+cd hashcat-6.0.0/
+sudo cp hashcat.bin /usr/bin/
+sudo ln -s /usr/bin/hashcat.bin /usr/bin/hashcat
+sudo cp -Rv OpenCL/ /usr/bin/
+sudo cp -Rv modules/ /usr/bin/
+sudo cp hashcat.hcstat2 /usr/bin/
+sudo cp hashcat.hctune /usr/bin/
# Creap
cd $TOOLS
diff --git a/docker-compose.yml b/docker-compose.yml
index 52ae509..30f90d2 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -55,7 +55,7 @@ services:
deploy:
resources:
limits:
- cpus: 0.50
+ cpus: "0.50"
memory: 512M
reservations:
memory: 128M
@@ -85,7 +85,7 @@ services:
deploy:
resources:
limits:
- cpus: 0.50
+ cpus: "0.50"
memory: 512M
reservations:
memory: 128M
diff --git a/vagrant/create.sh b/vagrant/create.sh
index 1021f66..6439ed7 100644
--- a/vagrant/create.sh
+++ b/vagrant/create.sh
@@ -7,7 +7,7 @@ HALT=true
OPTION=$1
if [ -z "${OPTION}" ]; then
- echo "Unknown option, only VMware or VirtualBox"
+ echo "Unknown option, only vmware, virtualbox or both"
exit 1
fi
diff --git a/vagrant/install.sh b/vagrant/install.sh
index 35c260b..5a5a085 100644
--- a/vagrant/install.sh
+++ b/vagrant/install.sh
@@ -54,11 +54,6 @@ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubun
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
-## Install docker-compose
-#sudo apt-get install -y docker-compose
-sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
-sudo chmod +x /usr/local/bin/docker-compose
-
# Fix DNS error Docker
sudo apt-get install bridge-utils -y
sudo service docker restart
@@ -91,8 +86,8 @@ sudo apt-get install -y p7zip-full
## Enable docker
cd /var/WiFiChallenge/
-sudo docker-compose -f docker-compose.yml up -d
-#sudo docker-compose -f docker-compose-minimal.yml up -d
+sudo docker compose -f docker-compose.yml up -d
+#sudo docker compose -f docker-compose-minimal.yml up -d
## remove all non-essential programs in an Ubuntu 20 minimal ISO-based Vagrant VM
@@ -118,15 +113,15 @@ echo 'flag{JPTEXm5yEaYouyIEFffEvPjil}' | sudo tee /root/flag.txt
echo '#!/bin/bash
cd /var/WiFiChallenge
-sudo docker-compose restart aps
-sudo docker-compose restart clients' | sudo tee /root/restartWiFi.sh /home/user/restartWiFi.sh
+sudo docker compose restart aps
+sudo docker compose restart clients' | sudo tee /root/restartWiFi.sh /home/user/restartWiFi.sh
chmod +x /root/restartWiFi.sh /home/user/restartWiFi.sh
echo '#!/bin/bash
#Update images from AP and clients
cd /var/WiFiChallenge
-sudo docker-compose pull
-sudo docker-compose up --detach
+sudo docker compose pull
+sudo docker compose up --detach
' | sudo tee /root/updateWiFiChallengeLab.sh /home/user/updateWiFiChallengeLab.sh
chmod +x /root/updateWiFiChallengeLab.sh /home/user/updateWiFiChallengeLab.sh
From 1deb3d3b2c4a59f531418309386a43b634489d76 Mon Sep 17 00:00:00 2001
From: r4ulcl
Date: Mon, 26 Feb 2024 17:26:15 +0000
Subject: [PATCH 03/38] Update README and pcapFilter showing bssid and mac in
certificate
---
Attacker/installTools.sh | 2 +-
README.md | 19 +++++++++++++------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/Attacker/installTools.sh b/Attacker/installTools.sh
index d59b5a6..e070168 100644
--- a/Attacker/installTools.sh
+++ b/Attacker/installTools.sh
@@ -69,7 +69,7 @@ pip3 install -r requirements.txt
# pcapFilter.sh
cd $TOOLS
-wget https://gist.githubusercontent.com/r4ulcl/f3470f097d1cd21dbc5a238883e79fb2/raw/a22ac3095e197dc97745d36ece49bb455fc6d1ae/pcapFilter.sh
+wget https://gist.githubusercontent.com/r4ulcl/f3470f097d1cd21dbc5a238883e79fb2/raw/ad4eae9d435bd0e7c5c643bdb791a12d234d9644/pcapFilter.sh
chmod +x pcapFilter.sh
#Eaphhammer
diff --git a/README.md b/README.md
index db85b18..e9a61e1 100644
--- a/README.md
+++ b/README.md
@@ -7,16 +7,16 @@
-
+
-
+
-
+
-
+
@@ -24,13 +24,20 @@
# WiFiChallengeLab-docker
-
-
[](https://hub.docker.com/r/r4ulcl/wifichallengelab-aps) [](https://hub.docker.com/r/r4ulcl/wifichallengelab-clients)
Docker version of WiFiChallenge Lab with modifications in the challenges and improved stability. Ubuntu virtual machine with virtualized networks and clients to perform WiFi attacks on OPN, WPA2, WPA3 and Enterprise networks.
+
+## CTFd Lab
+
+For direct access to download the VM and complete the challenges go to the CTFd web site:
+
+[WiFiChallenge Lab v2.0](https://wifichallengelab.com/)
+
+
+
## Changelog from version v1.0
The principal changes from version 1.0.5 to 2.0.3 are the following.
From 520eefdb5d372529aee88b0d38e681c364bba397 Mon Sep 17 00:00:00 2001
From: r4ulcl
Date: Wed, 28 Feb 2024 19:39:05 +0100
Subject: [PATCH 04/38] Update pcapFilter.sh, save certs to tmp and print path
---
Attacker/installTools.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Attacker/installTools.sh b/Attacker/installTools.sh
index e070168..42b8a69 100644
--- a/Attacker/installTools.sh
+++ b/Attacker/installTools.sh
@@ -69,7 +69,7 @@ pip3 install -r requirements.txt
# pcapFilter.sh
cd $TOOLS
-wget https://gist.githubusercontent.com/r4ulcl/f3470f097d1cd21dbc5a238883e79fb2/raw/ad4eae9d435bd0e7c5c643bdb791a12d234d9644/pcapFilter.sh
+wget https://gist.githubusercontent.com/r4ulcl/f3470f097d1cd21dbc5a238883e79fb2/raw/6759cb1117569d5a2cb4c5166be76c717c3673e0/pcapFilter.sh
chmod +x pcapFilter.sh
#Eaphhammer
From 262ac7e252620417c01781941e4cac22d20e4369 Mon Sep 17 00:00:00 2001
From: r4ulcl
Date: Thu, 29 Feb 2024 17:27:56 +0100
Subject: [PATCH 05/38] Update nzyme favicon.ico
---
vagrant/install.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vagrant/install.sh b/vagrant/install.sh
index 5a5a085..0c1df9e 100644
--- a/vagrant/install.sh
+++ b/vagrant/install.sh
@@ -141,7 +141,7 @@ sudo cp WiFiChallengeLab.png /opt/background/WiFiChallengeLab.png
# nzyme alerts
sudo apt-get install -y jq
# nzyme icon for alerts
-sudo wget https://v1.nzyme.org/img/favicon.ico -O /opt/background/nzyme.ico
+sudo wget https://www.nzyme.org/favicon.ico -O /opt/background/nzyme.ico
echo '#!/bin/bash
From 23a1bb291645840e0fc8d38ec5aa8fd30a926348 Mon Sep 17 00:00:00 2001
From: r4ulcl
Date: Mon, 1 Apr 2024 22:12:46 +0100
Subject: [PATCH 06/38] Add hyper-v code, untested
---
vagrant/create.sh | 30 +++++++++++++++++++++++++++---
vagrant/vagrantfile | 31 +++++++++++++++++++------------
2 files changed, 46 insertions(+), 15 deletions(-)
diff --git a/vagrant/create.sh b/vagrant/create.sh
index 6439ed7..fef0b6f 100644
--- a/vagrant/create.sh
+++ b/vagrant/create.sh
@@ -48,8 +48,27 @@ elif [ $OPTION == "virtualbox" ]; then
vagrant halt virtualbox_vm
fi
-elif [ $OPTION == "both" ]; then
- echo "both same time"
+elif [ $OPTION == "hyper-v" ]; then
+ echo "hyper-v"
+ if [ "$DESTROY" = true ] ; then
+ vagrant destroy hyper-v_vm --force
+ fi
+ D=`date`
+ echo "$D Start hyper-v_vm " | tee -a hyper-v_vm.log
+ vagrant up hyper-v_vm
+ D=`date`
+ echo "$D Finish hyper-v_vm " | tee -a hyper-v_vm.log
+ # Configure background, etc
+ vagrant halt hyper-v_vm
+ vagrant up hyper-v_vm
+ timeout 30s vagrant ssh hyper-v_vm
+ if [ "$HALT" = true ] ; then
+ vagrant halt hyper-v_vm
+ fi
+
+
+elif [ $OPTION == "all" ]; then
+ echo "all same time"
echo $0
# Start vmware
bash $0 vmware &
@@ -58,12 +77,17 @@ elif [ $OPTION == "both" ]; then
bash $0 virtualbox &
LAST2=$!
+ # Start hyper-v
+ bash $0 hyper-v &
+ LAST3=$!
+
#Wait for them
wait $LAST1
wait $LAST2
+ wait $LAST3
else
- echo "Unknown option, only VMware or VirtualBox or both"
+ echo "Unknown option, only VMware, VirtualBox, hyper-v or all"
exit 1
fi
diff --git a/vagrant/vagrantfile b/vagrant/vagrantfile
index 2caed58..1a1ac25 100644
--- a/vagrant/vagrantfile
+++ b/vagrant/vagrantfile
@@ -1,16 +1,11 @@
VAGRANT_COMMAND = ARGV[0]
Vagrant.configure("2") do |config|
- if VAGRANT_COMMAND == "ssh"
-# config.ssh.username = 'user'
- end
config.vm.define "virtualbox_vm" do |virtualbox_vm|
# Add other configuration options here
- #virtualbox_vm.vm.box = "ubuntu/focal64"
virtualbox_vm.vm.box = "generic/ubuntu2004"
virtualbox_vm.vm.define "WiFiChallengeLab vbox"
- #virtualbox_vm.vm.network "private_network", ip: "192.168.56.10"
virtualbox_vm.vm.hostname = "WiFiChallengeLab"
virtualbox_vm.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
@@ -30,18 +25,30 @@ Vagrant.configure("2") do |config|
vmware_vm.vm.provider "vmware_desktop" do |v|
v.linked_clone = false
v.clone_directory = "/mnt/work/VMWare/"
- end
- #vmware_vm.vm.network "private_network", ip: "192.168.57.10"
- vmware_vm.vm.hostname = "WiFiChallengeLab"
- vmware_vm.vm.provider "vmware_desktop" do |vb|
- vb.memory = "2048"
- vb.cpus = 2
+ v.memory = "2048"
+ v.cpus = 2
#vb.memory = "8192"
#vb.cpus = 8
end
+ #vmware_vm.vm.network "private_network", ip: "192.168.57.10"
+ vmware_vm.vm.hostname = "WiFiChallengeLab"
vmware_vm.vm.provision :shell, path: "./install.sh"
vmware_vm.vm.synced_folder "../", "/media/WiFiChallenge"
+ end
+ config.vm.define "hyper-v_vm" do |hyper_v_vm|
+ # Add other configuration options here
+ hyper_v_vm.vm.box = "generic/ubuntu2004"
+ hyper_v_vm.vm.define "WiFiChallengeLab HyperV"
+ # hyper_v_vm.vm.network "private_network", ip: "192.168.58.10"
+ hyper_v_vm.vm.hostname = "WiFiChallengeLab"
+ hyper_v_vm.vm.vmname = "WiFiChallengeLab"
+ hyper_v_vm.vm.provider "hyperv" do |hv|
+ hv.memory = 2048
+ hv.cpus = 2
+ end
+ hyper_v_vm.vm.provision :shell, path: "./install.sh"
+ hyper_v_vm.vm.synced_folder "../", "/media/WiFiChallenge"
end
-end
+end
From dce77903dc5afe9c1f86a0bc7ffe373ad0b4084e Mon Sep 17 00:00:00 2001
From: r4ulcl
Date: Sat, 13 Apr 2024 19:19:08 +0200
Subject: [PATCH 07/38] Fix indent HTML
---
APs/config/html/index.php | 58 +++++++--------
APs/config/html/lab.php | 10 +--
APs/config/html/login.php | 149 ++++++++++++++++++++-----------------
APs/config/html/logout.php | 8 +-
Attacker/installTools.sh | 9 +--
5 files changed, 125 insertions(+), 109 deletions(-)
diff --git a/APs/config/html/index.php b/APs/config/html/index.php
index 04b4583..fcb85f1 100644
--- a/APs/config/html/index.php
+++ b/APs/config/html/index.php
@@ -1,7 +1,7 @@
@@ -10,15 +10,15 @@
echo "
";
echo "
";
-if ($_SESSION["Username"] == "GLOBAL\GlobalAdmin") {
- if (strpos($_SERVER['REMOTE_ADDR'], '192.168.8.') !== false) { //only TLS
+if ($_SESSION["Username"] == "GLOBAL\GlobalAdmin") {
+ if (strpos($_SERVER['REMOTE_ADDR'], '192.168.8.') !== false) { //only TLS
echo "flag{B7OXb7KhFHQCz6WHUMf2}";
} else {
echo "Your Princess Is in Another Castle!";
}
}
-if ($_SESSION["Username"] == "CONTOSO\Administrator") {
+if ($_SESSION["Username"] == "CONTOSO\Administrator") {
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.5.') !== false) { //only MGT
echo "flag{RgDOC9yrcRHMAKxgK1PJ}";
} else {
@@ -26,26 +26,26 @@
}
}
-if ($_SESSION["Username"] == "admin") {
+if ($_SESSION["Username"] == "admin") {
+
-
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.6.') !== false) { //only MGT Relay
- echo "Hello";
- } elseif (strpos($_SERVER['REMOTE_ADDR'], '192.168.1.') !== false) { //only HIDDEN
+ echo "Hello";
+ } elseif (strpos($_SERVER['REMOTE_ADDR'], '192.168.1.') !== false) { //only HIDDEN
echo "flag{iAYcxpe6N2A98zhglx6E}";
- } elseif (strpos($_SERVER['REMOTE_ADDR'], '192.168.3.') !== false) { //only WPS
+ } elseif (strpos($_SERVER['REMOTE_ADDR'], '192.168.3.') !== false) { //only WPS
echo "flag{KD5TaejRFIDgIQwjgUfB}";
- } elseif (strpos($_SERVER['REMOTE_ADDR'], '192.168.16.') !== false) { //only WPS
+ } elseif (strpos($_SERVER['REMOTE_ADDR'], '192.168.16.') !== false) { //only WPS
echo "flag{W5ri9DXRJZCTBpFFxXBM}";
} else {
- echo "No FLAG, try logging in with another user ;)";
+ echo "No FLAG, try logging in with another user ;)";
}
}
#ALL: and strpos($_SERVER['REMOTE_ADDR'], '192.168.X.') !== false to only use users in each network
-if ($_SESSION["Username"] == "CONTOSO\juan.tr") {
+if ($_SESSION["Username"] == "CONTOSO\juan.tr") {
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.5.') !== false) { //only MGT
echo "flag{hGDSm8oltjM9q217iJYu}";
echo "
";
@@ -54,7 +54,7 @@
}
}
-if ($_SESSION["Username"] == "test1") {
+if ($_SESSION["Username"] == "test1") {
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.2.') !== false) { //only PSK
echo "flag{feL9kV3oMemAJiEDQLBA}";
} else {
@@ -62,7 +62,7 @@
}
}
-if ($_SESSION["Username"] == "test2") {
+if ($_SESSION["Username"] == "test2") {
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.2.') !== false) { //only PSK
echo "flag{feL9kV3oMemAJiEDQLBA}";
} else {
@@ -70,15 +70,15 @@
}
}
-if ($_SESSION["Username"] == "free1") {
- if (strpos($_SERVER['REMOTE_ADDR'], '192.168.10.') !== false) { //only OPN
+if ($_SESSION["Username"] == "free1") {
+ if (strpos($_SERVER['REMOTE_ADDR'], '192.168.10.') !== false) { //only OPN
echo "flag{2VphtQyGxsHmRoxGV05a}";
} else {
echo "Your Princess Is in Another Castle!";
}
}
-if ($_SESSION["Username"] == "free2") {
+if ($_SESSION["Username"] == "free2") {
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.10.') !== false) { //only OPN
echo "flag{2VphtQyGxsHmRoxGV05a}";
} else {
@@ -86,12 +86,12 @@
}
}
-if ($_SESSION["Username"] == "anon1") {
+if ($_SESSION["Username"] == "anon1") {
# NO AP LOGIN
- echo "flag{b7UP2psiy5LJiShuFZGD}";
+ echo "flag{b7UP2psiy5LJiShuFZGD}";
}
-if ($_SESSION["Username"] == "administrator") {
+if ($_SESSION["Username"] == "administrator") {
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.1.') !== false) { //only WEP
echo "flag{g9Ywbxflpye7P0sVAgRQ}";
} else {
@@ -100,13 +100,13 @@
}
#relay user
-if ($_SESSION["Username"] == "CONTOSOREG\luis.da") { # RELAY
- echo "flag{NBLvyxgwckKnyGup6HNj}";
- echo "
";
- echo "
";
+if ($_SESSION["Username"] == "CONTOSOREG\luis.da") { # RELAY
+ echo "flag{NBLvyxgwckKnyGup6HNj}";
+ echo "
";
+ echo "
";
}
-if ($_SESSION["Username"] == "CORPO\god") { # RELAY creds stolen in responder in regional network
+if ($_SESSION["Username"] == "CORPO\god") { # RELAY creds stolen in responder in regional network
if (strpos($_SERVER['REMOTE_ADDR'], '192.168.7.') !== false) { //only WEP
echo "flag{3v1GXNkW0dh3T57ppoP1}";
echo "
";
@@ -125,7 +125,7 @@
# 802.11 Options
ssid=wifi-corp
channel=6
";
- echo "Certificate Authority: http://", $_SERVER['SERVER_ADDR'], "/.internalCA/ ";
+ echo "Certificate Authority: http://", $_SERVER['SERVER_ADDR'], "/.internalCA/ ";
} else {
echo "Your Princess Is in Another Castle!";
}
@@ -138,4 +138,4 @@
echo "
";
?>
-Congratulation! You have logged into password protected page. Click here to Logout.
+Congratulation! You have logged into password protected page. Click here to Logout.
\ No newline at end of file
diff --git a/APs/config/html/lab.php b/APs/config/html/lab.php
index 8849958..b695613 100644
--- a/APs/config/html/lab.php
+++ b/APs/config/html/lab.php
@@ -1,7 +1,7 @@
@@ -12,5 +12,5 @@
?>
-Congratulation! You have logged into password protected page. Click here to go to index.php to get the flag.
-
+Congratulation! You have logged into password protected page. Click here to go to index.php to
+get the flag.
\ No newline at end of file
diff --git a/APs/config/html/login.php b/APs/config/html/login.php
index 2a593b0..0122df9 100644
--- a/APs/config/html/login.php
+++ b/APs/config/html/login.php
@@ -1,34 +1,42 @@
'SuperSuperSecure@!@',
-'CONTOSO\Administrator' => 'SuperSecure@!@',
-'CONTOSO\juan.tr' => 'bulldogs1234',
-'CONTOSOREG\luis.da' => 'u89gh68!6fcv56ed',
-'CORPO\god' => 'tommy1',
-'admin' => 'admin',
-'test1' => 'OYfDcUNQu9PCojb',
-'test2' => '2q60joygCBJQuFo',
-'free1' => 'Jyl1iq8UajZ1fEK',
-'free2' => '5LqwwccmTg6C39y',
-'administrator' => '123456789a',
-'anon1' => 'CRgwj5fZTo1cO6Y');
-
-
-/* Check and assign submitted Username and Password to new variable */$Username = isset($_POST['Username']) ? $_POST['Username'] : '';
-$Password = isset($_POST['Password']) ? $_POST['Password'] : '';
-
-/* Check Username and Password existence in defined array */if (isset($logins[$Username]) && $logins[$Username] == $Password){
-/* Success: Set session variables and redirect to Protected page */$_SESSION['UserData']['Username']=$logins[$Username];
-/* Success: Set session variables USERNAME */$_SESSION['Username']=$Username;
-
-header("location:index.php");
-exit;
-} else {
-/*Unsuccessful attempt: Set error message */$msg="Invalid Login Details";
-}
+/* Check Login form submitted */
+if (isset($_POST['Submit'])) {
+ /* Define username and associated password array */
+ $logins = array(
+ 'GLOBAL\GlobalAdmin' => 'SuperSuperSecure@!@',
+ 'CONTOSO\Administrator' => 'SuperSecure@!@',
+ 'CONTOSO\juan.tr' => 'bulldogs1234',
+ 'CONTOSOREG\luis.da' => 'u89gh68!6fcv56ed',
+ 'CORPO\god' => 'tommy1',
+ 'admin' => 'admin',
+ 'test1' => 'OYfDcUNQu9PCojb',
+ 'test2' => '2q60joygCBJQuFo',
+ 'free1' => 'Jyl1iq8UajZ1fEK',
+ 'free2' => '5LqwwccmTg6C39y',
+ 'administrator' => '123456789a',
+ 'anon1' => 'CRgwj5fZTo1cO6Y'
+ );
+
+
+ /* Check and assign submitted Username and Password to new variable */
+ $Username = isset($_POST['Username']) ? $_POST['Username'] : '';
+ $Password = isset($_POST['Password']) ? $_POST['Password'] : '';
+
+ /* Check Username and Password existence in defined array */
+ if (isset($logins[$Username]) && $logins[$Username] == $Password) {
+ /* Success: Set session variables and redirect to Protected page */
+ $_SESSION['UserData']['Username'] = $logins[$Username];
+ /* Success: Set session variables USERNAME */
+ $_SESSION['Username'] = $Username;
+
+ header("location:index.php");
+ exit;
+ } else {
+ /*Unsuccessful attempt: Set error message */
+ $msg = "Invalid Login Details";
+ }
}
@@ -94,49 +102,54 @@
?>
";
- echo "
";
- echo "flag{NBLvyxgwckKnyGup6HNj}";
- echo "
";
- echo "
";
- }
+# Check IP from CONTOSOREG Relay
+if (strpos($_SERVER['REMOTE_ADDR'], '192.168.7.') !== false) {
+ #relay user
+ echo "
";
+ echo "
";
+ echo "flag{NBLvyxgwckKnyGup6HNj}";
+ echo "
";
+ echo "
";
+}
- # Check IP from CONTOSOREG Tablets Relay
- if (strpos($_SERVER['REMOTE_ADDR'], '192.168.18.') !== false){
- #relay user
- echo "
";
- echo "
";
- echo "flag{gsnyT98GxngXgMPJEIKw}";
- echo "
";
- echo "
";
- }
+# Check IP from CONTOSOREG Tablets Relay
+if (strpos($_SERVER['REMOTE_ADDR'], '192.168.18.') !== false) {
+ #relay user
+ echo "
";
+ echo "
";
+ echo "flag{gsnyT98GxngXgMPJEIKw}";
+ echo "
";
+ echo "
";
+}
?>