🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.os.windows-11
Article #842

Re: {Question} How do I whitelist my source directory from device guard, so it will run unsigned binaries?

#842
From: Johann 'Myrkraverk' Oskarsson
Date: Sat, 31 Oct 2026 08:48
179 lines
9251 bytes
On 10/30/2026 5:42 PM, Johann 'Myrkraverk' Oskarsson wrote:
> On 10/30/2026 3:35 PM, Paul wrote:
>> On Fri, 10/30/2026 1:49 AM, Johann 'Myrkraverk' Oskarsson wrote:
>>> On 10/30/2026 1:46 PM, Johann 'Myrkraverk' Oskarsson wrote:
>>>> Dear alt.comp.os.windows-11,
>>>>        comp.windows.ms.programmer,
>>>>
>>>> How do I disable this /Device Guard/ policy -- whatever that is -- so I
>>>> can run my self-made binaries unsigned?  I am just a pleb, and do not
>>>> have a code signing key that I can just casually use every time I run
>>>> CL.exe to build my program.
>>>>
>>>> My workaround so far has been
>>>>
>>>>     del myprogram.exe
>>>>
>>>>     nmake
>>>>
>>>> which recreates the binary from the object files.  This usually works,
>>>> but is not completely reliable, and I have had to delete the executable
>>>> several times before the /Device Guard/ will allow it to run.  I guess
>>>> this is something about stochastic uncertainty when MSVC optimizes or
>>>> generates the instructions; but anyway, it's slightly annoying.
>>>>
>>>> Is there a way to disable the /Device Guard/ policy, or something, 
>>>> in my
>>>> source directory, such that it still applies to the /world at 
>>>> large/?  I
>>>> do not wish to turn this otherwise quite useful security feature off
>>>> completely.
>>>>
>>>>
>>>> Best wishes, and happy security policies!
>>>
>>> I should add that, when I asked the insufferable know-it-all ChatGPT, it
>>> suggested several different ways, and made an off hand remark that some
>>> of the workaround(s) it suggested wouldn't work.  So it kind of contra-
>>> dicted itself, so here I am, on Usenet, and wondering if the experts of
>>> alt.comp.os.windows-11 and comp.windows.ms.programmer know how to do
>>> this?
>>
>> The evidence is, you're on Windows 11 Enterprise.
>> You're likely domain joined and there is a company
>> policy pushed out to individual computers.
>>
>> It's important at times like this, to copy the error message exactly.
>>                                                 ^^^^^^^^^^^^^^^^^^^^^
>>
>> Here is why. This person isn't using WDAG, it was turned off for him,
>> yet Windows Defender was blowing these messages. There were multiple
>> lines of text, but one line in particular, which I have quoted,
>> is how he figured it out for himself.
>>
>>     https://community.spiceworks.com/t/your-organization-used-device- 
>> guard-to-block-this-app/948033
>>
>>          "Defender is 100% reporting 
>> “AppControlCodeIntegrityPolicyBlocked” for these 3 machines"
>>
>>           MS Defender security portal
>>
>>                Remove App Restriction   <=== would want to use this, 
>> to toggle it off
>>
>> I could not see any indication that Device Guard (a policy portfolio) has
>> an Exclusion capability. Not like Windows Defender has an Exclusion 
>> folder
>> capability. Device Guard is programmed by an IT person, to whitelist
>> a curated set of Enterprise applications you as a user are allowed to 
>> use.
>> And because it's a whitelist, and they don't want anyone punching holes
>> in their fortress made of cardboard boxes, there is no Exclusion 
>> capability
>> for that flavor of lockdown.
>>
>> Your IT guy is your friend, not your enemy. At work, I had a local IT and
>> I had the Help Line. The local guy was great, he could perform miracles,
>> and that is a person you want to keep on your side :-) Approach your 
>> person
>> with your problem, and they will "set you free", up to the limits
>> of corporate policy (whatever that is). Generally speaking, lockdown 
>> sucks,
>> but it's there for a reason, and when you see just how careless your
>> fellow professionals are, it's easy to understand why the heavyweight
>> things are switched on.
>>
>> There should be a canned configuration for a dev that your IT person
>> should be using with your seat. The IT person understands that you
>> make unique executables with never-seen-before hash values, which
>> tends to set off reputation based detections. It has nothing
>> to do with actual malware signatures. I have Cloud Delivered Protection
>> switched off, so anything I compile with MinGW32 doesn't set anything 
>> off.
>> My Win11 Home does not have Device Guard (which would require programming
>> the curated list of acceptable applications). I have Real Time Protection
>> switched on (which compares signatures of bad things, against my
>> new executable).
>>
>> As for what the compiler is doing, the deterministic parts
>> of the output should not change. However, the header of your
>> executable, perhaps it has a date stamp, and some limited number
>> of bytes may change each time you Build the thing. Pop two instances
>> of the executable into HxD and do a compare, and see where the 
>> differences
>> exist. Only a portion of the field might change, so you have to use
>> your imagination to guess where the left-hand end would be.
>>
>>     https://en.wikipedia.org/wiki/HxD
>>
>>    Paul
> 
> Thank you for your detailed answer.  Unfortunately, this is a single
> white tower I have at home, and there is no /entrerprise/ domain I am
> connected to.
> 
> I mean, I certainly hope not.  How would an enterprise domain control
> my white tower at home?
> 
> Also, there is no I.T. person; there's only me.
> 
> I did not install this instance of Windows 11, it came from the store
> where I bought the tower.
> 
> I hope this changes answer somewhat, but I will now endeavor to take a
> screenshot, and put on social media.  Or something.
> 
> But it will not be immediately, as life has a set of challenges for me.
> 
> 
> Best wishes, and happy Windows 11!

Ok, so I was able to /replicate the problem/, but I was unable to get a
screenshot of the offending notification, and I haven't gotten it back.

I did however get this output in my CMD window,

   'C:\Src\Myproject\myproject.exe' was blocked by your organization's
   Device Guard policy.
   Contact your support person for more info.

And as I am my own support person, I don't know what to do about this,
nor how to change my device guard's policy.  I would /like/ to keep this
security setting on -- after all it blocks the Epic store installer --
so I have found definite use for it [1].

I'll add that I have /Bitdefender Total Security/ installed, and have
attempted to set an exception for that directory, but that doesn't seem
to have changed anything.  I suspect this is not something triggered by
Bitdefender as that has its own notification settings.

I also looked in my ChatGPT transcript, and found this; I quote.

   WDAC deliberately restricts path-based rules.

   By default, the directory must be writable only by administrators.
   Otherwise, Windows won't trust the path-based allow rule.

   Don't disable this protection just to make the rule work. Doing so
   could allow malware to be copied into the directory and executed.

So I believed it best to ask the wizards of alt.comp.os.windows-11 and
comp.windows.ms.programmer, before attempting to create any /Windows
Defender Application Control/ rule or other.

I really don't want to have my working code directory /writable only by
administrators/, because I don't think it's healthy for me to work in
such an environment.


Best wishes, and happy security policies!


[1] We can have a different argument about whether the Epic store should
be allowed to download and execute unsigned intermediate binaries.
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Technical Details
Message-ID: <%XhFS.8961$KLHc.3730@fx09.ams4>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!peer04.ams1!peer.ams1.xlned.com!news.xlned.com!fx09.ams4.POSTED!not-for-mail
References: <gbWES.44032$%QK8.26165@fx12.ams4> <KdWES.44033$%QK8.3939@fx12.ams4> <11c1hbh$1vn5$1@dont-email.me> <mEZES.8677$KLHc.848@fx09.ams4>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!peer04.ams1!peer.ams1.xlned.com!news.xlned.com!fx09.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: {Question} How do I whitelist my source directory from device
 guard, so it will run unsigned binaries?
Newsgroups: alt.comp.os.windows-11,comp.windows.ms.programmer
References: <gbWES.44032$%QK8.26165@fx12.ams4>
 <KdWES.44033$%QK8.3939@fx12.ams4> <11c1hbh$1vn5$1@dont-email.me>
 <mEZES.8677$KLHc.848@fx09.ams4>
Content-Language: en-US
From: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid>
Organization: Watcom Pro Ltd.
In-Reply-To: <mEZES.8677$KLHc.848@fx09.ams4>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 179
Message-ID: <%XhFS.8961$KLHc.3730@fx09.ams4>
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 31 Oct 2026 16:48:57 +0800
X-Received-Bytes: 8998