通过系统自带的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这个混淆软件,但是虚拟化技术仍 ...
随机推荐
- 函数parseQuery用于解析url查询参数
在百度上找的,以后忘了再看. 语法如下: var obj = parseQuery(query) query是被解析的查询参数,函数返回解析后的对象. 使用范例如下: var jerry = pars ...
- 模拟IDE上的run过程
看了一下老陈写的模仿JDK动态代理,从中取一部分单独扩展,模拟一下IDE上的run过程(不愧是老陈,去年写的东西我要现在才能理解) 对run过程的猜想 在点击run的过程中应该做了不少事.先编译运行r ...
- Oracle集合
--union 并集 select * from emp where ename like '%A%' union select * from emp where ename like '%M%'; ...
- Hyperledger Fabric CouchDB as the State Database——使用CouchDB
使用CouchDB作为状态数据库 状态数据库选项 状态数据库包括LevelDB和CouchDB.LevelDB是嵌入在peer进程中的默认键/值状态数据库,CouchDB是一个可选的外部状态数据库.与 ...
- IO模型浅析-阻塞、非阻塞、IO复用、信号驱动、异步IO、同步IO
最近看到OVS用户态的代码,在接收内核态信息的时候,使用了Epoll多路复用机制,对其十分不解,于是从网上找了一些资料,学习了一下<UNIX网络变成卷1:套接字联网API>这本书对应的章节 ...
- [寒假学习笔记](一)Markdown语法学习
Markdown 学习 在博客园上使用markdown编辑,记录学习进度,以来日可以复习 前期准备 1. 安装markdownpad2 官网直接找下载安装,遇到bug他会自动提示信息,跟着提示去安装一 ...
- PIL包中图像的mode参数
在这里的第一篇. 这篇的是为了说明PIL库中图像的mode参数. 我做的事情是: 在本地找了jpg的图,convert为不同mode,将不同的图截取做了个脑图,有个直观的感觉吧. 把不同mode的图通 ...
- visual studio 2010 和 VSS(Visual SourceSafe)的连接使用
visual studio 2010 和 VSS(Visual SourceSafe)的连接使用 1. 在visual vstudio中选择使用VSS插件: 2. 使用VSS进行源码管理: ...
- php json 转换
在PHP语言中使用JSON 作者: 阮一峰 日期: 2011年1月14日 目前,JSON已经成为最流行的数据交换格式之一,各大网站的API几乎都支持它. 我写过一篇<数据类型和JSON格式& ...
- Alpha发布用户使用报告【欢迎来怼】
目录 用户统计表 部分用户评论截图 用户统计图 总结 一.用户统计表 目前,博客园安卓版的用户已达到11位.为了采集到更加客观公正的用户评价,并没有将团队内部人员的评价统计进来.同时,为了更好地保护用 ...