Merge branch 'master' of git://github.com/FluxionNetwork/fluxion into language

This commit is contained in:
Hritik Vijay 2017-11-29 19:25:17 +05:30
commit 25970a9449
4 changed files with 70 additions and 32 deletions

View File

@ -23,22 +23,24 @@ cd fluxion # Switch to tool's directory
3. Hostapd : 1:2.3-2.3 _If you want to compare this type `dpkg -l | grep "name"`_
## :scroll: Changelog
Fluxion gets weekly updates with new features, improvements and bugfixes.
Fluxion gets weekly updates with new features, improvements, and bugfixes.
Be sure to check out the [changelog here](https://github.com/FluxionNetwork/fluxion/commits/master).
## :octocat: How to contribute
All contributions are welcome! Code, documentation, graphics or even design suggestions are welcome; use GitHub to its fullest. Submit pull requests, contribute tutorials or other wiki content -- whatever you have to offer, it would be appreciated!
All contributions are welcome! Code, documentation, graphics, or even design suggestions are welcome; use GitHub to its fullest. Submit pull requests, contribute tutorials or other wiki content -- whatever you have to offer, it'll be appreciated!
## :book: How it works
* Scan the networks.
* Capture a handshake (can't be used without a valid handshake, it's necessary to verify the password)
* Use WEB Interface *
* Launch a FakeAP instance to imitate the original access point
* Spawns a MDK3 process, which deauthenticates all users connected to the target network, so they can be lured to connect to the FakeAP and enter the WPA password.
* A fake DNS server is launched in order to capture all DNS requests and redirect them to the host running the script
* A captive portal is launched in order to serve a page, which prompts the user to enter their WPA password
* Each submitted password is verified by the handshake captured earlier
* The attack will automatically terminate, as soon as a correct password is submitted
* Scan for a target wireless network.
* Launch the `Handshake Snooper` attack.
* Capture a handshake (necessary for password verification).
* Launch `Captive Portal` attack.
* Spawns a rogue (fake) AP, imitating the original access point.
* Spawns a DNS server, redirecting all requests to the attacker's host running the captive portal.
* Spawns a web server, serving the captive portal which prompts users for their WPA/WPA2 key.
* Spawns a jammer, deauthenticating all clients from original AP and lureing them to the rogue AP.
* All authentication attempts at the captive portal are checked against the handshake file captured earlier.
* The attack will automatically terminate once a correct key has been submitted.
* The key will be logged and clients will be allowed to reconnect to the target access point.
* For a guide to the `Captive Portal` attack, read the [Captive Portal attack guide](https://github.com/FluxionNetwork/fluxion/wiki/Captive-Portal-Attack)
@ -63,10 +65,10 @@ For development I use vim and tmux. Here are my [dotfiles](https://github.com/de
## Disclaimer
* Authors do not own the logos under the `/attacks/Captive Portal/sites/` directory. Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research.
* Usage of Fluxion for attacking infrastructures without prior mutual consistency can be considered as an illegal activity. It is the final user's responsibility to obey all applicable local, state and federal laws. Authors assume no liability and are not responsible for any misuse or damage caused by this program.
* The usage of Fluxion for attacking infrastructures without prior mutual consent could be considered an illegal activity, and is highly discouraged by its authors/developers. It is the end user's responsibility to obey all applicable local, state and federal laws. Authors assume no liability and are not responsible for any misuse or damage caused by this program.
## Note
* Be aware of sites pretending to be related with the Fluxion Project. They may be delivering malware.
* Beware of sites pretending to be related with the Fluxion Project. These may be delivering malware.
* Fluxion **DOES NOT WORK** on Linux Subsystem For Windows 10, because the subsystem doesn't allow access to network interfaces. Any Issue regarding the same would be **Closed Immediately**

View File

@ -0,0 +1,27 @@
#!/bin/bash
# identifier: Captive Portal
# description: Vytvorí prístupový bod "zlé dvojča"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
CaptivePortalInterfaceQuery="Vyberte adaptér pre 'captive portal'."
CaptivePortalStartingInterfaceNotice="Spúšťam 'captive portal'..."
CaptivePortalCannotStartInterfaceError="${CRed}Nepodarilo sa spustiť adaptér 'captive portal' $CClr, vraciam sa!"
CaptivePortalStartedInterfaceNotice="${CGrn}Success${CClr}, 'captive portal' adaptér pripravený!"
CaptivePortalStaringAPServiceNotice="Spúšťam službu 'Captive Portal' prístupového bodu..."
CaptivePortalStaringAPRoutesNotice="Spúšťam smerovanie 'Captive Portal' prístupového bodu..."
CaptivePortalStartingDHCPServiceNotice="Spúšťam službu DHCP prístupového bodu ako 'daemon'..."
CaptivePortalStartingDNSServiceNotice="Spúšťam službu DNS prístupového bodu ako 'daemon'..."
CaptivePortalStartingWebServiceNotice="Spúšťam 'captive portal' prístupového bodu ako 'daemon'..."
CaptivePortalStartingJammerServiceNotice="Spúšťam blokovanie prístupového bodu ako 'daemon'..."
CaptivePortalStartingAuthenticatorServiceNotice="Spúšťam autentifikačný skript..."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
CaptivePortalVerificationMethodQuery="Vyberte spôsob overenia hesla"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
CaptivePortalCertificateSourceQuery="Vyberte SSL certifikát pre 'captive portal'"
CaptivePortalCertificateSourceGenerateOption="Vytvoriť SSL certifikát"
CaptivePortalCertificateSourceRescanOption="Detekovať SSL certifikát (${CClr}hľadať znovu$CGry)"
CaptivePortalUIQuery="Vyberte 'captive portal' adaptér pre falošnú sieť (rogue network)"
CaptivePortalGenericInterfaceOption="Všeobecný Portál (generic portal)"
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# FLUXSCRIPT END

View File

@ -8,43 +8,52 @@ HandshakeSnooperState="Not Ready"
function handshake_verifier_daemon() {
if [ ${#@} -lt 5 ]; then return 1; fi
handshakeVerifierState="running"
local handshakeVerifierState="running"
function handle_verifier_abort() {
handshakeVerifierState="aborted"
if [ "$handshakeVerifierXtermPID" ]; then kill $handshakeVerifierXtermPID; fi
}
trap handle_verifier_abort SIGABRT
source lib/HashUtils.sh
touch $FLUXIONWorkspacePath/result.txt
echo "Looking for handshake:" > $FLUXIONWorkspacePath/result.txt
echo "" >> $FLUXIONWorkspacePath/result.txt
source lib/ColorUtils.sh
xterm $FLUXIONHoldXterm $BOTTOMLEFT -bg "#000000" -fg "#FF0000" -title "UI for handshake" -e "while (true);do clear;cat $FLUXIONWorkspacePath/result.txt; sleep 1;done" &
echo "Waiting for handshake data." > $FLUXIONWorkspacePath/result.txt
echo "" >> $FLUXIONWorkspacePath/result.txt
local handshakeCheckResult=1 # Assume invalid
# Display some feedback to the user to assure verifier is working.
xterm $FLUXIONHoldXterm $BOTTOMLEFT -bg "#000000" -fg "#CCCCCC" -title "Handshake Snooper Verifier" -e "while (true); do clear; cat $FLUXIONWorkspacePath/result.txt; sleep 3; done" &
local handshakeVerifierXtermPID=$!
local handshakeCheckResult=1 # Assume invalid initially
while [ $handshakeCheckResult -ne 0 -a "$handshakeVerifierState" = "running" ]; do
echo "[$(date '+%H:%M:%S')] Waiting for valid hash..." >> $FLUXIONWorkspacePath/result.txt
sleep 3
pyrit -r "$4" -o "${4/.cap/-clean.cap}" stripLive
hash_check_handshake "$3" "${4/.cap/-clean.cap}" "${@:5:2}"
handshakeCheckResult=$?
echo -n "." >> $FLUXIONWorkspacePath/result.txt
done
echo "" > $FLUXIONWorkspacePath/result.txt
#sleep 5 && kill $handshakeVerifierXtermPID &
# If handshake didn't pass verification, it was aborted.
if [ $handshakeCheckResult -ne 0 ]; then return 1; fi
if [ $handshakeCheckResult -ne 0 ]; then
echo -e "${CRed}Error${CClr}: No valid handshake found." >> $FLUXIONWorkspacePath/result.txt
return 1
else
echo -e "${CGrn}Success${CClr}: A valid handshake was found!" >> $FLUXIONWorkspacePath/result.txt
fi
# Assure we've got a directory to store hashes into.
local hashDirectory=$(dirname "$2")
if [ ! -d "$hashDirectory" ]; then
mkdir -p "$hashDirectory"
fi
# Custom print for ui
echo "+" >> $FLUXIONWorkspacePath/result.txt
echo "" >> $FLUXIONWorkspacePath/result.txt
echo "Handshake was found !" >> $FLUXIONWorkspacePath/result.txt
# Move handshake to storage if one was acquired.
mv "${4/.cap/-clean.cap}" "$2"
@ -56,7 +65,6 @@ function handshake_verifier_daemon() {
function handshake_stop_verifier() {
if [ "$HANDSHAKEVerifierPID" ]; then
kill -s SIGABRT $HANDSHAKEVerifierPID &> $FLUXIONOutputDevice
killall xterm
fi
HANDSHAKEVerifierPID=""
@ -114,15 +122,16 @@ function handshake_start_captor() {
xterm -hold -title "Handshake Captor (CH $APTargetChannel)" $TOPRIGHT -bg "#000000" -fg "#FFFFFF" -e \
airodump-ng --ignore-negative-one -d $APTargetMAC -w "$FLUXIONWorkspacePath/capture/dump" -c $APTargetChannel -a $WIMonitor &
HANDSHAKECaptorPID=$! # Target the xterm, since we won't need to keep it around.
echo -e "$FLUXIONVLine Captor process is starting, please wait..."
while [ ! "$HANDSHAKECaptorPID" ]; do
#while [ ! "$HANDSHAKECaptorPID" ]; do
# Here, we'll wait for the airodump-ng PID, since we want to leave the xterm open.
# This is because we need to have a method of notifying the user the hash is captured.
# Once the hash is captured, we can terminate the captor and the xterm will freeze.
HANDSHAKECaptorPID=$(ps a | awk '$5~/^airodump-ng/ && $8~/'"$APTargetMAC"'/{print $1}')
sleep 1
done
# HANDSHAKECaptorPID=$(ps a | awk '$5~/^airodump-ng/ && $8~/'"$APTargetMAC"'/{print $1}')
# sleep 1
#done
}
function handshake_unset_method() {

View File

@ -1,6 +1,6 @@
#!/bin/bash
source ../lib/InterfaceUtils.sh
source lib/InterfaceUtils.sh
if [ ! "$1" ]
then echo "Usage ./scripts/diagnostics <wireless_interface>"; exit 1