🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#809
From: Paul
Date: Fri, 30 Oct 2026 07:35
96 lines
6086 bytes
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
Technical Details
Message-ID: <11c1hbh$1vn5$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <gbWES.44032$%QK8.26165@fx12.ams4> <KdWES.44033$%QK8.3939@fx12.ams4>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Paul <nospam@needed.invalid>
Newsgroups: alt.comp.os.windows-11,comp.windows.ms.programmer
Subject: Re: {Question} How do I whitelist my source directory from device
 guard, so it will run unsigned binaries?
Date: Fri, 30 Oct 2026 03:35:11 -0400
Organization: A noiseless patient Spider
Lines: 96
Message-ID: <11c1hbh$1vn5$1@dont-email.me>
References: <gbWES.44032$%QK8.26165@fx12.ams4>
 <KdWES.44033$%QK8.3939@fx12.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 30 Oct 2026 07:35:15 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="65253"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19CeKUqa/o1j3igj/oX9rwMslDHwRhost0="; posting-host="f3ab2514b03efb56db63b2a223ddcec3"
User-Agent: THIS SPACE FOR RENT
Cancel-Lock: sha1:hjixnarajFkwwZsJx3aQTKN5i0I= sha256:9BTBAfPqWIU5cDuKPsJZarUCbXf05+hM5UfU0cztq8M=
	sha1:KrVMXBp8jotfQlcpJSvToK2mA6Q= sha256:Aja0PJcFPB7eAwLpdNdaxOlaD4iZM3KhEvAdL2CCBnU=
In-Reply-To: <KdWES.44033$%QK8.3939@fx12.ams4>
Content-Language: en-US