Skip to content

Commit

Permalink
Finish decloaking by deauthentication option
Browse files Browse the repository at this point in the history
  • Loading branch information
v1s1t0r1sh3r3 committed Nov 18, 2024
1 parent 1fd2717 commit 86f6047
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 6 deletions.
121 changes: 115 additions & 6 deletions airgeddon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3154,6 +3154,30 @@ function ask_timeout() {
language_strings "${language}" 391 "blue"
}

#Handle the proccess of checking decloak capture
function decloak_check() {

debug_print

local time_counter=0
while true; do
sleep 5
if check_essid_in_capture_file "silent"; then
break
fi

time_counter=$((time_counter + 5))
if [ "${time_counter}" -ge "${timeout_capture_handshake_decloak}" ]; then
break
fi
done

kill "${processiddecloak}" &> /dev/null
if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "tmux" ]; then
tmux kill-window -t "${session_name}:Decloaking"
fi
}

#Handle the proccess of checking handshake capture
function handshake_capture_check() {

Expand Down Expand Up @@ -5902,6 +5926,7 @@ function clean_tmpfiles() {
rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1
rm -rf "${tmpdir}target.txt" > /dev/null 2>&1
rm -rf "${tmpdir}handshake"* > /dev/null 2>&1
rm -rf "${tmpdir}decloak"* > /dev/null 2>&1
rm -rf "${tmpdir}pmkid"* > /dev/null 2>&1
rm -rf "${tmpdir}nws"* > /dev/null 2>&1
rm -rf "${tmpdir}clts"* > /dev/null 2>&1
Expand Down Expand Up @@ -7827,6 +7852,37 @@ function check_valid_file_to_clean() {
return 0
}

#Check if an essid is present on a capture file to know if it is decloaked for that bssid
function check_essid_in_capture_file() {

debug_print

while IFS=, read -r exp_bssid _ _ _ _ _ _ _ _ _ _ _ _ exp_essid _; do

chars_bssid=${#exp_bssid}
if [ "${chars_bssid}" -ge 17 ]; then
if [ "${exp_bssid}" = "${bssid}" ]; then
exp_essid="${exp_essid#"${exp_essid%%[![:space:]]*}"}"
exp_essid="${exp_essid%"${exp_essid##*[![:space:]]}"}"
if [[ -n "${exp_essid}" ]] && [[ ${exp_essid} != "" ]]; then
essid="${exp_essid}"
break
fi
fi
fi
done < "${tmpdir}decloak-01.csv"

if [ "${essid}" = "(Hidden Network)" ]; then
return 1
else
if [[ -n "${1}" ]] && [[ "${1}" = "silent" ]]; then
return 2
else
return 0
fi
fi
}

#Check if a bssid is present on a capture file to know if there is a Handshake/PMKID with that bssid
function check_bssid_in_captured_file() {

Expand Down Expand Up @@ -13161,7 +13217,7 @@ function dos_handshake_decloaking_menu() {
else
ask_timeout "capture_handshake_decloak"
if [ "${1}" = "decloak" ]; then
: #TODO
decloak_window
else
capture_handshake_window
fi
Expand All @@ -13176,7 +13232,7 @@ function dos_handshake_decloaking_menu() {
fi
sleeptimeattack=12
if [ "${1}" = "decloak" ]; then
: #TODO
launch_decloak_capture
else
launch_handshake_capture
fi
Expand All @@ -13188,7 +13244,7 @@ function dos_handshake_decloaking_menu() {
else
ask_timeout "capture_handshake_decloak"
if [ "${1}" = "decloak" ]; then
: #TODO
decloak_window
else
capture_handshake_window
fi
Expand All @@ -13202,7 +13258,7 @@ function dos_handshake_decloaking_menu() {
fi
sleeptimeattack=12
if [ "${1}" = "decloak" ]; then
: #TODO
launch_decloak_capture
else
launch_handshake_capture
fi
Expand All @@ -13214,7 +13270,7 @@ function dos_handshake_decloaking_menu() {
else
ask_timeout "capture_handshake_decloak"
if [ "${1}" = "decloak" ]; then
: #TODO
decloak_window
else
capture_handshake_window
fi
Expand All @@ -13227,7 +13283,7 @@ function dos_handshake_decloaking_menu() {
fi
sleeptimeattack=16
if [ "${1}" = "decloak" ]; then
: #TODO
launch_decloak_capture
else
launch_handshake_capture
fi
Expand All @@ -13241,6 +13297,34 @@ function dos_handshake_decloaking_menu() {
dos_handshake_decloaking_menu "${1}"
}

#Decloak capture launcher
function launch_decloak_capture() {

debug_print

if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "xterm" ]; then
processidattack=$!
sleep "${sleeptimeattack}" && kill "${processidattack}" &> /dev/null
else
sleep "${sleeptimeattack}" && kill "${processidattack}" && kill_tmux_windows "Decloaking" &> /dev/null
fi

decloak_check

if check_essid_in_capture_file; then
echo
language_strings "${language}" 162 "yellow"
echo
language_strings "${language}" 736 "blue"
language_strings "${language}" 115 "read"
return_to_handshake_pmkid_decloaking_tools_menu=1
else
echo
language_strings "${language}" 146 "red"
language_strings "${language}" 115 "read"
fi
}

#Handshake capture launcher
function launch_handshake_capture() {

Expand Down Expand Up @@ -13295,6 +13379,31 @@ function is_wpa2_handshake() {
return $?
}

#Launch the Decloak window
function decloak_window() {

debug_print

echo
language_strings "${language}" 734 "blue"
echo
language_strings "${language}" 735 "yellow"
language_strings "${language}" 115 "read"
echo
language_strings "${language}" 325 "blue"

rm -rf "${tmpdir}decloak"* > /dev/null 2>&1
recalculate_windows_sizes
manage_output "+j -bg \"#000000\" -fg \"#FFFFFF\" -geometry ${g1_topright_window} -T \"Decloaking\"" "airodump-ng -c ${channel} -d ${bssid} -w ${tmpdir}decloak ${interface}" "Decloaking" "active"
if [ "${AIRGEDDON_WINDOWS_HANDLING}" = "tmux" ]; then
get_tmux_process_id "airodump-ng -c ${channel} -d ${bssid} -w ${tmpdir}decloak ${interface}"
processiddecloak="${global_process_pid}"
global_process_pid=""
else
processiddecloak=$!
fi
}

#Launch the Handshake capture window
function capture_handshake_window() {

Expand Down
42 changes: 42 additions & 0 deletions language_strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11336,6 +11336,48 @@ function initialize_language_strings() {
arr["TURKISH",733]="\${pending_of_translation} Bir DoS saldırısı işe yaramazsa bunun birçok nedeni olabilir. Bu konuyla ilgili Wiki bölümüne bakmanız önerilir: \${normal_color}\${urlgithub_wiki}/FAQ%20&%20Troubleshooting#dos-deauth-is-not-working-what-can-i-do"
arr["ARABIC",733]="\${pending_of_translation} إذا لم ينجح هجوم DoS، فقد يكون ذلك نتيجة لعدة أسباب. يوصى بالاطلاع على قسم Wiki حول هذا الأمر: \${normal_color}\${urlgithub_wiki}/FAQ%20&%20Troubleshooting#dos-deauth-is-not-working-what-can-i-do"
arr["CHINESE",733]="\${pending_of_translation} 如果 DoS 攻击不起作用,可能有多种原因。建议查看关于此问题的 Wiki 部分:\${normal_color}\${urlgithub_wiki}/FAQ%20&%20Troubleshooting#dos-deauth-is-not-working-what-can-i-do"

arr["ENGLISH",734]="Two windows will be opened. One is used to capture and decloak and another one will stop after a few seconds with the DoS attack to force clients to reconnect"
arr["SPANISH",734]="Se abrirán dos ventanas. Una se utiliza para capturar y hacer el decloak y otra que se detendrá después de unos segundos con el ataque DoS para obligar a los clientes a reconectarse"
arr["FRENCH",734]="\${pending_of_translation} Deux fenêtres s'ouvriront. L'un est utilisé pour capturer et démasquer et un autre qui s'arrêtera après quelques secondes avec l'attaque DoS pour forcer les clients à se reconnecter"
arr["CATALAN",734]="\${pending_of_translation} S'obriran dues finestres. Una s'utilitza per capturar i fer el decloak i una altra que s'aturarà després d'uns segons amb l'atac DoS per obligar els clients a reconnectar-se"
arr["PORTUGUESE",734]="\${pending_of_translation} Duas janelas serão abertas. Um é usado para capturar e descloak e outro que irá parar após alguns segundos com o ataque DoS para forçar os clientes a se reconectarem"
arr["RUSSIAN",734]="\${pending_of_translation} Откроются два окна. Одно используется для захвата для демаскировки, а другое — для DoS-атаки, чтобы заставить клиентов переподключиться, которая прекратится через несколько секунд"
arr["GREEK",734]="\${pending_of_translation} Θα ανοίξουν δύο παράθυρα. Το ένα χρησιμοποιήθηκε για τη λήψη για decloak και άλλο με την επίθεση DoS για να αναγκάσει τους πελάτες να επανασυνδεθούν που θα σταματήσει μετά από λίγα δευτερόλεπτα"
arr["ITALIAN",734]="\${pending_of_translation} Si apriranno due finestre. Uno viene utilizzato per catturare e disoccultare e un altro che si fermerà dopo pochi secondi con l'attacco DoS per costringere i client a riconnettersi"
arr["POLISH",734]="\${pending_of_translation} Zostaną otwarte dwa okna. Jedno używane do przechwytywania w celu decloak i drugie z atakiem DoS, aby zmusić klientów do ponownego połączenia, które zatrzyma się po kilku sekundach"
arr["GERMAN",734]="\${pending_of_translation} Es werden zwei Fenster geöffnet. Eines dient zum Aufzeichnen für die Enttarnung und das andere dient zum DoS-Angriff, um Clients zu zwingen, sich erneut zu verbinden. Dieses Fenster wird nach einigen Sekunden beendet"
arr["TURKISH",734]="\${pending_of_translation} İki pencere açılacak. Biri gizlenmeyi kaldırmak için yakalamada kullanılacak ve diğeri istemcilerin birkaç saniye sonra duracak şekilde yeniden bağlanmasını zorlayacak DoS saldırısıyla"
arr["ARABIC",734]="\${pending_of_translation} سيتم فتح نافذتين. واحدة تستخدم لالتقاط البيانات من أجل إزالة التمويه والأخرى تستخدم لهجوم الحرمان من الخدمة لإجبار العملاء على إعادة الاتصال، والذي سيتوقف بعد بضع ثوانٍ"
arr["CHINESE",734]="\${pending_of_translation} 将打开两个窗口。一个用于捕获以解除隐身,另一个用于 DoS 攻击以强制客户端重新连接,该攻击将在几秒钟后停止"

arr["ENGLISH",735]="Don't close any window manually, the script will do it when appropriate. In about \${timeout} seconds maximum you'll know know if you managed to do the decloak"
arr["SPANISH",735]="No cierres manualmente ninguna ventana, el script lo hará cuando proceda. En unos \${timeout} segundos como máximo sabrás si conseguiste hacer el decloak"
arr["FRENCH",735]="\${pending_of_translation} Ne fermez aucune fenêtre manuellement, le script le fera le cas échéant. Dans quelques \${timeout} secondes au maximum, vous saurez si vous avez réussi à effectuer le decloak"
arr["CATALAN",735]="\${pending_of_translation} No tanquis manualment cap finestra, l'script ho farà quan escaigui. En uns \${timeout} segons com a màxim sabràs si vas aconseguir fer el decloak"
arr["PORTUGUESE",735]="\${pending_of_translation} Não feche manualmente nenhuma janela, o script fará isso quando apropriado. Em alguns \${timeout} segundos no máximo você saberá se conseguiu fazer o decloak"
arr["RUSSIAN",735]="\${pending_of_translation} Не закрывайте окна вручную, скрипт сделает это при необходимости. Максимум через несколько секунд \${timeout} вы узнаете, удалось ли вам выполнить деклоак"
arr["GREEK",735]="\${pending_of_translation} Μην κλείνετε με μη αυτόματο τρόπο κανένα παράθυρο, το σενάριο θα το κάνει όταν χρειάζεται. Σε λίγα \${timeout} δευτερόλεπτα το πολύ θα ξέρετε αν καταφέρατε να κάνετε το decloak"
arr["ITALIAN",735]="\${pending_of_translation} Non chiudere manualmente alcuna finestra, lo script lo farà quando appropriato. In pochi \${timeout} secondi al massimo saprai se sei riuscito a eseguire il decloak"
arr["POLISH",735]="\${pending_of_translation} Nie zamykaj ręcznie żadnych okien, skrypt zrobi to, gdy zajdzie taka potrzeba. Najwyżej za kilka \${timeout} sekund będziesz wiedział, czy udało ci się zdemaskować"
arr["GERMAN",735]="\${pending_of_translation} Schließen Sie keine Fenster manuell, das Skript wird dies bei Bedarf tun. In höchstens ein paar \${timeout} Sekunden werden Sie wissen, ob Ihnen die Enttarnung gelungen ist"
arr["TURKISH",735]="\${pending_of_translation} Hiçbir pencereyi manuel olarak kapatmayın; komut dosyası uygun olduğunda bunu yapacaktır. En fazla birkaç \${timeout} saniye içinde perdeyi kaldırmayı başarıp başaramadığınızı bileceksiniz"
arr["ARABIC",735]="\${pending_of_translation} لا تغلق أي نوافذ يدويًا، فسيقوم البرنامج النصي بذلك عندما يكون ذلك مناسبًا. في غضون \${timeout} ثوانٍ على الأكثر، ستعرف ما إذا كنت قد تمكنت من إلغاء الحماية أم لا"
arr["CHINESE",735]="\${pending_of_translation} 不要手动关闭任何窗口,脚本会在适当的时候执行此操作。最多在几 \${timeout} 秒内你就会知道你是否成功地完成了解密"

arr["ENGLISH",736]="The target hidden network has been successfully decloaked. It is now automatically selected. ESSID: \${normal_color}\${essid}"
arr["SPANISH",736]="Se ha hecho correctamente el decloak a la red oculta objetivo. Ahora se ha seleccionado automáticamente. ESSID: \${normal_color}\${essid}"
arr["FRENCH",736]="\${pending_of_translation} Le réseau masqué cible a été dévoilé avec succès. Il a maintenant été sélectionné automatiquement. ESSID: \${normal_color}\${essid}"
arr["CATALAN",736]="\${pending_of_translation} S'ha fet correctament el decloak a la xarxa amagada objectiu. Ara s'ha seleccionat automàticament. ESSID: \${normal_color}\${essid}"
arr["PORTUGUESE",736]="\${pending_of_translation} A rede oculta alvo foi descloaked com sucesso. Agora foi selecionado automaticamente. ESSID: \${cor_normal}\${essid}"
arr["RUSSIAN",736]="\${pending_of_translation} Целевая скрытая сеть успешно раскрыта. Теперь он выбран автоматически. ESSID: \${normal_color}\${essid}"
arr["GREEK",736]="\${pending_of_translation} Το κρυφό δίκτυο προορισμού αποκαλύφθηκε με επιτυχία. Έχει πλέον επιλεγεί αυτόματα. ESSID: \${normal_color}\${essid}"
arr["ITALIAN",736]="\${pending_of_translation} La rete nascosta di destinazione è stata decloaked con successo. Ora è stato selezionato automaticamente. ESSID: \${normal_color}\${essid}"
arr["POLISH",736]="\${pending_of_translation} Docelowa ukryta sieć została pomyślnie zdemaskowana. Został on teraz wybrany automatycznie. ESSID: \${normal_color}\${essid}"
arr["GERMAN",736]="\${pending_of_translation} Das versteckte Zielnetzwerk wurde erfolgreich enttarnt. Es wurde nun automatisch ausgewählt. ESSID: \${normal_color}\${essid}"
arr["TURKISH",736]="\${pending_of_translation} Hedef gizli ağın perdesi başarıyla kaldırıldı. Artık otomatik olarak seçilmiştir. ESSID: \${normal_color}\${essid}"
arr["ARABIC",736]="\${pending_of_translation} \${normal_color}\${essid} \${blue_color}:تم فك تشفير الشبكة المخفية المستهدفة بنجاح. لقد تم الآن اختياره تلقائيًا. إيسيد"
arr["CHINESE",736]="\${pending_of_translation} 目标隐藏网络已成功解密。现在它已被自动选择。 ESSID:\${normal_color}\${essid}"
}

#Expand escaped variables in language strings with their current values
Expand Down

0 comments on commit 86f6047

Please sign in to comment.