Is there an analog of the SetFileSecurity function?
I need to re-write some tests from Python and I'm stuck on this part. In Python I can freely edit a DACL with pywin32 (modules with a C++ implementation to work with Windows API).
I can edit any…
My company is programming for the SmartCard security setup in Windows. However, we hit a snag when we updated to Fall Creators, which a developer was able to mitigate by not passing a parent window to the CredUIPromptForWindowsCredentialsW()…
is there a way to check if an ACE already exists in the DACL of an object?
I want to use the RtlAddAccessAllowedAce API call to add an ACE to an object, but I want to do that only if the ACE doesn't exist already.
Does someone know how can I either…
I have a web site (intranet) that allows you to download an executable (currently a .Net Console Application) written in ASP.NET and is using https.
However on many machines I can't run it right away after download - I need to right click on it, go…
I have to add an exclusions path to Windows Defender registry key. I am aware that there are cmdlets provided from Windows Defender to use them directly for these kinds of purposes. But unfortunately, in Windows 7 and PowerShell v2, they are not…
This whole web of SQL Server and Windows permissions is so confusing to me.
I created a login at
Server > Security > Logins
with
Login name: foo
Password: xyz
Default database: MyDb
Then at
Server > Databases > MyDb > Security > Users
I…
I need to test which Windows users have administrator privileges.
OK, now read carefully: NOT CURRENT USER. I query all local user accounts, then I test which one of them has administrator privileges. Let's say I'm logged as Joe, my application runs…
I am trying to programmatically delete a user profile (the right way) using the DeleteProfile() API. Unfortunately, it wants an account SID as the first parameter.
There has to be some magical API that takes a username and spits out an SID, correct?…
I can't read a particular file, even though as far as I can tell I have read rights on it. Here is what "Effective Access" shows:
Here is what Get-Acl is giving me.
PS ...> Get-Acl .\HelloWorld.java | Format-List
Path :…
I've written a new application in a network I haven't worked in before, and am running into a problem.
If I have the following C# code:
FileStream fs = File.Create(@"\\MyServer\MyShare\testing.txt");
fs.Close();
In a console application, this code…
In a Windows Server's Event Viewer we found nearly 30,000+ logs which is of Event ID 4625 . Provided one detail. Each are similar with different logontype and Process Name. In firewall we have blocked every port except three RDP, DB and App Server.…
I'm curious if there's a way to prevent users (including the ones belonging to the admin group) from taking ownership of a file?
I originally create such file from my service that is running under Local System account. I then set that file's DACL to…
On my Windows 8.1 machine (freshly installed), the Microsoft Root Certificate Authority 2010 certificate is listed as not valid (as can be seen on the screenshot below).
On the other hand, my Windows 10 machine shows this:
What can be the reason…
We ship a component of our software as MSI to customers who have AppLocker activated. The installation fails with AppLocker kicking in. As far as I understand, the problem is:
AppLocker default rules only allow Administrators to install MSI…
I'm using USBHIDDRIVER to access a scale connected to our local workstation. Everything works fine when I run the WCF in Visual Studio 2012 Debug. But once I attempt to run the service in IIS it doesn't seem to recognize the USBHIDDRIVER. I have a…