windows-security

Create a Low/Medium process from a elevated process with CreateRestrictedToken(LUA_TOKEN)

早过忘川 提交于 2021-02-07 09:20:24
问题 I'm trying to create a Medium or Low integrity process from a elevated process. I know there are other questions like this but they mostly focus on the workarounds like using Explorer or the Task Scheduler and I want to stick with CreateRestrictedToken() + CreateProcessAsUser() . I assume it must be possible to do this somehow since I believe UAC does it when you log in but I have not been able to get everything in the token to look like the normal UAC Medium IL token. You can get 80% there

Create a Low/Medium process from a elevated process with CreateRestrictedToken(LUA_TOKEN)

余生颓废 提交于 2021-02-07 09:20:08
问题 I'm trying to create a Medium or Low integrity process from a elevated process. I know there are other questions like this but they mostly focus on the workarounds like using Explorer or the Task Scheduler and I want to stick with CreateRestrictedToken() + CreateProcessAsUser() . I assume it must be possible to do this somehow since I believe UAC does it when you log in but I have not been able to get everything in the token to look like the normal UAC Medium IL token. You can get 80% there

Creating a buffer overflow on windows 10

一个人想着一个人 提交于 2020-02-07 00:02:29
问题 Soon, I am due to be giving a presentation to my class (doing a degree in computer science) where I want to give a basic example of a buffer overflow and why it's a problem. However, I can't get my buffer overflow to work. The issue is that as soon as the crash is caused, the process is terminated, even if the process is attached to a debugger like xdbg (in VS, an exception is thrown). I think this is caused by one of the protections built into Windows 10. I have gone through the following

Creating a buffer overflow on windows 10

一曲冷凌霜 提交于 2020-02-07 00:00:11
问题 Soon, I am due to be giving a presentation to my class (doing a degree in computer science) where I want to give a basic example of a buffer overflow and why it's a problem. However, I can't get my buffer overflow to work. The issue is that as soon as the crash is caused, the process is terminated, even if the process is attached to a debugger like xdbg (in VS, an exception is thrown). I think this is caused by one of the protections built into Windows 10. I have gone through the following

How to avoid security warning due to Machine Access on ClickOnce app install?

夙愿已清 提交于 2020-01-06 08:11:06
问题 My enterprise intranet-only ClickOnce app started recently showing the following warnings. My Windows app of course installs on the user's machine. Does this mean there is no way to avoid the red-X "Machine Access" warning shown below? Or is there a more limiting configuration I might put in place so that I don't need "Machine Access"? Is there any way to ensure my users don't get the Security Warning on install? Google searches that I can think of focus on the first "green check" warning,

ASP.NET impersonation problem

假如想象 提交于 2020-01-05 04:57:27
问题 I am trying to get my IIS 7.5 to impersonate the account of the user accessing a site through a browser. If I use... <identity impersonate="true" userName="mydomain\myusername" password="mypassword" /> it works just fine. However, if I use... <identity impersonate="true" /> It won't pick up the user. Am I missing some code? Or is this an IIS 7.5 configuration issue? 回答1: I posted a previous answer, but I think this one applies better Try to select if you are using a specific user or pass

Remote OpenSCManager fails with access denied

半世苍凉 提交于 2020-01-01 17:11:54
问题 I am attempting to control a service on a remote machine using the following code: // Error checking omitted for brevity HANDLE hToken = NULL; // user = username with no domain specification // domain = targetmachine when targetting computer outside of domain LogonUser(user, domain, password, LOGON32_LOGON_NEW_CREDENTIALS, LOGON32_PROVIDER_WINNT50, &hToken); ImpersonateLoggedOnUser(hToken); SC_HANDLE hSc = OpenSCManager(targetmachine, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS); This

Reading / Writing security properties to objects in Active Directory (the same way Delegation of rights work) C#

强颜欢笑 提交于 2019-12-24 10:12:55
问题 I'm looking for a way to read and set security permissions on an object (OU or users/computers) in Active Directory on Windows Server 2008+. The same way that Delegation by using Active Directory Wizard does it? I would like to be able to choose OU and assign group to it with Reset Password permissions or with ability to create / manage users? How can I achieve that? 回答1: So here is a simple example that allow the domain user ' user1 ' to reset password for users presents in OU ' ForUser1 ' /

How can I get the current user's SID in VB6?

谁说胖子不能爱 提交于 2019-12-22 08:56:20
问题 I have some old code that we have to maintain in VB6. We need to add the ability for it to look up the current user's SID. Can anyone point me to some code that shows how to do that? Thanks in advance for your help! 回答1: Try this Option Explicit '--- for OpenProcessToken Private Const TOKEN_READ As Long = &H20008 Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pTo As Any, uFrom As Any, ByVal lSize As Long) Private Declare Function GetCurrentProcess Lib "kernel32" () As

Can Inno Setup install set up a Windows security group?

ぐ巨炮叔叔 提交于 2019-12-19 12:08:54
问题 How can set up a Windows security group as part of a Inno Setup install? I can't seem to think of the right text to google to figure it out. Perhaps a hint at what to search for would be enough. 回答1: OK I have found something. I can use "net localgroup" (a Windows command:http://technet.microsoft.com/en-us/library/bb490706.aspx). That is my hint. My search hint.... So now I need to learn how to ask a user for input (CreateInputQueryPage), and execute the command... but that would be a