Thông thường một default RID 500 administrator account đều có UAC cao, khi Admin Approval Mode (AAM) bật thì nếu một user mới được add vào admin group thì nó cũng có mức độ UAC trung bình. Ví dụ khi một user trong group đăng nhập vào thì mặc định nó sẽ chỉ có những quyền cơ bản, khi muốn thực hiện quyền cao thì prompt UAC sẽ popup để add thêm quyền vào access token hiện tại của user đó
Tình hướng exploit: 1 service đang stop có thể chạy với quyền SYSTEM và file tại binPath của service đó cho phép bất kỳ user nào thay đổi -> Weak permission on File
C:\htb> sc stop WindscribeService
SERVICE_NAME: WindscribeService
TYPE : 10 WIN32_OWN_PROCESS
STATE : 3 STOP_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x4
WAIT_HINT : 0x0
C:\htb> sc start WindscribeService
[SC] StartService FAILED 1053:
The service did not respond to the start or control request in a timely fashion.
Lợi dụng điều này ta thêm binary vào các thư mục có thể chỉnh sữa để LPE
Searching for unquoted service path
C:\htb> wmic service get name,displayname,pathname,startmode |findstr /i "auto" | findstr /i /v "c:\windows\\" | findstr /i /v """
GVFS.Service GVFS.Service C:\Program Files\GVFS\GVFS.Service.exe Auto
System Explorer Service SystemExplorerHelpService C:\Program Files (x86)\System Explorer\service\SystemExplorerService64.exe Auto
WindscribeService
Permissive Registry ACLs
Tương tự ý tưởng với weak service acls mà lần này ta sẽ exploit trên reg
Check xem phiên bản windows update cái gì thông qua HotFixID
Vulnerable Application
Recon các ứng dụng cài đặt trên máy
C:\htb> wmic product get name
Name
Microsoft Visual C++ 2019 X64 Minimum Runtime - 14.28.29910
Update for Windows 10 for x64-based Systems (KB4023057)
Microsoft Visual C++ 2019 X86 Additional Runtime - 14.24.28127
VMware Tools
Druva inSync 6.6.3
Microsoft Update Health Tools
Microsoft Visual C++ 2019 X64 Additional Runtime - 14.28.29910
Update for Windows 10 for x64-based Systems (KB4480730)
Microsoft Visual C++ 2019 X86 Minimum Runtime - 14.24.28127