🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #12

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

#12
From: Johann 'Myrkraverk' Oskarsson
Date: Mon, 09 Nov 2026 19:31
215 lines
11505 bytes
On 11/1/2026 4:36 AM, Paul wrote:
> 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

Thank you.  I've now turned my /Smart App Control/ or whatever, off.
Probably permanently.  The final nail in its coffin was its inability
to recognize Prince of Persia: Sands of Time.

I'll just rely on Bitdefender to keep the /baddies/ away.  The major
problem, from my perspective, is its inability to whitelist applica-
tions.  Or at least, the notification that pops up has no button /this
is fine, just run it/.  Which could mean the user stamps the executable
with a self signed certificate, but that's an implementation detail.

Rhetorical question: What were Microsoft thinking?
-- 
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: <mcpIS.2$Q51.0@fx16.ams4>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx16.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> <%XhFS.8961$KLHc.3730@fx09.ams4> <11c5jfr$1efss$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx16.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> <%XhFS.8961$KLHc.3730@fx09.ams4>
 <11c5jfr$1efss$1@dont-email.me>
Content-Language: en-US
From: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid>
Organization: Watcom Pro Ltd.
In-Reply-To: <11c5jfr$1efss$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 215
Message-ID: <mcpIS.2$Q51.0@fx16.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: Tue, 10 Nov 2026 03:31:28 +0800
X-Received-Bytes: 11290