diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d3e0d0ae..365ab7cb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### 11.02 + - Fixed minor bug in minimum length setting while bruteforcing using hashcat + - Improvement hashcat use forcing it to use -m 22000 instead of old -m 2500 over handshakes cracking for hashcat modern versions + - Added WSL/WSL2 detection to force exit due to incompatibility + - Extended compatibility to use lspci 3.8 not accepting 0x + - Fixed error showing connected clients in Evil Twin captive portal attack + ### 11.01 - Fixed busy ports checks - Added PIN to WPS trophy file diff --git a/README.md b/README.md index 0bf1590ef..7e9c23a47 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ All the needed info about how to "install | use | enjoy" `airgeddon` is present [Hat Tip To]: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Hat%20Tip%20To [Inspiration]: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Inspiration -[Version-shield]: https://img.shields.io/badge/version-11.01-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" +[Version-shield]: https://img.shields.io/badge/version-11.02-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" [Bash4.2-shield]: https://img.shields.io/badge/bash-4.2%2B-blue.svg?style=flat-square&colorA=273133&colorB=00db00 "Bash 4.2 or later" [License-shield]: https://img.shields.io/badge/license-GPL%20v3%2B-blue.svg?style=flat-square&colorA=273133&colorB=bd0000 "GPL v3+" [Docker-shield]: https://img.shields.io/docker/cloud/automated/v1s1t0r1sh3r3/airgeddon.svg?style=flat-square&colorA=273133&colorB=a9a9a9 "Docker rules!" diff --git a/airgeddon.sh b/airgeddon.sh index db025f0f5..b3f0c54e1 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,7 +2,7 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Version......: 11.01 +#Version......: 11.02 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -130,8 +130,8 @@ declare -A possible_alias_names=( ) #General vars -airgeddon_version="11.01" -language_strings_expected_version="11.01-1" +airgeddon_version="11.02" +language_strings_expected_version="11.02-1" standardhandshake_filename="handshake-01.cap" standardpmkid_filename="pmkid_hash.txt" standardpmkidcap_filename="pmkid.cap" @@ -172,6 +172,9 @@ hashcat4_version="4.0.0" hashcat_hccapx_version="3.40" minimum_hashcat_pmkid_version="6.0.0" hashcat_2500_deprecated_version="6.2.4" +hashcat_handshake_cracking_plugin="2500" +hashcat_pmkid_cracking_plugin="22000" +hashcat_enterprise_cracking_plugin="5500" hashcat_tmp_simple_name_file="hctmp" hashcat_tmp_file="${hashcat_tmp_simple_name_file}.hccap" hashcat_pot_tmp="${hashcat_tmp_simple_name_file}.pot" @@ -343,6 +346,10 @@ known_compatible_distros=( "Manjaro" ) +known_incompatible_distros=( + "Microsoft" + ) + known_arm_compatible_distros=( "Raspbian" "Parrot arm" @@ -2368,7 +2375,7 @@ function set_chipset() { elif [[ "${bus_type}" =~ pci|ssb|bcma|pcmcia ]]; then if [[ -f /sys/class/net/${1}/device/vendor ]] && [[ -f /sys/class/net/${1}/device/device ]]; then - vendor_and_device=$(cat "/sys/class/net/${1}/device/vendor"):$(cat "/sys/class/net/${1}/device/device") + vendor_and_device=$(sed -e 's/0x//' "/sys/class/net/${1}/device/vendor"):$(sed -e 's/0x//' "/sys/class/net/${1}/device/device") if [[ -n "${2}" ]] && [[ "${2}" = "read_only" ]]; then requested_chipset=$(lspci -d "${vendor_and_device}" | head -n 1 | cut -f 3 -d ":" | sed -e "${sedruleall}") else @@ -4134,7 +4141,7 @@ function set_wep_script() { wep_aircrack_pid_alive=$(ps uax | awk '{print $2}' | grep -E "^${wep_aircrack_pid}$" 2> /dev/null) if [[ -z "${wep_aircrack_pid_alive}" ]] && [[ ${wep_aircrack_launched} -eq 1 ]]; then break - elif [ -z "${wep_capture_pid_alive}" ]; then + elif [[ -z "${wep_capture_pid_alive}" ]]; then break fi done @@ -7601,7 +7608,7 @@ function aircrack_bruteforce_attack_option() { return fi - set_minlength_and_maxlength "personal" + set_minlength_and_maxlength "personal_handshake" charset_option=0 while [[ ! ${charset_option} =~ ^[[:digit:]]+$ ]] || (( charset_option < 1 || charset_option > 11 )); do @@ -8495,7 +8502,7 @@ function set_minlength() { debug_print local regexp - if [ "${1}" = "personal" ]; then + if [[ "${1}" = "personal_handshake" ]] || [[ "${1}" = "personal_pmkid" ]]; then regexp="^[8-9]$|^[1-5][0-9]$|^6[0-3]$" minlength_text=8 else @@ -8517,7 +8524,7 @@ function set_maxlength() { debug_print local regexp - if [ "${1}" = "personal" ]; then + if [[ "${1}" = "personal_handshake" ]] || [[ "${1}" = "personal_pmkid" ]]; then regexp="^[8-9]$|^[1-5][0-9]$|^6[0-3]$" else regexp="^[1-9]$|^[1-5][0-9]$|^6[0-3]$" @@ -8761,15 +8768,15 @@ function exec_hashcat_dictionary_attack() { debug_print if [ "${1}" = "personal_handshake" ]; then - hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}${hashcat_tmp_file}\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix}${hashcat_cmd_fix2} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_handshake_cracking_plugin} -a 0 \"${tmpdir}${hashcat_tmp_file}\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" elif [ "${1}" = "personal_pmkid" ]; then tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 - hashcat_cmd="hashcat -m 22000 -a 0 \"${hashcatpmkidenteredpath}\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_pmkid_cracking_plugin} -a 0 \"${hashcatpmkidenteredpath}\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" else tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 - hashcat_cmd="hashcat -m 5500 -a 0 \"${hashcatenterpriseenteredpath}\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_enterprise_cracking_plugin} -a 0 \"${hashcatenterpriseenteredpath}\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" fi eval "${hashcat_cmd}" language_strings "${language}" 115 "read" @@ -8781,15 +8788,15 @@ function exec_hashcat_bruteforce_attack() { debug_print if [ "${1}" = "personal_handshake" ]; then - hashcat_cmd="hashcat -m 2500 -a 3 \"${tmpdir}${hashcat_tmp_file}\" ${charset} --increment --increment-min=${minlength} --increment-max=${maxlength} --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix}${hashcat_cmd_fix2} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_handshake_cracking_plugin} -a 3 \"${tmpdir}${hashcat_tmp_file}\" ${charset} --increment --increment-min=${minlength} --increment-max=${maxlength} --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" elif [ "${1}" = "personal_pmkid" ]; then tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 - hashcat_cmd="hashcat -m 22000 -a 3 \"${hashcatpmkidenteredpath}\" ${charset} --increment --increment-min=${minlength} --increment-max=${maxlength} --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_pmkid_cracking_plugin} -a 3 \"${hashcatpmkidenteredpath}\" ${charset} --increment --increment-min=${minlength} --increment-max=${maxlength} --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" else tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 - hashcat_cmd="hashcat -m 5500 -a 3 \"${hashcatenterpriseenteredpath}\" ${charset} --increment --increment-min=${minlength} --increment-max=${maxlength} --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_enterprise_cracking_plugin} -a 3 \"${hashcatenterpriseenteredpath}\" ${charset} --increment --increment-min=${minlength} --increment-max=${maxlength} --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" fi eval "${hashcat_cmd}" language_strings "${language}" 115 "read" @@ -8801,15 +8808,15 @@ function exec_hashcat_rulebased_attack() { debug_print if [ "${1}" = "personal_handshake" ]; then - hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}${hashcat_tmp_file}\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix}${hashcat_cmd_fix2} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_handshake_cracking_plugin} -a 0 \"${tmpdir}${hashcat_tmp_file}\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" elif [ "${1}" = "personal_pmkid" ]; then tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 - hashcat_cmd="hashcat -m 22000 -a 0 \"${hashcatpmkidenteredpath}\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_pmkid_cracking_plugin} -a 0 \"${hashcatpmkidenteredpath}\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" else tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 - hashcat_cmd="hashcat -m 5500 -a 0 \"${hashcatenterpriseenteredpath}\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" + hashcat_cmd="hashcat -m ${hashcat_enterprise_cracking_plugin} -a 0 \"${hashcatenterpriseenteredpath}\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}${hashcat_pot_tmp}\"${hashcat_cmd_fix} | tee \"${tmpdir}${hashcat_output_file}\" ${colorize}" fi eval "${hashcat_cmd}" language_strings "${language}" 115 "read" @@ -10590,7 +10597,7 @@ function set_et_control_script() { EOF cat >&7 <<-'EOF' - if [ -z "${DHCPCLIENTS[@]}" ]; then + if [[ -z "${DHCPCLIENTS[@]}" ]]; then EOF cat >&7 <<-EOF @@ -10604,7 +10611,7 @@ function set_et_control_script() { if [[ " ${client_ips[*]} " != *" ${client_ip} "* ]]; then client_hostname="" [[ ${client} =~ .*(\(.+\)).* ]] && client_hostname="${BASH_REMATCH[1]}" - if [ -z "${client_hostname}" ]; then + if [[ -z "${client_hostname}" ]]; then echo -e "\t${client_ip} ${client_mac}" else echo -e "\t${client_ip} ${client_mac} ${client_hostname}" @@ -12632,11 +12639,10 @@ function explore_for_targets_option() { recalculate_windows_sizes manage_output "+j -bg \"#000000\" -fg \"#FFFFFF\" -geometry ${g1_topright_window} -T \"Exploring for targets\"" "airodump-ng -w ${tmpdir}nws${cypher_cmd}${interface} --band ${airodump_band_modifier}" "Exploring for targets" "active" wait_for_process "airodump-ng -w ${tmpdir}nws${cypher_cmd}${interface} --band ${airodump_band_modifier}" "Exploring for targets" - targetline=$(awk '/(^Station[s]?|^Client[es]?)/{print NR}' < "${tmpdir}nws-01.csv") + targetline=$(awk '/(^Station[s]?|^Client[es]?)/{print NR}' "${tmpdir}nws-01.csv" 2> /dev/null) targetline=$((targetline - 1)) - - head -n "${targetline}" "${tmpdir}nws-01.csv" &> "${tmpdir}nws.csv" - tail -n +"${targetline}" "${tmpdir}nws-01.csv" &> "${tmpdir}clts.csv" + head -n "${targetline}" "${tmpdir}nws-01.csv" 2> /dev/null &> "${tmpdir}nws.csv" + tail -n +"${targetline}" "${tmpdir}nws-01.csv" 2> /dev/null &> "${tmpdir}clts.csv" csvline=$(wc -l "${tmpdir}nws.csv" 2> /dev/null | awk '{print $1}') if [ "${csvline}" -le 3 ]; then @@ -13879,7 +13885,7 @@ function set_hashcat_parameters() { fi if compare_floats_greater_or_equal "${hashcat_version}" "${hashcat_2500_deprecated_version}"; then - hashcat_cmd_fix2=" --deprecated-check-disable" + hashcat_handshake_cracking_plugin="22000" fi fi } @@ -14289,6 +14295,13 @@ function detect_distro_phase1() { break fi done + + for i in "${known_incompatible_distros[@]}"; do + if uname -a | grep "${i}" -i > /dev/null; then + distro="${i^}" + break + fi + done } #Second phase of Linux distro detection based on architecture and version file @@ -14564,6 +14577,20 @@ function general_checkings() { exit_script_option } +#Check if system is running under Windows Subsystem for Linux +check_wsl() { + + debug_print + + if [ "${distro}" = "Microsoft" ]; then + echo + language_strings "${language}" 701 "red" + language_strings "${language}" 115 "read" + exit_code=1 + exit_script_option + fi +} + #Check if the user is root function check_root_permissions() { @@ -16234,6 +16261,7 @@ function main() { check_bash_version check_root_permissions + check_wsl if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "xterm" ]; then echo diff --git a/known_pins.db b/known_pins.db index b97b4ec8c..e8030b9d9 100644 --- a/known_pins.db +++ b/known_pins.db @@ -152,7 +152,7 @@ function set_pin_database() { PINDB["17AD1E"]="12345670" PINDB["182861"]="59229933" PINDB["184F32"]="12345670" - PINDB["18A6F7"]="05150960 88767000 75829544 60631596" + PINDB["18A6F7"]="05150960 88767000 75829544 60631596 41176849" PINDB["18D6C7"]="07338526 01742671 09410176 66378617 17075404" PINDB["18F145"]="21143892" PINDB["1915C1"]="12345670" @@ -392,6 +392,7 @@ function set_pin_database() { PINDB["B246FC"]="96799208 18297492 29342273" PINDB["B40C2A"]="75033941" PINDB["B4749F"]="23659391" + PINDB["B4750E"]="92131309" PINDB["B60D75"]="19309972" PINDB["B6B0D6"]="59686873" PINDB["B869F4"]="61596986" @@ -466,7 +467,7 @@ function set_pin_database() { PINDB["E0CB4E"]="62987523 49884388" PINDB["E24136"]="89817841 29612000 19107011 92008601 15763297 18297492 29342273" PINDB["E43ED7"]="29187386 60551085 07281808 78232099 37706937 12345670" - PINDB["E46F13"]="25753257" + PINDB["E46F13"]="25753257 37921309" PINDB["E4C146"]="71537573 10009321 31348034 18794786 15738370 18546774 47415270 63742336 93782302 24248907 63668346 96453780 00000001" PINDB["E82C6D"]="12345670" PINDB["E839DF"]="14309489" @@ -484,7 +485,7 @@ function set_pin_database() { PINDB["EC43F6"]="95076522" PINDB["ECC146"]="71537573" PINDB["EE43F6"]="37074005" - PINDB["F07D68"]="01290141 00927659 10481769 03617984 26016573 68175242 18580754 80968344 51558352 02445908 34463512" + PINDB["F07D68"]="01290141 00927659 10481769 03617984 26016573 68175242 18580754 80968344 51558352 02445908 34463512 96076972" PINDB["F0842F"]="93869577" PINDB["F084C9"]="12345670" PINDB["F43E61"]="12345670 47158382 69382161 18625790" diff --git a/language_strings.sh b/language_strings.sh index b9e6da6bf..82a68283f 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10,7 +10,7 @@ function set_language_strings_version() { debug_print - language_strings_version="11.01-1" + language_strings_version="11.02-1" } #Set different language text strings @@ -10075,6 +10075,19 @@ function initialize_language_strings() { arr["GERMAN",700]="Es scheint, dass der erfasste Handshake nicht ein WPA2-Handshake ist, daher ist es ungültig. Das Netzwerk befindet sich wahrscheinlich im WPA2/WPA3 \"Mixed mode\" und der Client hat WPA3 verwendet. Bitte versuchen Sie es erneut oder warten Sie, bis Clients, die WPA2 verwenden, erscheinen" arr["TURKISH",700]="Yakalanan Handshake WPA2 olmadığı ve dolayısıyla geçersiz olduğu görülüyor. Ağ muhtemelen WPA2/WPA3 \"Mixed mode\" da ve istemci WPA3 kullanıyordu. Lütfen tekrar deneyin veya WPA2 kullanan istemciler olana kadar bekleyin" arr["ARABIC",700]="WPA2 يرجى المحاولة مرة أخرى أو الانتظار حتى يتوفر عملاء يستخدمون .WPA3 و كان العميل يستخدم WPA2/WPA3 \"Mixed mode\" و لهذى هي ليست صالحة للاستخدام. ربما تكون الشبكة في WPA2 يبدو ان المصافحة ليست مصافحة " + + arr["ENGLISH",701]="It has been detected that you are using a version of Linux under Windows (WSL Windows Subsystem for Linux), but airgeddon does not support this type of system" + arr["SPANISH",701]="Se ha detectado que estás utilizando una versión de Linux en Windows (WSL Windows Subsystem for Linux), pero airgeddon no es compatible con este tipo de sistema" + arr["FRENCH",701]="\${pending_of_translation} Il a été détecté que vous utilisez une version de Linux sur Windows (WSL Windows Subsystem for Linux), mais airgeddon ne prend pas en charge ce type de système" + arr["CATALAN",701]="\${pending_of_translation} S'ha detectat que utilitzeu una versió de Linux al Windows (WSL Windows Subsystem for Linux), però airgeddon no és compatible amb aquest tipus de sistema" + arr["PORTUGUESE",701]="\${pending_of_translation} Foi detectado que você está usando uma versão do Linux no Windows (WSL Windows Subsystem for Linux), mas o airgeddon não suporta esse tipo de sistema" + arr["RUSSIAN",701]="\${pending_of_translation} Было обнаружено, что вы используете версию Linux для Windows (WSL Windows Subsystem for Linux), но airgeddon не поддерживает этот тип системы." + arr["GREEK",701]="\${pending_of_translation} Έχει εντοπιστεί ότι χρησιμοποιείτε μια έκδοση του Linux σε Windows (WSL Windows Subsystem for Linux), αλλά το airgeddon δεν υποστηρίζει αυτόν τον τύπο συστήματος" + arr["ITALIAN",701]="\${pending_of_translation} È stato rilevato che stai utilizzando una versione di Linux su Windows (WSL Windows Subsystem for Linux), ma airgeddon non supporta questo tipo di sistema" + arr["POLISH",701]="\${pending_of_translation} Wykryto, że używasz wersji systemu Linux w systemie Windows (WSL Windows Subsystem for Linux), ale airgeddon nie obsługuje tego typu systemu" + arr["GERMAN",701]="\${pending_of_translation} Es wurde festgestellt, dass Sie eine Version von Linux unter Windows (WSL Windows Subsystem for Linux) verwenden, aber airgeddon unterstützt diesen Systemtyp nicht" + arr["TURKISH",701]="\${pending_of_translation} Windows'ta bir Linux sürümü (WSL Windows Subsystem for Linux) kullandığınız tespit edildi, ancak airgeddon bu tür bir sistemi desteklemiyor" + arr["ARABIC",701]="\${pending_of_translation} تم اكتشاف أنك تستخدم إصدارًا من Linux على Windows (WSL Windows Subsystem for Linux) ، لكن airgeddon لا يدعم هذا النوع من النظام" } #Expand escaped variables in language strings with their actual values diff --git a/pindb_checksum.txt b/pindb_checksum.txt index 9ec94fb4e..bc5f09506 100644 --- a/pindb_checksum.txt +++ b/pindb_checksum.txt @@ -1 +1 @@ -c1fa5c816eb13615da9d0d4a2c004159 +ca6c5234b048c90a38761ee0f5016719