uac

Show UAC prompt when launching an app

拥有回忆 提交于 2019-12-05 21:52:05
I have an app which needs administrator privileges to do some things. I'd like to just show the UAC prompt when it starts, and then be elevated. I'm not sure how to do this, but I'm hearing about things like manifests and whatnot but not seeing a plain answer anywhere. You need an app manifest that demands elevated privileges. Here's a quote from a blog that answers this: First, you can create a manifest file by adding an “Application Manifest File” Item to your project (default name: app.manifest), then you can set it through the Application Tab in the Project Properties. If you want to

CreateDesktop() with Vista UAC (C Windows)

邮差的信 提交于 2019-12-05 20:08:54
I'm using CreateDesktop() to create a temporary desktop where an application will run, perform a cleanup action (while remaining out of the way) and terminate. I'm closing that desktop once the application is gone. Everything is fine when using Windows XP and even Vista. The problem arises when you enable the (annoying) UAC. Everything is OK when you create a desktop, but when you call CreateProcess() to open a program on that desktop it causes the opened application to crash with an exception on User32.dll. I've been reading a lot about the different desktops and layers on Windows and the

CVE-2019-1388 UAC提权复现

空扰寡人 提交于 2019-12-05 19:18:42
0x01 前言 该漏洞位于Windows的UAC(User Account Control,用户帐户控制)机制中。默认情况下,Windows会在一个单独的桌面上显示所有的UAC提示——Secure Desktop。这些提示是由名为consent.exe的可执行文件产生的,该可执行文件以NT AUTHORITY\SYSTEM权限运行,完整性级别为System。因为用户可以与该UI交互,因此对UI来说紧限制是必须的。否则,低权限的用户可能可以通过UI操作的循环路由以SYSTEM权限执行操作。即使隔离状态的看似无害的UI特征都可能会成为引发任意控制的动作链的第一步。事实上,UAC会话中含有尽可能少的点击操作选项。 利用该漏洞很容易就可以提升权限到SYSTEM 0x02 危害范围 根绝gayhub的exp文档所说 支持如下(但 本机win10没成功 可能是补丁打过了吧 ) exp 详情 https://github.com/jas502n/CVE-2019-1388 SERVER ====== Windows 2008r2 7601 ** link OPENED AS SYSTEM Windows 2012r2 9600 link OPENED AS SYSTEM Windows 2016 14393 link OPENED AS SYSTEM ** Windows 2019 17763

Security center symbol shield with my Application Icon

拜拜、爱过 提交于 2019-12-05 18:59:04
I have developed an application that needs admin rights to execute. Running the application on Windows 7, the user always have to launch the application as "Run as Administrator" otherwise my application prompts the user that "you don't have administrative rights etc...". This is OK and understandable because of UAC in windows 7. To get rid that the user have to set the application as "Run as Administrator". I updated my application's "app.manifest" and set <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> Which done the job for me. But now, a security center symbol shield

How to bring UAC's consent.exe to the foreground programmatically?

[亡魂溺海] 提交于 2019-12-05 17:32:30
How to (if at all possible) bring the Vista/Win7 UAC consent dialog to the foreground, when it is minimized in the taskbar? For instance, consider the following scenario: My application checks for updates during startup, it downloads the new update file and it executes it by providing the administrator's password in the Process.StartInfo, after that my application closes. At this point, if the user or Windows itself manages to lose focus from the MSI installer window (perhaps by clicking on the desktop or another window), UAC sees that installer window is not the foreground window and thus

Is UAC on Win7 different than Vista?

两盒软妹~` 提交于 2019-12-05 17:25:44
[EDITED to avoid duplications] I posted this question and in trying to diagnose what is going on have become curious about the magic UAC that happens in the OS. (especially since it seems different on the two platforms. Can anyone confirm or refute this? Our unmanaged c++ program causes the "Do you want to allow the following program to make changes to this computer?" to pop up at program start - even before it gets to our winmain. It appears that there is some kind of test done by the PE loader/launcher/whatever before our app code runs that decides for itself if it should ask for elevation.

Run Command as administrator in PowerShell script. UAC

一个人想着一个人 提交于 2019-12-05 17:22:33
问题 OK here is my issue: I am trying to run a script remotely on a server. I am an administrator on both boxes, firewall exceptions are in place, remote admin is enabled, and everything else looks good that i can see. invoke-command -ComputerName $ComputerName -ScriptBlock ` { cd C:\Windows\System32\inetsrv\; ./appcmd.exe ADD vdir /app.name:<SiteName>/ /path:/<VDir Name> /physicalPath:<Path to files> } I keep getting the following error in return ERROR ( hresult:80070005, message:Failed to commit

How to Launch an Exe at User Level from a Higher Level

£可爱£侵袭症+ 提交于 2019-12-05 16:54:35
I would like a process to always run at the user level. Either when it is launched by the installer (custom, not msi), which runs as at the administrator level, or when a user logs on. Looking around, I'm not sure this is possible. Alex The easiest way is to have 2 processes. One is normal user and it launches elevated/admin process. Then admin process can use IPC to ask normal user process to do things. If you have no normal user process, then Raymond Chen documents: Going from an unelevated process to an elevated process is easy. You can run a process with elevation by passing the runas verb

App is unable to write to the registry, even though the user has administrative privileges

╄→尐↘猪︶ㄣ 提交于 2019-12-05 10:20:03
I am using Visual Studio 2010, and I'm writing a program that needs to set (and read) new registry values under HKLM\Software\myapp The program is .NET 2.0-based and as for now it runs on Windows 7 64-bit. Here is my ocde: RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("Software", true); RegistryKey MyKey = softwareKey.CreateSubKey("MyApp"); RegistryKey = MyKey.CreateSubKey("MyKey"); selfPlacingWindowKey.SetValue("instaldateperson", datestr + usrname); The problem I have when running Visual Studio 2010, is that it will run the app but logged on as me, I am a user and member of

Inno-Setup and the Windows UAC shield

两盒软妹~` 提交于 2019-12-05 09:11:48
I am stuck at some UAC issue (i guess). My question is: What does this UAC Shield Icon on some applications mean. AND how would I get this icon to my Inno-Setup setup.exe? Inno Setup installers require Admin Privileges by default (if not customized by installer creator). UAC popup will be triggered if user did not change UAC settings in Windows. http://www.jrsoftware.org/ishelp/index.php?topic=setup_privilegesrequired [Setup] : PrivilegesRequired Valid values: none , poweruser , admin , or lowest Default value: admin Description: The effect of this directive depends on which version of Windows