🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#844
From: Paul
Date: Sat, 31 Oct 2026 20:36
197 lines
10541 bytes
On Sat, 10/31/2026 4:48 AM, Johann 'Myrkraverk' Oskarsson wrote:
> 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.


https://endpointweekly.com/blog/smart-app-control-vs-wdac-signing.html

[Picture]  This is why I can make EXEs here and nothing even twitches... Mine is OFF.

   https://imgur.com/a/Q8N2pFZ

   https://postimg.cc/8JXPSPLN
   https://i.postimg.cc/PJTL1Cxp/Smart-App-Control.gif

That is 25H2.

Reading articles like this, is not helpful.

   https://www.pcworld.com/article/3263770/windows-11s-october-update-blocks-smart-app-control-heres-the-fix.html

In 26H2, we see suggestions like this.

  "Smart App Control is now easier to use

   Smart App Control  blocks suspicious, unsigned apps. Previously, once disabled,
   you sometimes had to reinstall the OS (clean install) to re-enable it. In 26H2,
   the mechanism has been revamped, and it is now possible to toggle it on/off
   without resetting the OS.
  "

  [And this applies, once they fix the mistake they made, as documented
   in the PCWorld link. An Oct.4, 2026 update seems to have botched this. ]

Basically, you've picked the perfect time to be dealing with this :-/
In theory, 26H2 offers better control of it.

   Paul
Technical Details
Message-ID: <11c5jfr$1efss$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> <11c1hbh$1vn5$1@dont-email.me> <mEZES.8677$KLHc.848@fx09.ams4> <%XhFS.8961$KLHc.3730@fx09.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: Sat, 31 Oct 2026 16:36:10 -0400
Organization: A noiseless patient Spider
Lines: 197
Message-ID: <11c5jfr$1efss$1@dont-email.me>
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> <%XhFS.8961$KLHc.3730@fx09.ams4>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 31 Oct 2026 20:36:12 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1523612"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18GNCB0vH3hRBr4JTxoXCHZJHy7mk2/xCs="; posting-host="85d07641bfaf8be497603a70401eaaae"
User-Agent: THIS SPACE FOR RENT
Cancel-Lock: sha1:tUBNIe6XzsRFzGovQrfNa/qeoIo= sha256:3STyFJ12IOJWarew8NnXPtLPlWNDlI99RUnz0bFWu2I=
	sha1:AFt/Nr7mfIB+rjeWTF2y/B09qck= sha256:bQuAtwij1SEiDtT2+/PXgFgINMjR4BrxWTZXNfLrCgI=
Content-Language: en-US
In-Reply-To: <%XhFS.8961$KLHc.3730@fx09.ams4>