diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db66b038..1ec9d714b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### 9.11 + - Fixed error shown on enterprise attacks for some wifi cards + - Fixed BeEF error due forced config file changes on BeEF 0.4.7.1 and 0.4.7.2 versions + - Added ipv6 support for BeEF + - Options .airgeddonrc file now also updated on automatic update keeping user's preferences + ### 9.10 - Mdk3 replaced by Mdk4 - Fixed some minor bugs on enterprise plain text captured password process diff --git a/Dockerfile b/Dockerfile index 00552fe89..3837ec251 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ #airgeddon Dockerfile #Base image -FROM kalilinux/kali-linux-docker:latest +FROM parrotsec/parrot:latest #Credits & Data LABEL \ @@ -15,10 +15,6 @@ ENV AIRGEDDON_URL="https://github.com/v1s1t0r1sh3r3/airgeddon.git" ENV HASHCAT2_URL="https://github.com/v1s1t0r1sh3r3/hashcat2.0.git" ENV BETTERCAP162_URL="https://github.com/v1s1t0r1sh3r3/bettercap1.6.2.git" ENV DEBIAN_FRONTEND="noninteractive" -ENV KALI_REPOSITORY="http://kali.download/kali" - -#Fix some problems with Kali repositories -RUN echo "deb ${KALI_REPOSITORY} kali-rolling main contrib non-free" > /etc/apt/sources.list #Update system RUN apt update @@ -76,6 +72,7 @@ RUN \ hostapd \ lighttpd \ iptables \ + nftables \ ettercap-text-only \ sslstrip \ isc-dhcp-server \ diff --git a/README.md b/README.md index 6b1edb9cd..34a9e57cf 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,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-9.10-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" +[Version-shield]: https://img.shields.io/badge/version-9.11-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/automated/v1s1t0r1sh3r3/airgeddon.svg?style=flat-square&colorA=273133&colorB=f9ff5a "Docker rules!" diff --git a/airgeddon.sh b/airgeddon.sh index 732253f61..e41aee58a 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,8 +2,8 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20190317 -#Version......: 9.10 +#Date.........: 20190412 +#Version......: 9.11 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -110,8 +110,8 @@ declare -A possible_alias_names=( ) #General vars -airgeddon_version="9.10" -language_strings_expected_version="9.10-1" +airgeddon_version="9.11" +language_strings_expected_version="9.11-1" standardhandshake_filename="handshake-01.cap" timeout_capture_handshake="20" tmpdir="/tmp/" @@ -165,7 +165,7 @@ wep_key_handler="ag.wep_key_handler.sh" wep_processes_file="wep_processes" #Docker vars -docker_based_distro="Kali" +docker_based_distro="Parrot" docker_io_dir="/io" #WPS vars @@ -192,6 +192,7 @@ urlscript_directlink="https://raw.githubusercontent.com/${github_user}/${github_ urlscript_pins_dbfile="https://raw.githubusercontent.com/${github_user}/${github_repository}/${branch}/${known_pins_dbfile}" urlscript_pins_dbfile_checksum="https://raw.githubusercontent.com/${github_user}/${github_repository}/${branch}/${pins_dbfile_checksum}" urlscript_language_strings_file="https://raw.githubusercontent.com/${github_user}/${github_repository}/${branch}/${language_strings_file}" +urlscript_options_config_file="https://raw.githubusercontent.com/${github_user}/${github_repository}/${branch}/${rc_file}" urlgithub_wiki="https://${repository_hostname}/${github_user}/${github_repository}/wiki" mail="v1s1t0r.1s.h3r3@gmail.com" author="v1s1t0r" @@ -211,6 +212,11 @@ std_c_mask="255.255.255.0" ip_mask="255.255.255.255" std_c_mask_cidr="24" ip_mask_cidr="32" +any_mask_cidr="0" +any_ip="0.0.0.0" +any_ipv6="::/0" +loopback_ip="127.0.0.1" +loopback_ipv6="::1/128" routing_tmp_file="ag.iptables_nftables" dhcpd_file="ag.dhcpd.conf" internet_dns1="8.8.8.8" @@ -226,11 +232,13 @@ sslstrip_file="ag.sslstrip.log" ettercap_file="ag.ettercap.log" bettercap_file="ag.bettercap.log" beef_port="3000" -beef_control_panel_url="http://127.0.0.1:${beef_port}/ui/panel" +beef_control_panel_url="http://${loopback_ip}:${beef_port}/ui/panel" jshookfile="hook.js" beef_file="ag.beef.conf" beef_pass="airgeddon" beef_db="beef.db" +beef_default_cfg_file="config.yaml" +beef_needed_brackets_version="0.4.7.2" beef_installation_url="https://github.com/beefproject/beef/wiki/Installation" hostapd_file="ag.hostapd.conf" hostapd_wpe_file="ag.hostapd_wpe.conf" @@ -7279,11 +7287,34 @@ function exec_enterprise_attack() { restore_et_interface else if [ -f "${tmpdir}${enterprisedir}${enterprise_successfile}" ]; then - interface=$(grep -E "^interface=" "${tmpdir}${enterprisedir}returning_vars.txt" | awk -F "=" '{print $2}') - phy_interface=$(grep -E "^phy_interface=" "${tmpdir}${enterprisedir}returning_vars.txt" | awk -F "=" '{print $2}') - current_iface_on_messages=$(grep -E "^current_iface_on_messages=" "${tmpdir}${enterprisedir}returning_vars.txt" | awk -F "=" '{print $2}') - ifacemode=$(grep -E "^ifacemode=" "${tmpdir}${enterprisedir}returning_vars.txt" | awk -F "=" '{print $2}') - rm -rf "${tmpdir}${enterprisedir}returning_vars.txt" > /dev/null 2>&1 + if [ -f "${tmpdir}${enterprisedir}returning_vars.txt" ]; then + + local tmp_interface + tmp_interface=$(grep -E "^interface=" "${tmpdir}${enterprisedir}returning_vars.txt" 2> /dev/null | awk -F "=" '{print $2}') + if [ -n "${tmp_interface}" ]; then + interface="${tmp_interface}" + fi + + local tmp_phy_interface + tmp_phy_interface=$(grep -E "^phy_interface=" "${tmpdir}${enterprisedir}returning_vars.txt" 2> /dev/null | awk -F "=" '{print $2}') + if [ -n "${tmp_phy_interface}" ]; then + phy_interface="${tmp_phy_interface}" + fi + + local tmp_current_iface_on_messages + tmp_current_iface_on_messages=$(grep -E "^current_iface_on_messages=" "${tmpdir}${enterprisedir}returning_vars.txt" 2> /dev/null | awk -F "=" '{print $2}') + if [ -n "${tmp_current_iface_on_messages}" ]; then + current_iface_on_messages="${tmp_current_iface_on_messages}" + fi + + local tmp_ifacemode + tmp_ifacemode=$(grep -E "^ifacemode=" "${tmpdir}${enterprisedir}returning_vars.txt" 2> /dev/null | awk -F "=" '{print $2}') + if [ -n "${tmp_ifacemode}" ]; then + ifacemode="${tmp_ifacemode}" + fi + + rm -rf "${tmpdir}${enterprisedir}returning_vars.txt" > /dev/null 2>&1 + fi else restore_et_interface fi @@ -7479,6 +7510,7 @@ function exec_et_sniffing_sslstrip2_attack() { launch_dhcp_server exec_et_deauth if [ "${beef_found}" -eq 1 ]; then + get_beef_version set_beef_config else new_beef_pass="beef" @@ -9183,10 +9215,24 @@ function set_beef_config() { beef_db_path="${beef_db}" fi + local permitted_ui_subnet + local permitted_ui_ipv6 if compare_floats_greater_or_equal "${bettercap_version}" "${minimum_bettercap_fixed_beef_iptables_issue}"; then - beef_panel_restriction=" permitted_ui_subnet: \"127.0.0.1/32\"" + permitted_ui_subnet="${loopback_ip}/${ip_mask_cidr}" + permitted_ui_ipv6="${loopback_ipv6}" + else + permitted_ui_subnet="${any_ip}/${any_mask_cidr}" + permitted_ui_ipv6="${any_ipv6}" + fi + + local permitted_hooking_subnet + local beef_panel_restriction + if compare_floats_greater_or_equal "${beef_version}" "${beef_needed_brackets_version}"; then + permitted_hooking_subnet=" permitted_hooking_subnet: [\"${et_ip_range}/${std_c_mask_cidr}\", \"${any_ipv6}\"]" + beef_panel_restriction=" permitted_ui_subnet: [\"${permitted_ui_subnet}\", \"${permitted_ui_ipv6}\"]" else - beef_panel_restriction=" permitted_ui_subnet: \"0.0.0.0/0\"" + permitted_hooking_subnet=" permitted_hooking_subnet: \"${et_ip_range}/${std_c_mask_cidr}\"" + beef_panel_restriction=" permitted_ui_subnet: \"${permitted_ui_subnet}\"" fi { @@ -9196,11 +9242,11 @@ function set_beef_config() { echo -e " client_debug: false" echo -e " crypto_default_value_length: 80" echo -e " restrictions:" - echo -e " permitted_hooking_subnet: \"${et_ip_range}/24\"" + echo -e "${permitted_hooking_subnet}" echo -e "${beef_panel_restriction}" echo -e " http:" echo -e " debug: false" - echo -e " host: \"0.0.0.0\"" + echo -e " host: \"${any_ip}\"" echo -e " port: \"${beef_port}\"" echo -e " dns_host: \"localhost\"" echo -e " dns_port: 53" @@ -9250,6 +9296,9 @@ function set_beef_config() { echo -e " enable: false" echo -e " dns_rebinding:" echo -e " enable: false" + echo -e " admin_ui:" + echo -e " enable: true" + echo -e " base_path: \"/ui\"" } >> "${tmpdir}${beef_file}" } @@ -9259,9 +9308,11 @@ function kill_beef() { debug_print local beef_pid - beef_pid="$(ps -C "${optional_tools_names[19]}" --no-headers -o pid | tr -d ' ')" + beef_pid="$(ps -C "${optional_tools_names[19]}" --no-headers -o pid | tr -d ' ')" if ! kill "${beef_pid}" &> /dev/null; then - kill "$(ps -C "beef" --no-headers -o pid | tr -d ' ')" &> /dev/null + if ! kill "$(ps -C "beef" --no-headers -o pid | tr -d ' ')" &> /dev/null; then + kill "$(ps -C "ruby" --no-headers -o pid,cmd | grep "beef" | awk '{print $1}')" &> /dev/null + fi fi } @@ -11792,6 +11843,14 @@ function get_hashcat_version() { hashcat_version=${hashcat_version#"v"} } +#Determine beef version +function get_beef_version() { + + debug_print + + beef_version=$(grep "version" "${beef_path}${beef_default_cfg_file}" 2> /dev/null | grep -oE "[0-9.]+") +} + #Determine bettercap version function get_bettercap_version() { @@ -11799,7 +11858,7 @@ function get_bettercap_version() { bettercap_version=$(bettercap -v 2> /dev/null | grep -E "^bettercap [0-9]" | awk '{print $2}') if [ -z "${bettercap_version}" ]; then - bettercap_version=$(bettercap -eval "q" 2>/dev/null | grep -E "bettercap v[0-9\.]*" | awk '{print $2}') + bettercap_version=$(bettercap -eval "q" 2> /dev/null | grep -E "bettercap v[0-9\.]*" | awk '{print $2}') bettercap_version=${bettercap_version#"v"} fi } @@ -11818,9 +11877,9 @@ function get_reaver_version() { debug_print - reaver_version=$(reaver -h 2>&1 > /dev/null | grep -E "^Reaver v[0-9]" | awk '{print $2}') + reaver_version=$(reaver -h 2>&1 > /dev/null | grep -E "^Reaver v[0-9]" | awk '{print $2}' | grep -Eo "v[0-9\.]+") if [ -z "${reaver_version}" ]; then - reaver_version=$(reaver -h 2> /dev/null | grep -E "^Reaver v[0-9]" | awk '{print $2}') + reaver_version=$(reaver -h 2> /dev/null | grep -E "^Reaver v[0-9]" | awk '{print $2}' | grep -Eo "v[0-9\.]+") fi reaver_version=${reaver_version#"v"} } @@ -11963,6 +12022,59 @@ function check_pins_database_file() { fi } +#Get and write options form options config file +function update_options_config_file() { + + debug_print + + case "${1}" in + "getdata") + readarray -t OPTION_VARS < <(grep "AIRGEDDON_" "${scriptfolder}${rc_file}" 2> /dev/null) + ;; + "writedata") + local option_name + local option_value + for item in "${OPTION_VARS[@]}"; do + option_name="${item%=*}" + option_value="${item#*=}" + if [[ "${ordered_options_env_vars[@]}" =~ ${option_name} ]]; then + sed -ri "s:(${option_name})=(.+):\1=${option_value}:" "${scriptfolder}${rc_file}" 2> /dev/null + fi + done + ;; + esac +} + +#Download the options config file +function download_options_config_file() { + + debug_print + + local options_config_file_downloaded=0 + options_config_file=$(timeout -s SIGTERM 15 curl -L ${urlscript_options_config_file} 2> /dev/null) + + if [[ -n "${options_config_file}" ]] && [[ "${options_config_file}" != "${curl_404_error}" ]]; then + options_config_file_downloaded=1 + else + http_proxy_detect + if [ "${http_proxy_set}" -eq 1 ]; then + + options_config_file=$(timeout -s SIGTERM 15 curl --proxy "${http_proxy}" -L ${urlscript_options_config_file} 2> /dev/null) + if [[ -n "${options_config_file}" ]] && [[ "${options_config_file}" != "${curl_404_error}" ]]; then + options_config_file_downloaded=1 + fi + fi + fi + + if [ "${options_config_file_downloaded}" -eq 1 ]; then + rm -rf "${scriptfolder}${rc_file}" 2> /dev/null + echo "${options_config_file}" > "${scriptfolder}${rc_file}" + return 0 + else + return 1 + fi +} + #Download the pins database file function download_pins_database_file() { @@ -13184,6 +13296,10 @@ function download_last_version() { download_pins_database_file + update_options_config_file "getdata" + download_options_config_file + update_options_config_file "writedata" + echo language_strings "${language}" 214 "yellow" diff --git a/binaries/arch/airgeddon-git-9.10-1-any.pkg.tar.xz b/binaries/arch/airgeddon-git-9.10-1-any.pkg.tar.xz deleted file mode 100644 index 2d86e66c4..000000000 Binary files a/binaries/arch/airgeddon-git-9.10-1-any.pkg.tar.xz and /dev/null differ diff --git a/binaries/arch/airgeddon-git-9.11-1-any.pkg.tar.xz b/binaries/arch/airgeddon-git-9.11-1-any.pkg.tar.xz new file mode 100644 index 000000000..5f2d8c4f1 Binary files /dev/null and b/binaries/arch/airgeddon-git-9.11-1-any.pkg.tar.xz differ diff --git a/binaries/kali/airgeddon_9.10-1_all.deb b/binaries/kali/airgeddon_9.10-1_all.deb deleted file mode 100644 index e0f1cbc67..000000000 Binary files a/binaries/kali/airgeddon_9.10-1_all.deb and /dev/null differ diff --git a/binaries/kali/airgeddon_9.11-1_all.deb b/binaries/kali/airgeddon_9.11-1_all.deb new file mode 100644 index 000000000..ec694444c Binary files /dev/null and b/binaries/kali/airgeddon_9.11-1_all.deb differ diff --git a/language_strings.sh b/language_strings.sh index c0e01add1..fa35143ae 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -2,7 +2,7 @@ #Title........: language_strings.sh #Description..: All the translated strings that airgeddon uses are located here. #Author.......: v1s1t0r -#Date.........: 20190309 +#Date.........: 20190403 #Bash Version.: 4.2 or later #Set language_strings file version @@ -11,7 +11,7 @@ function set_language_strings_version() { debug_print - language_strings_version="9.10-1" + language_strings_version="9.11-1" } #Set different language text strings @@ -4414,17 +4414,17 @@ function language_strings() { arr["GERMAN",296]="Alle Parameter und Anforderungen sind bereit. Der Angriff wird beginnen. Mehrere Fenster werden geöffnet, schließen Sie keines. Wenn Sie den Angriff stoppen möchten, drücken Sie [Enter] in diesem Fenster und das Skript wird automatisch alle schließen" arr["TURKISH",296]="Tüm parametreler ayarlandı. Saldırı başlayacak. Birden fazla pencere açılacak, bunların hiçbirini kapatmayın. Saldırıyı durdurmak istediğiniz zaman aman pencereden [Enter] tuşlamanız yeterli. Yazılım tüm pencereleri kapatacaktır" - arr["ENGLISH",297]="Cleaning iptables and routing rules" - arr["SPANISH",297]="Limpiando iptables y reglas de routing" - arr["FRENCH",297]="Effacement des règles de routage iptables" - arr["CATALAN",297]="Netejant iptables i regles de routing" - arr["PORTUGUESE",297]="Limpando iptables e regras de roteamento" - arr["RUSSIAN",297]="Очистка iptables и правил маршуртизации" - arr["GREEK",297]="Γινεται καθαρισμός των iptables και των κανόνων δρομολόγησης" - arr["ITALIAN",297]="Pulendo iptables e le regole di routing" - arr["POLISH",297]="Usuwanie iptables i reguł routingu" - arr["GERMAN",297]="Reinigung von iptables und Routing-Regeln" - arr["TURKISH",297]="Iptables ve routing rules temizleniyor" + arr["ENGLISH",297]="Cleaning nftables/iptables and routing rules" + arr["SPANISH",297]="Limpiando nftables/iptables y reglas de routing" + arr["FRENCH",297]="Effacement des règles de routage nftables/iptables" + arr["CATALAN",297]="Netejant nftables/iptables i regles de routing" + arr["PORTUGUESE",297]="Limpando nftables/iptables e regras de roteamento" + arr["RUSSIAN",297]="Очистка nftables/iptables и правил маршуртизации" + arr["GREEK",297]="Γινεται καθαρισμός των nftables/iptables και των κανόνων δρομολόγησης" + arr["ITALIAN",297]="Pulendo nftables/iptables e le regole di routing" + arr["POLISH",297]="Usuwanie nftables/iptables i reguł routingu" + arr["GERMAN",297]="Reinigung von nftables/iptables und Routing-Regeln" + arr["TURKISH",297]="Nftables/iptables ve routing rules temizleniyor" arr["ENGLISH",298]="Evil Twin attack has been started. Press [Enter] key on this window to stop it" arr["SPANISH",298]="El ataque Evil Twin ha comenzado. Pulse la tecla [Enter] en esta ventana para pararlo"