To install uac-a-mola you have to perform the following actions:
- 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/
- 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\
- Download uac-a-mola tool from github by downloading the .zip file or by clonning the repo.
- 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
This is a brief section that explains the use of some of the uac-a-mola 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:
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...
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 de ENTER key.
Please report any error to [email protected] or just open an issue in GitHub. Your collaboration is appreciated!