什么是UAC
UAC实例
可以看到,我sessions
有4个,我先进入到一个不是系统权限的session:
hashdunm
失败,这就是权限问题,我们没有用管理员权限运行!
我们来到肉鸡这里,右键以管理员权限运行就会弹出这个:
而这个就是UAC
!
而如果我们用了管理员权限
运行,这个时候就可以hashdump
了:
有的你运行一个软件它会弹出一个框框问你是否要运行:
如果你点击确认/是的话,那么你就过了UAC
的权限!这个时候就可以进行一个真正的管理员权限的操作!
UAC是如何运作的
一旦程序执⾏涉及系统更改
/特定任务
就会触发UAC。除非尝试执行他们的进程以管理员权限运行
,否则这些操作都将被阻止。
没有管理员权限将无法执⾏以下操作:
- 注册表修改(如果注册表项位于如HKEY_LOCAL_MACHINE下(因为它影响多个⽤户户),它将是只读的)
- 加载设备驱动程序
- DLL注入
- 修改系统时间(clock)
- 修改⽤户帐户控制设置(通过注册表可以启用/禁用它,但你需要正确的权限才能执行该操作)
- 修改受保护的目录(例如Windows⽂件夹,Program Files)
- 计划任务(例如,以管理员权限自启动)
Bypass-UAC
有的时候我们没有办法以管理员身份来运行我们的程序,只能以普通用户的权限来运行,这个时候怎么来绕过UAC
来用管理员权限运行呢?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | msf5 exploit(multi/handler) > search bypassuac Matching Modules ================ # Name Disclosure Date Rank Check Description - ---- --------------- ---- ----- ----------- 0 exploit/windows/local/bypassuac 2010-12-31 excellent No Windows Escalate UAC Protection Bypass 1 exploit/windows/local/bypassuac_comhijack 1900-01-01 excellent Yes Windows Escalate UAC Protection Bypass (Via COM Handler Hijack) 2 exploit/windows/local/bypassuac_eventvwr 2016-08-15 excellent Yes Windows Escalate UAC Protection Bypass (Via Eventvwr Registry Key) 3 exploit/windows/local/bypassuac_fodhelper 2017-05-12 excellent Yes Windows UAC Protection Bypass (Via FodHelper Registry Key) 4 exploit/windows/local/bypassuac_injection 2010-12-31 excellent No Windows Escalate UAC Protection Bypass (In Memory Injection) 5 exploit/windows/local/bypassuac_injection_winsxs 2017-04-06 excellent No Windows Escalate UAC Protection Bypass (In Memory Injection) abusing WinSXS 6 exploit/windows/local/bypassuac_silentcleanup 2019-02-24 excellent No Windows Escalate UAC Protection Bypass (Via SilentCleanup) 7 exploit/windows/local/bypassuac_sluihijack 2018-01-15 excellent Yes Windows UAC Protection Bypass (Via Slui File Handler Hijack) 8 exploit/windows/local/bypassuac_vbs 2015-08-22 excellent No Windows Escalate UAC Protection Bypass (ScriptHost Vulnerability) 9 exploit/windows/local/bypassuac_windows_store_filesys 2019-08-22 manual Yes Windows 10 UAC Protection Bypass Via Windows Store (WSReset.exe) 10 exploit/windows/local/bypassuac_windows_store_reg 2019-02-19 manual Yes Windows 10 UAC Protection Bypass Via Windows Store (WSReset.exe) and Registry |
我是先把meterpreter
会话放到后台,然后使用这个模块:
show options可以看到他需要设置一个session
,然后run:
这边已经运行成功了!但是我的肉鸡是x64
位的,而这个bypassuac是x86
,所以不能成功执行hashdump
:
但是可以执行创建或者删除用户:
如果目标肉鸡是x86
的话,就可以执行hashdump
以及net user
创建或者删除用户的!
交流群:
微信公众号:
知识星球: