通过系统自带的MSI安装包来提权账号
Windows environments provide a group policy setting which allows a regular user to install a Microsoft Windows Installer Package (MSI) with system privileges. This can be discovered in environments where a standard user wants to install an application which requires system privileges and the administrator would like to avoid to give temporary local administrator access to a user.
From the security point of view this can be abused by an attacker in order to escalate his privileges to the box to SYSTEM.
Identification
Lets assume that we have already compromised a host inside the network and we have a Meterpreter session.

Meterpreter Session – Normal user
The easiest method to determine if this issue exist on the host is to query the following registry keys:
reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated

Query the registry to identify the issue
Privilege Escalation with Metasploit
The easiest and the fastest way to escalate privileges is via the Metasploit Framework which contains a module that can generate an MSI package with a simple payload that it will be executed as SYSTEM on the target host and it will be removed automatically to prevent the installation of being registered with the operating system.

Exploitation of Always Install Elevated with Metasploit
Generate MSI Package with PowerSploit
PowerSploit framework contains a script that can discover whether this issue exist on the host by checking the registry entries and another one that can generate an MSI file that will add a user account into the local administrators group.

PowerSploit – Always Install Elevated

Adding an account into Administrators group
The verification that this user has been added into the local administrator group can be done by running the “net localgroup administrators” command from the command prompt.

Verification that the “backdoor user has been created
Conclusion
Metasploit Framework can be used as well to generate MSI files however the payload will be executed under the privileges of the user running it which in most of the cases it shouldn’t be the administrator. Therefore the PowerSploit script was the only reliable solution to escalate privileges properly.
In order to mitigate this issue the following settings should be disabled from the GPO:
Computer Configuration\Administrative Templates\Windows Components\Windows Installer
User Configuration\Administrative Templates\Windows Components\Windows Installer

GPO -Always Install With Elevated Privileges Setting

GPO – Always Install with Elevated Privileges Setting
通过系统自带的MSI安装包来提权账号的更多相关文章
- 找回MSI安装包Win7/Win8管理员身份功能
找回MSI安装包Win7/Win8管理员身份功能 从Vista开始,系统引入了UAC用户控制功能,即普通用户运行exe软件安装程序,支持使用普通账户/管理员身份分别进行安装,但是msi安装包只支持默认 ...
- 绝对干货:自定义msi安装包的执行过程
有时候我们需要在程序中执行另一个程序的安装,这就需要我们去自定义msi安装包的执行过程. 比如我要做一个安装管理程序,可以根据用户的选择安装不同的子产品.当用户选择了三个产品时,如果分别显示这三个产品 ...
- 自己定义msi安装包的运行过程
有时候我们须要在程序中运行还有一个程序的安装.这就须要我们去自己定义msi安装包的运行过程. 比方我要做一个安装管理程序,能够依据用户的选择安装不同的子产品.当用户选择了三个产品时,假设分别显示这三个 ...
- 自定义msi安装包的执行过程
有时候我们需要在程序中执行另一个程序的安装,这就需要我们去自定义msi安装包的执行过程. 比如我要做一个安装管理程序,可以根据用户的选择安装不同的子产品.当用户选择了三个产品时,如果分别显示这三个产品 ...
- 电脑运行msi安装包提示the error code is 2503/2502如何解决
当在电脑中运行msi安装包时,出现the error code is 2503或者2502错误提示,其实是由于没有运行的权限导致的,但是又不能右击以管理员身份运行,那么应该如何操作呢?对于这样的问题, ...
- arcgis安装msi安装包提示"在未标记为正在运行时,调用了RunScript”解决办法
安装msi安装包提示"在未标记为正在运行时,调用了RunScript”解决办法 windows/temp目录相关权限不对,右击temp文件夹,选择管理员获取所有权限.
- 在Win10中,在安装msi安装包的时候常常会出现代码为2502、2503的错误。
前言:在Win10中,在安装msi安装包的时候常常会出现代码为2502.2503的错误.其实这种错误是由于安装权限不足造成的,可以这种msi的安装包不像其他exe的安装程序,在安装包上点击“右键”之后 ...
- Elasticsearch各版本的MSI安装包和Kibana各版本的zip包(Windows)
elastic各产品下载列表页:https://www.elastic.co/cn/downloads/ 打开Elasticsearch的下载页后看到的是当前最新版本的安装界面,现在最新的版本是7.4 ...
- 【原创】DOTNET动态调试破解Spoon,及MSI安装包文件替换技术
提到Spoon可能大家还会感到陌生,但是如果提及XenoCode那么研究过DOTNET的人应该都知道吧.Spoon的前身就是XenoCode,虽然没有了PostBuild这个混淆软件,但是虚拟化技术仍 ...
随机推荐
- stl源码分析之allocator
allocator封装了stl标准程序库的内存管理系统,标准库的string,容器,算法和部分iostream都是通过allocator分配和释放内存的.标准库的组件有一个参数指定使用的allocat ...
- Android 测试 之adb shell
一.发送键盘事件: 命令格式1:adb shell input keyevent "value" 其中value以及对应的key code如下表所列: KeyEvent Value ...
- Lua学习笔记(5): 表
表的初始化方式 表的索引类型一般有两种,一种是通过标识符访问,一种是通过数字访问 --通过标识符访问的表的初始化 table1 = {key_1 = "haha", key_2 = ...
- 《零基础学HTML5+CSS3(全彩版)》读书笔记
2019年1月31日星期四 1点 <零基础学HTML5+CSS3(全彩版)>开始全面学习 前提: 11月20日开始学Python,可能因为太累了,也可能遇到了瓶颈,进入了一个迷茫期,1月6 ...
- ArcFace Demo [Android]
Free SDK demo 工程如何使用? 1.下载代码:git clone https://github.com/asdfqwrasdf/ArcFaceDemo.git 或者直接下载压缩包 2.前往 ...
- kylin-note
http://www.cnblogs.com/tgzhu/category/915975.html https://sdk.cn/news/3566 https://www.linuxidc.com/ ...
- short数组写进txt
short[] ssss=new short[gaoDeData.Length]; FileStream fs = new FileStream("E:\\123.txt", Fi ...
- Mininet介绍及安装
什么是Mininet Mininet是由一些虚拟的终端节点(end-hosts).交换机.路由器连接而成的一个网络仿真器,它采用轻量级的虚拟化技术使得系统可以和真实网络相媲美. Mininet可以很方 ...
- virtual judge 本地部署方案
这是一种将自己的电脑当作服务器来部署一个vj的方法,我也是参考前辈们的做法稍作了改动,如果在服务器上部署的话需要在细节上稍作改动: 一.什么是Virtual Judge? vj的工作原理什么? vj ...
- DB2 UDB V8.1 管理
在DB2中有关实例(Instance), 数据库(Database),表空间(TableSpace),容器(Container)等概念: 在一个操作系统中,DB2数据服务可以同时运行多个实例(有别于O ...