Skip to content

Commit

Permalink
Finish mdk decloak method
Browse files Browse the repository at this point in the history
  • Loading branch information
v1s1t0r1sh3r3 committed Nov 22, 2024
1 parent d04e9b4 commit 52a41ca
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- Standardize xterm parameters and adjust some colors to override the system's default settings
- Fixed bug parsing version number for newer hcxdumptool versions
- Added WEP besside-ng attack
- Added network decloaking feature
- Added network decloaking feature using two methods
- Changed third available DoS attack (out of DoS attacks menu)
- Fix auto-update check from Docker

Expand Down
64 changes: 62 additions & 2 deletions airgeddon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5968,6 +5968,7 @@ function clean_tmpfiles() {
rm -rf "${tmpdir}wep.cap" > /dev/null 2>&1
rm -rf "${tmpdir}wps.cap" > /dev/null 2>&1
rm -rf "${tmpdir}besside.log" > /dev/null 2>&1
rm -rf "${tmpdir}decloak.log" > /dev/null 2>&1
fi

if [ "${dhcpd_path_changed}" -eq 1 ]; then
Expand Down Expand Up @@ -7852,6 +7853,29 @@ function check_valid_file_to_clean() {
return 0
}

#Check if an essid is present on the mdk3/mdk4 log file to know if it is decloaked for that bssid
function check_essid_in_mdk_decloak_log() {

debug_print

local regexp
if [ "${AIRGEDDON_MDK_VERSION}" = "mdk3" ]; then
if ! grep -q "End of SSID list reached" "${tmpdir}decloak.log"; then
regexp='SSID:[[:blank:]]\"([^\"]+)\"'
[[ $(grep "${bssid}" "${tmpdir}decloak.log") =~ ${regexp} ]] && essid="${BASH_REMATCH[1]}"
fi
else
regexp="Probe[[:blank:]]Response[[:blank:]]from[[:blank:]]target[[:blank:]]AP[[:blank:]]with[[:blank:]]SSID[[:blank:]]+([^[:blank:]]+.*[^[:blank:]]|[^[:blank:]])"
[[ $(grep -m 1 "Probe Response from target AP with SSID" "${tmpdir}decloak.log") =~ ${regexp} ]] && essid="${BASH_REMATCH[1]}"
fi

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

#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() {

Expand Down Expand Up @@ -12717,8 +12741,44 @@ function decloak_prequisites() {
if [ "${1}" = "deauth" ]; then
dos_handshake_decloaking_menu "decloak"
else
#TODO decloak by dictionary
under_construction_message
manage_asking_for_dictionary_file

echo
language_strings "${language}" 737 "blue"
language_strings "${language}" 115 "read"

exec_decloak_by_dictionary
fi
}

#Execute mdk decloak by dictionary
function exec_decloak_by_dictionary() {

debug_print

iw "${interface}" set channel "${channel}" > /dev/null 2>&1

local unbuffer
unbuffer=""
if [ "${AIRGEDDON_MDK_VERSION}" = "mdk3" ]; then
unbuffer="stdbuf -i0 -o0 -e0 "
fi

rm -rf "${tmpdir}decloak.log" > /dev/null 2>&1
recalculate_windows_sizes
manage_output "+j -bg \"#000000\" -fg \"#FFFF00\" -geometry ${g1_topright_window} -T \"decloack by dictionary\"" "${unbuffer}${mdk_command} ${interface} p -t ${bssid} -f ${DICTIONARY} | tee ${tmpdir}decloak.log ${colorize}" "decloack by dictionary" "active"
wait_for_process "${unbuffer}${mdk_command} ${interface} p -t ${bssid} -f ${DICTIONARY}" "decloack by dictionary"

if check_essid_in_mdk_decloak_log; then
echo
language_strings "${language}" 162 "yellow"
echo
language_strings "${language}" 736 "blue"
language_strings "${language}" 115 "read"
else
echo
language_strings "${language}" 738 "red"
language_strings "${language}" 115 "read"
fi
}

Expand Down
28 changes: 28 additions & 0 deletions language_strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11378,6 +11378,34 @@ function initialize_language_strings() {
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}"

arr["ENGLISH",737]="The decloak is about to start. All words in the dictionary will be tested as possible ESSIDs of the target hidden network"
arr["SPANISH",737]="Va a comenzar el decloak. Se probarán todas las palabras del diccionario como posible ESSID de la red oculta objetivo"
arr["FRENCH",737]="\${pending_of_translation} Le decloak va commencer. Tous les mots du dictionnaire seront testés comme ESSID possible du réseau caché cible"
arr["CATALAN",737]="\${pending_of_translation} Va començar el decloak. Es provaran totes les paraules del diccionari com a possible ESSID de la xarxa oculta objectiu"
arr["PORTUGUESE",737]="\${pending_of_translation} A decloak vai começar. Todas as palavras do dicionário serão testadas como possíveis ESSID da rede oculta de destino"
arr["RUSSIAN",737]="\${pending_of_translation} Начнется деклоак. Все слова в словаре будут проверены на наличие ESSID целевой скрытой сети"
arr["GREEK",737]="\${pending_of_translation} Το ντεκολτέ πρόκειται να ξεκινήσει. Όλες οι λέξεις στο λεξικό θα ελεγχθούν ως πιθανό ESSID του κρυφού δικτύου προορισμού"
arr["ITALIAN",737]="\${pending_of_translation} Il decloak sta per iniziare. Tutte le parole nel dizionario verranno testate come possibile ESSID della rete nascosta di destinazione"
arr["POLISH",737]="\${pending_of_translation} Rozpocznie się demaskowanie. Wszystkie słowa w słowniku zostaną przetestowane pod kątem możliwego identyfikatora ESSID docelowej sieci ukrytej"
arr["GERMAN",737]="\${pending_of_translation} Die Enttarnung wird beginnen. Alle Wörter im Wörterbuch werden als mögliche ESSID des versteckten Zielnetzwerks getestet"
arr["TURKISH",737]="\${pending_of_translation} Gizlenme başlayacak. Sözlükteki tüm kelimeler, hedef gizli ağın mümkün olan ESSID'si açısından test edilecektir"
arr["ARABIC",737]="\${pending_of_translation} سيبدأ فك العباءة. سيتم اختبار جميع الكلمات الموجودة في القاموس على أنها ESSID للشبكة المخفية المستهدفة"
arr["CHINESE",737]="\${pending_of_translation} 揭开斗篷即将开始。字典中的所有单词将作为目标隐藏网络的可能 ESSID 进行测试"

arr["ENGLISH",738]="It seems we didn't succeed... please try again with another dictionary or try another type of decloak"
arr["SPANISH",738]="Parece que no lo hemos conseguido... inténtalo de nuevo con otro diccionario o prueba otro tipo de decloak"
arr["FRENCH",738]="\${pending_of_translation} Il semble que nous n'ayons pas réussi... réessayez avec un autre dictionnaire ou essayez un autre type de decloak"
arr["CATALAN",738]="\${pending_of_translation} Sembla que no ho hem aconseguit... torna a intentar-ho amb un altre diccionari o prova un altre tipus de decloak"
arr["PORTUGUESE",738]="\${pending_of_translation} Parece que não conseguimos... tente novamente com outro dicionário ou tente outro tipo de decloak"
arr["RUSSIAN",738]="\${pending_of_translation} Кажется, нам это не удалось... попробуйте еще раз с другим словарем или попробуйте другой тип деклоака."
arr["GREEK",738]="\${pending_of_translation} Φαίνεται ότι δεν τα καταφέραμε... δοκιμάστε ξανά με άλλο λεξικό ή δοκιμάστε άλλο τύπο decloak"
arr["ITALIAN",738]="\${pending_of_translation} Sembra che non ci siamo riusciti... riprova con un altro dizionario o prova un altro tipo di decloak"
arr["POLISH",738]="\${pending_of_translation} Wygląda na to, że nam się nie udało... spróbuj ponownie, korzystając z innego słownika lub spróbuj innego rodzaju decloak"
arr["GERMAN",738]="\${pending_of_translation} Anscheinend ist uns das nicht gelungen... Versuchen Sie es erneut mit einem anderen Wörterbuch oder versuchen Sie es mit einer anderen Art der Enttarnung"
arr["TURKISH",738]="\${pending_of_translation} Görünüşe göre başaramadık... başka bir sözlükle tekrar deneyin veya başka bir tür gizlemeyi deneyin"
arr["ARABIC",738]="\${pending_of_translation} يبدو أننا لم ننجح... حاول مرة أخرى باستخدام قاموس آخر أو حاول نوعًا آخر من فك الحماية"
arr["CHINESE",738]="\${pending_of_translation} 看来我们还没有成功... 用另一本字典重试或尝试其他类型的 decloak"
}

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

0 comments on commit 52a41ca

Please sign in to comment.