Windows 10 Security: Device Guard and Credential Guard – Part 2

This part two of a blog about Device Guard. For part one, which configures only Credential Guard, see this post: Windows 10 Security: Device Guard and Credential Guard – Part 1 – (windowsmanagementexperts.com)

In this part, we are going to configure a Device Guard rule. Device Guard rules protect your machine from un-verified code. Device Guard, like Credential Guard, runs from a protected Hyper-V container, ensuring that your devices remain from malware.

Enabling Device Guard

At the end of part one, we configured Credential Guard using this registry key:

Capture

To enable Device Guard, set the middle selection box to “Enabled without Lock”.

Capture

Next, you need feed the setting “Deploy Code Integrity Policy” a policy. This policy can be in a .bin format (unsigned file) or a .p7 format (signed file). Open this setting, and type in the path and file name. The file can exist on the local computer, or a network share.

Capture

Create Device Guard Policy

Creating a Device Guard policy is pretty simple, actually. You start with a gold master. This master should have the software that can run installed on it, and only that software. From this computer, run this series of PowerShell commands. The path in lines three and four must exist prior to executing those commands. The commands will not create the path, and will error if its not there.

$dg_policy = “c:\dg\dg_policy.xml”

$dg_policyBIN = “c:\dg\dg_policy.bin”

new-cipolicy -level pcacertificate -filepath $dg_policy -userpes

convertfrom-cipolicy $dg_policy $dg_policyBIN

Note that the new-cipolicy step takes quite a while to run. After it completes, you should have your BIN file at C:\dg.

Remember that a device can only have one policy applied to it. I recommend keeping your gold master in a VM that you power on and regenerate this policy if needed. It is possible to merge policies, but that is out of the scope of this post. Additional documentation is available here: https://technet.microsoft.com/en-us/itpro/windows/keep-secure/deploy-code-integrity-policies-steps#merge-code-integrity-policies.

Disclaimer

All content provided on this blog is for information purposes only. Windows Management Experts, Inc makes no representation as to accuracy or completeness of any information on this site. Windows Management Experts, Inc will not be liable for any errors or omission in this information nor for the availability of this information. It is highly recommended that you consult one of our technical consultants, should you need any further assistance.

Share:

Facebook
Twitter
LinkedIn
Picture of Matt Tinney

Matt Tinney

Professional IT executive & business leader having decades of experience with Microsoft technologies delivering modern-day cloud & security solutions.

Contact Us

=
On Key

More Posts

WME Cybersecurity Briefings No. 020
Cyber Security

WME Security Briefing 26 July 2024

Pro-Houthi Group Targets Yemen Aid Organizations with Android Spyware Overview A suspected pro-Houthi group, OilAlpha, is targeting humanitarian organizations in Yemen with advanced Android spyware. The operation is associated with the activity cluster codenamed OilAlpha. It

Read More »
WME Cybersecurity Briefings No. 019
Cyber Security

WME Security Briefing 23 July 2024

Samba File Shares Targeted by DarkGate Malware in Recent Cyber Offensive Overview Recent investigations by Palo Alto Networks uncover a brief but significant cyberattack campaign utilizing DarkGate malware. This malicious software exploited Samba file shares to

Read More »
WME Cybersecurity Briefings No. 018
Cyber Security

WME Security Briefing 15 July 2024

OVHcloud Mitigates Record-Breaking 840 Million PPS DDoS Attack Overview In April 2024, OVHcloud, a top French cloud computing firm, successfully stopped a massive DDoS attack. The attack hit a record-breaking rate of 840 million packets per second

Read More »
E-Commerce Security - Solutions for Online Retailers
Azure

E-commerce Security – Solutions for Online Retailers

Today’s hyper-charged e-commerce landscape demands top-notch cybersecurity measures. Cybersecurity for this bustling sector isn’t just about ticking a technical box; it’s the cornerstone of building trust. As businesses and consumers flock to the online space, the

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.

=