Take Windows Up to 11

Category: Security

Hardening of BeyondTrust Privilege Management for Windows (aka Avecto Defendpoint) Group Policies

Hey folks, in the last 8 years I have been helpimg a lot of companies to deploy what is now known as BeyondTrust Privilege Management for Windows (PMfW) and was formerly known as Avecto Defendpoint or Privilege Guard. In this post I want to show you how to harden your Group Policy based configurations against unwanted access.

Problem

The PMfW Agent uses a human readable XML configuration file which in most cases is deployed via Group Policy. The locally cached configuration is protected against unelevated access with NTFS permissions, but this does not apply to the default configuration of the Group Policy. The XML configuration file stored in the policy directory in the SYSVOL-Share of the Domain is readable for every authenticated user. A clever user or an attacker could use the read-only access to find a loophole in the configuration to elevate processes he is not allowed to or to gain full admin access to the computer. It is very unlikely, due to the Anti-Tampering mechanisms implemented into the Agent, but not impossible.

As you can see in the picture above the access to the local policy cache in %ProgramData%\Avecto is prohibited (1). But the user can load the XML configuration file from the GPO folder in the SYSVOL-Share and for example look up the application definitions of an Application Group (2).

Solution

If you are only using computer policies for PMfW, which is quite common, the solution is easy. Just replace the Authenticated Users entry in the Security Filtering of the relevant Group Policies with the Domain Computers group.

Changing the Security Filtering of a GPO is the same as setting NTFS permissions on the folder of the policy in the SYSVOL-Share. As you can see in the picture below accessing the GPO from the network is no longer possible for the user. However, the System Account of the device, which is automatically part of the Domain Computers group of the Active Directory Domain, is still able to access it during policy updates.

Windows 10 20H2 nice to know for me and IT Pros and Enterprise admins (curated link list)

Latest Update: January 13, 2020

Windows 10 20H2 is again a small fall release with a long support cycle of 30 months. It shares a lot with the spring release (NTK 2004) so check out my list for this release, too.
If you found something new before me or if I missed anything important, please send me a message via Twitter.

General

Topic Link Source
What’s new for IT Pros New and Updated Features of interest for IT Pros Microsoft
What’s new What’s new in Windows 10, version 2004 Microsoft
Release Status Known issues and notifications Microsoft
Removed features Features and functionality removed in Windows 10 Microsoft
Connection Endpoints Manage connection endpoints for Windows 10 Enterprise, version 20H2 Microsoft

Group Policies

Topic Link Source
WMI Filter Select Version,ProductType from Win32_OperatingSystem WHERE Version LIKE "10.0.19042%" and ProductType = "1" Sascha Stumpler
ADMX ADMX files for 20H2 Microsoft
Baseline (DRAFT) Security Baseline (DRAFT) for Windows 10 20H2 Microsoft
Baseline (FINAL) Security Baseline (FINAL) for Windows 10 20H2 Microsoft
Baseline Download Security Compliance Toolkit Microsoft

Autopilot, OSD, MEMCM, Intune and MDT

Topic Link Source
MDM What’s new in mobile device enrollment and management Microsoft
MDM-CSP Policy CSP – LocalUsersAndGroups Microsoft
LCU+SSU Combined Servicing Stack and Cumulative Updates Microsoft
Renamed BUILTIN Accounts Windows 10 2004/20H2 and renamed Administrator accounts are recreated Michael Niehaus

Misc

Topic Link Source
Important Issues Knowledgebase: Important Issues for Windows 10, version 20H2 build 19042 DirTeam, Sander Berkouwer
MMC error After updating to Windows 10, version 20H2, you might receive an error when accessing the sign-in options or users MMC snap-in Microsoft

Windows 10 2004 nice to know for me and IT Pros and Enterprise admins (curated link list)

Latest Update: January 13, 2020

Windows 10 2004 is the first big release since 1903 (NTK 1903) and compared to the small update of Windows 10 1909 (NTK 1909) this brings a lot of changes.
If you found something new before me or if I missed anything important please write a comment or send me a message via Twitter.

General

Topic Link Source
What’s new for IT Pros New and Updated Features of interest for IT Pros Microsoft
What’s new What’s new in Windows 10, version 2004 Microsoft
Release Status Known issues and notifications Microsoft
Removed features Features and functionality removed in Windows 10 Microsoft
Connection Endpoints Manage connection endpoints for Windows 10 Enterprise, version 2004 Microsoft

Group Policies

Topic Link Source
WMI Filter Select Version,ProductType from Win32_OperatingSystem WHERE Version LIKE "10.0.19041%" and ProductType = "1" Sascha Stumpler
New settings 17 new ADMX settings Jörgen Nilsson
ADMX ADMX files for 2004 Microsoft
Baseline (DRAFT) Security Baseline (DRAFT) for Windows 10 2004 Microsoft
Baseline (FINAL) Security Baseline (FINAL) for Windows 10 2004 Microsoft
Baseline Download Security Compliance Toolkit Microsoft

Autopilot, OSD, MEMCM, Intune and MDT

Topic Link Source
Autopilot Autopilot features in 2004 Michael Niehaus
MDT BIOS Making MDT work with Windows ADK 2004 for BIOS Machines Johan Arwidmark
MDT Hotfix Windows 10 deployments fail with MDT on computers with BIOS type firmware Microsoft
Servicing New custom actions during and after a feature update Microsoft
Dynamic Update New switches to exclude Drivers and Cumulative Updates Microsoft
New MDM What’s new in MDM for Windows 10, version 2004 Microsoft
MUI Better Language Handling Michael Niehaus
MDT Updates OSD MDT and installing updates during a task sequence Michael Niehaus
Renamed BUILTIN Accounts Windows 10 2004/20H2 and renamed Administrator accounts are recreated Michael Niehaus

Windows Subsystem for Linux 2 aka WSL2

Topic Link Source
Cool WSL tips Cool WSL (Windows Subsystem for Linux) tips and tricks you (or I) didn’t know were possible Scott Hanselman
Docker in WSL2 How to set up Docker within Windows System for Linux (WSL2) on Windows 10 Scott Hanselman
Remote debugging Remote Debugging a .NET Core Linux app in WSL2 from Visual Studio on Windows Scott Hanselman
Update to WSL2 Manually update Linux Kernel to WSL2 Craig Loewen, MS
Access WSL VHDX Access WSL2 .vhdx on External Drive Within a Windows 10 System Image Ed Burns

Misc

Topic Link Source
MSIX MSIX Installation possible without Sideloading Microsoft
Upgrade HVCI Update to Windows 10, version 2004 might encounter an update compatibility hold due to HVCI Microsoft
Wifi 2004 supports Wi-Fi 6 and WPA3 Microsoft
Identity Identity-related Features in Windows 10 version 2004 DirTeam.com
Reset Reset PC from the cloud Microsoft
Reserved Storage DISM Reserved Storage Command-line Options Microsoft
Notepad Notepad enhancements in Windows 10 2004 Microsoft
VMware Workstation VMware Workstation 15.5.5 supports Hyper-V and therefor Credential Guard and WSL on the hosting system VMware
VMware Workstation VMware Workstation and Hyper-V Microsoft
Citrix Issues Citrix Known Issues with 20H1 Insider Preview including a problem with ICA connections Citrix
OneDrive Issues using OneDrive On-Demand after updating to 2004 Microsoft
AppX the list of removeable apps did not change
Windows 10 1903 Built-In Apps: What to Keep
Anton Romanyuk, Microsoft

Windows 10 1909 nice to know for IT Pros and Enterprise admins (curated link list)

Latest Update: November 29, 2019

Even though Windows 10 1909 is only a small update compared to 1903 (NTK 1903) I have created this list with interesting links for IT Pros regarding this release. A place where I can store articles about new features, settings or bugs. I will update the post with new content as soon as I find it.
If you find something new before me or if I missed anything important please write a comment or send me a message via Twitter.

General

Topic Description Source
What’s new for IT Pros New and Updated Features of interest to IT Pros Link
What’s new What’s new in Windows 10, version 1909 Link
Release Status Known issues and notifications Link
Removed features Features and functionality removed in Windows 10 Link

Group Policies

Topic Description Source
WMI Filter Select Version,ProductType from Win32_OperatingSystem WHERE Version LIKE "10.0.18363%" and ProductType = "1" Link
ADMX ADMX files for 1909 Link
Security Baseline (Final) Security Baseline (Final) for Windows 10 1903 Link
Security Baseline 1909 Security Compliance Toolkit Link

Autopilot, OSD, SCCM and MDT

Topic Description Source
No new ADK Windows 10 1903 ADK is used with 1909 Link
Servicing not Updates Even though the 1903 to 1909 Enablement package is a very small update it is classified as an upgrade and can be found in the servicing node Link

Misc

Topic Description Source
Supported CPUs Windows Processor Requirements Link
Delivery Options Windows 10, version 1909 delivery options Link

Windows 10 1903 nice to know for IT Pros and Enterprise admins (curated link list)

Latest Update: November 22, 2019

With the release of Windows 10 1903 I want to start a curated link list for every Windows 10 release. A place where I can store interesting articles about new features, settings or bugs. I plan to update with new content as soon as I find it.
If you find something new before me or if I missed anything important please write a comment or send me a message via Twitter.

General

Topic Description Source
What’s new for IT Pros New and Updated Features of interest to IT Pros Link
What’s new in WUfB What’s new in Windows Update for Business in Windows 10 Link
Release Status Known issues and notifications Link
Connection Endpoints Manage connection endpoints for Windows 10 Enterprise, version 1903 Link

Group Policies

Topic Description Source
New GPOs Group Policy Changes in Windows 10 1903 Preview Link
New GPOs New GPO settings in Windows 10 1903: enforce updates, Storage Sense, and logon Link
Security Baseline (Final) Security Baseline (Final) for Windows 10 1903 Link
Security Baseline 1903 Security Compliance Toolkit Link
WMI Filter Select Version,ProductType from Win32_OperatingSystem WHERE Version LIKE "10.0.18362%" and ProductType = "1" Link
ADMX Download of 1903 ADMX files Link
Start Menu crash Continue experiences on this device Group Policy setting kills the Start Menu Link

Autopilot, OSD, SCCM and MDT

Topic Description Source
WSUS category Windows 10 1903 has ist own WSUS product category, SCCM 1902 required to manage 1903 Link1 Link2
What’s new in ADK Changes to the ADK especially the known issues Windows SIM x64 error Link WSIM Update
Autopilot The latest news on Windows Autopilot Link
Autopilot Companion Example Companion App to change settings during White Glove deployments Link
Autopilot White Glove Windows Autopilot for white glove deployment Link
High CPU SCCM WoL Proxy High CPU consumption of SCCM wake-up proxy due to DHCP data storage changes Link
MBR2GPT PE error MBR2GPT.exe will not run successfully in 1903 PE because ReAgent.dll is missing Link
Autopilot needs longer Why does “Preparing your device for mobile management” take longer with Windows 10 1903? Link
Autopilot ESP Bitlocker Since June 26th update of 1903 Autopilot will wait after OOBE (ESP) to begin encrypting Link
Autopilot Known issues Windows Autopilot known issues in Windows 10 1903 Link

Apps

Topic Description Source
Apps, AppX Windows 10 1903 Built-In Apps: What to Keep Link
Builtin AppX Understand the different apps included in Windows 10 Link

MDM

Topic Description Source
What’s new in MDM What’s new in MDM for Windows 10, version 1903 Link
MSfB Apps not deployed Take Action to Ensure MSfB Apps deployed through Intune Install on Windows 10 1903 Link

Misc

Topic Description Source
Sandbox Enable Windows Sandbox on 1903 with and without PowerShell Link
Sandbox Configuration How to configure Windows Sandbox Link
Sandbox Mapped Folder If you use mapped folder in Windows Sandbox, note that the ReadOnly value should be in lowecase like “true” and not “True” Link
Run in Sandbox Run file in Windows Sandbox from right-click and Context menu Link
Reserved Storage Windows 10 and reserved storage Link
WSL What’s new for WSL in Windows 10 version 1903? Link
Provisioning error on Wi-Fi for AAD Known issue: Provisioning error on Wi-Fi for Azure AD joined Windows 10 version 1903 Link
HV DHCP Default Switch Hyper-V Default Switch not handing out DHCP addresses for VMs or Mobile Hotspot Link
SBS Essentials connector broken Windows 10 1903 feature update breaks the SBS, Essentials client connector Link
Always On VPN RASMAN service issue The Remote Access Connection Manager (RASMAN) service may stop with error “0xc0000005” Link
VSM enabled by default Virtualization-Based Security: Enabled by Default on capable hardware since OS Build 18362.387 Link

Monitoring Windows 10 Defender Attack Surface Reduction Rule Events with Microsoft Teams

Windows Defender attack surface reduction (ASR) rules are a feature included in Windows 10 Enterprise which allows you to secure some common attack vectors like malicious E-Mail attachments or office files. It is a great additional layer for your client security strategy.
ASR is part of the Advanced Threat Protection family and therefore a Windows 10 Enterprise E5 feature. But you are allowed to use some of the rules with a Windows 10 E3 subscription though without the monitoring and management capabilities of the ATP online portal.
Most of the ASR rules included in an E3 subscription are also part of the Windows Defender Security Baseline for Windows 10 (1809) since the version for Windows 10 1709.

Problem

So what’s the problem? In my opinion you want these rules to be enabled on all your endpoints, but without monitoring and management you will have some impact on your application landscape. Especially for some of the new rules which shipped with 1809 you will need to implement exceptions, like blocking Office programs from creating child processes. But how do you want to implement exceptions if you aren’t aware which applications need them?

You have three valid options:

  1. Disable the ASR rules in your environment
  2. Enable the ASR rules in Audit Mode, centralize the audit events, configure exceptions and enable blocking at a later time
  3. Enable ASR rules in block mode, centralize the block events and create exceptions promptly

Option one is obviously the worst decision you can make in terms of client security. Option two is a good way to go forward but I have worked in many projects where approaches like these were followed and in most cases the blocking was not activated before we, the externals, left. And as far as I know it was never activated at all in most cases except when it was a management goal. However, this is the recommended way to implement this technology according to Microsoft.
For me Option three is the way to go because of the Windows-as-a-Service model. A phased rollout of a feature upgrade like 1809 should give you enough time to implement exceptions for the ASR rules before you have a widespread issue if you get notified on time.

My Solution

My solution to this scenario is to forward all block (or audit) events to an event collector server where a PowerShell script runs as a scheduled task. The script checks if it is the first time the executable triggered this ASR rule and if so forwards the event details to a Microsoft Teams channel. You can use the Teams channel to monitor the events and decide if you want to create an exception for the executable or not.

That is in short what I will show.

How to create an Exception for the Attack Surface Reduction Rules

At the moment you can only create exceptions for all ASR rules at once by using the group policy setting Exclude files and paths from Attack Surface Reduction Rules which you can find in Computer Configuration – Administrative Templates – Windows Components – Windows Defender Antivirus – Windows Defender Exploit Guard – Attack Surface Reduction.
Just enter the path of the executable that you want to exclude in the Name column and the 0 in the Value column.

ASR Exclusion

Event forwarding Client Configuration

Windows Event Forwarding is part of the Windows Remote Management (WinRM) and can be configured on several ways. I won’t go into details about configuring WinRM, because there are already plenty of good articles about that topic. Instead I will show you an easy configuration with Group Policy. Feel free to reach out to me if you need any assistance in configuring it otherwise.
To enable Event Forwarding via GPO on the clients we have to set the following settings:

  • Start the WinRM service and set it to automatic:
    Create a GPO and open Computer Configuration – Preferences – Control Panel Settings – Services, right click on it and select New – Service

ASR Exclusion

Then click on the three dots behind Service name and select the Windows Remote Management (WS-Management) or WinRM service. After that set Startup to Automatic and Service action to Start service. Then press OK to close the dialogue.

ASR Exclusion

  • Set the event collector server as Subscription Manager:
    Go to Computer Configuration / Policies / Administrative Templates / Windows Components / Event Forwarding and open the _Configure target Subscription Manager__ setting. Click on the Show button and add Server=\<FQDN> to the table.

ASR Exclusion

Event forwarding Server Configuration

Now we have to configure the Event Collector Server to receive the events. You can use any currently supported Windows OS as an event collector but I would recommend using a server OS according to its role.
In order to enable the server as event collector we have to enable the event collector service and create an event subscription.

Open up an administrative cmd and enter wecutil qc and proceed with y to quickly configure the Windows Event Collector service.

After that open up the Event Viewer and click on Subscriptions. In the right pane click on Create Subscription. Give the subscription a suitable name in the windows that open up and click on Select Computer Groups….

ASR Exclusion

Click on AD Domain Computers… and select an Active Directory group or the Active Directory objects you want to monitor. I used Domain Computers here so that all computers are able to send events. We already selected the computers to monitor by linking and filtering the group policy. After that press OK.

ASR Exclusion

Then press on Select Events…, switch to XML and insert the following to select the Windows Defender Attack Surface Reduction Rules block and audit events (Source):

ASR Exclusion

After that click on the Advanced… button and select Minimize Latency. Then click OK to save the subscription.

ASR Exclusion

Now go back to the administrative cmd and use the following command to set the content format of the subscription to events which is more efficient (see also).

ASR Exclusion

Configure the Team in Microsoft Teams

Go to Microsoft Teams and create or let create a new Team or reuse an existing team. I would recommend to have a dedicated team for this but do as you like.

When you have your team click on the three dots next to the team name select Add channel and create a channel for an ASR rule.

ASR Exclusion

After that click on the three dots next to the channel name and select Connectors.

ASR Exclusion

Search for Incoming Webhook and press the Add button.

ASR Exclusion

Confirm with the__Install__ button that you want to add it to your team.

ASR Exclusion

Give it a name for example Event Collector and upload a picture if you like. The picture will be used in every message sent by the script.

ASR Exclusion

Press on Configure and you will get presented an URL which you should copy.

ASR Exclusion

Repeat these steps for every ASR-rule and for the General channel.

Configure the Scheduled Task

After that copy the following script to your event server:

Now replace the placeholders in the GET-ASRData function (beginning in line 54) with the Webhook-URLs you created in the last step for each rule. Use the URL you create for the General channel for the default value (line 166)
If a new Windows 10 build will contain ASR rules the events will be sent to the General Channel in your teams with the new rule GUID as description. If you want to extend the script to support new rules just extend the $ASRData hash table (line 78) and add a new channel to your team.

Open up the Computer Management and go to Task Scheduler \ Task Scheduler Library and create a New Task.

ASR Exclusion

Give it a name like ASR-Teams, select Run whether a user is logged on or not and select a user account to run the task. In order to use the webhooks the account needs access to the internet, so the System Account might not work if you have to use a Proxy server.

ASR Exclusion

Switch to the Triggers tab, click on New… and choose a reoccurring schedule.

ASR Exclusion

On the Actions tab, click on New… and use the following lines (replace with your location of the script):

Executable:

Arguments:

(If you add the -Verbose parameter a transcript/logfile will be created in the path specified in $FilePath paramater. The default value is %programdata%\master-client)

After that check the Conditions and the Settings tab and press OK.

ASR Exclusion

ASR Exclusion

Now we should have anything in order and as soon as your clients start sending ASR related events to the server you should get them forwarded to Microsoft Teams.

ASR Exclusion

Conclusion

You can now enable the new ASR rules right from the beginning of your Windows 10 1809 deployment and you will get informed if any executable is blocked in Microsoft Teams.

This is a simple proposal how to enable the ASR feature without a high user impact. If you have other tools in place to centralize events and monitor your endpoints use them instead.

Thanks

Thanks to Terence Beggs and SCConfigMgr for the idea and the PowerShell code regarding the Microsoft Teams forwarding.

This information is provided “AS IS” with no warranties, confers no rights and is not supported by the authors.