Home

Server 2019 WMI Filters or Security Group Filtering

%3CLINGO-SUB%20id%3D%22lingo-sub-773601%22%20slang%3D%22en-US%22%3EServer%202019%20WMI%20Filters%20or%20Security%20Group%20Filtering%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773601%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20apply%20a%20filter%20for%20specific%20Domain%20Controller%20OS's%20for%20a%20slow%20rollout%20of%20some%20security%20settings.%20Notably%2C%20I%20want%20to%20target%20server%202019%20OS's%20and%20not%20others.%20I%20found%20this%20in%20my%20travels%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Fsecguide%2F2018%2F11%2F20%2Fsecurity-baseline-final-for-windows-10-v1809-and-windows-server-2019%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CFONT%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Fsecguide%2F2018%2F11%2F20%2Fsecurity-baseline-final-for-windows-10-v1809-and-windows-server-2019%2F%3C%2FFONT%3E%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20908px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F124488i0308E855429AB2A3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-07-25_10-27-09.jpg%22%20title%3D%222019-07-25_10-27-09.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3EI%20don't%20mind%20applying%20filtering%20with%20groups%2C%20but%20I've%20never%20added%20DC's%20to%20groups%20before%3B%20I've%20always%20applied%20WMI%20filtering%20before.%20Would%20there%20be%20any%20issues%20with%20adding%20DC's%20to%20a%20group%20and%20applying%20a%20policy%20to%20them%3F%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3EI'm%20just%20checking%20to%20see%20which%20is%20best%20practice%2C%20WMI%20or%20Group%20Filtering%2C%20and%20also%2C%20what%20is%20the%20recommended%20way%20to%20create%20a%20WMI%20filter%20for%20Server%202019%3F%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-773601%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EActive%20Directory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774760%22%20slang%3D%22en-US%22%3ERe%3A%20Server%202019%20WMI%20Filters%20or%20Security%20Group%20Filtering%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774760%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F51768%22%20target%3D%22_blank%22%3E%40Lynn%20Towle%3C%2FA%3E%26nbsp%3BHere%20is%20a%20WMI-Filter%20that%20specifically%20targets%20Windows%20Server%202019%20Domain%20Controllers%20only%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESelect%20BuildNumber%20from%20Win32_OperatingSystem%20WHERE%20BuildNumber%20%3D%2017763%20AND%20BuildNumber%20LIKE%20%22%25%5B123456789%5D%5B0123456789%5D%5B0123456789%5D%5B0123456789%5D%5B0123456789%5D%25%22%20AND%20ProductType%3D%222%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20should%20prefer%20WMI%20filtering%20or%20security%20group%20filtering%20is%20a%20design%20decision%20you%20should%20evaluate%20yourself%20for%20your%20environment.%3C%2FP%3E%3CP%3EIf%20you%20have%20only%20Server%202016%20and%20Server%202019%20domain%20controllers%20you%20could%20use%20the%20Server%202019%20DC%20baseline%20for%20both%20and%20not%20filter%20at%20all.%20I%20can't%20find%20any%20setting%20in%20the%20Server%202019%20baseline%20that%20would%20pose%20a%20problem%20with%20Server%202016.%3C%2FP%3E%3CP%3EIf%20however%20you%20want%20or%20need%20to%20filter%20and%20use%20different%20baselines%2C%20personally%20I%20would%20use%20security%20filtering%20instead%20of%20WMI%20filtering.%20Reason%20being%20that%20WMI-Filters%20are%20much%20slower%20and%20you%20can%20use%20the%20security%20groups%20you%20create%20to%20collect%20different%20servers%20for%20other%20things%20as%20well.%20WMI-filters%20are%20only%20good%20for%20group%20policies%20and%20have%20sometimes%20a%20use%20in%20scripting%2C%20security%20groups%20on%20the%20other%20hand%20can%20be%20used%20for%20many%20different%20things%20(and%20are%20faster%20for%20gpo's).%3B)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774879%22%20slang%3D%22en-US%22%3ERe%3A%20Server%202019%20WMI%20Filters%20or%20Security%20Group%20Filtering%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774879%22%20slang%3D%22en-US%22%3EWe%20are%20looking%20at%20applying%20additional%20security%20mitigations%20outside%20of%20the%20baselines.%20The%20baselines%20are%20applied%20already.%20I%20try%20to%20ensure%20that%20when%20anything%20is%20applied%2C%20its%20applied%20in%20stages%2C%20a%20small%20subset%20of%20servers%2C%20test%2C%20then%20additional%20servers%2C%20so%20on%20and%20so%20forth.%3CBR%20%2F%3E%3CBR%20%2F%3EAdding%20DCs%20to%20a%20security%20group%20%22seems%22%20like%20a%20security%20risk%2C%20you%20are%20now%20opening%20up%20a%20new%20avenue%20of%20attack.%20That%20can%20be%20mitigated%2C%20but%20takes%20a%20bit%20to%20get%20used%20to.%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%20was%20curious%20if%20DCs%20would%20have%20any%20issues%20applying%20policy%20with%20security%20group%20filtering%2C%20are%20there%20any%20base%20security%20settings%2C%20either%20built%20in%2C%20or%20from%20the%20baseline%20that%20would%20stop%20that%20processing%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-774881%22%20slang%3D%22en-US%22%3ERe%3A%20Server%202019%20WMI%20Filters%20or%20Security%20Group%20Filtering%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-774881%22%20slang%3D%22en-US%22%3EAlso%2C%20thanks%20for%20the%20filter.%20I've%20seen%20that%20before%2C%20but%20again%2C%20a%20slightly%20different%20way%20of%20doing%20things%3A)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E
Lynn Towle
Contributor

I want to apply a filter for specific Domain Controller OS's for a slow rollout of some security settings. Notably, I want to target server 2019 OS's and not others. I found this in my travels:

 

https://blogs.technet.microsoft.com/secguide/2018/11/20/security-baseline-final-for-windows-10-v1809...

 

2019-07-25_10-27-09.jpg

 

I don't mind applying filtering with groups, but I've never added DC's to groups before; I've always applied WMI filtering before. Would there be any issues with adding DC's to a group and applying a policy to them?

 

I'm just checking to see which is best practice, WMI or Group Filtering, and also, what is the recommended way to create a WMI filter for Server 2019?

 

3 Replies

@Lynn Towle Here is a WMI-Filter that specifically targets Windows Server 2019 Domain Controllers only:

 

Select BuildNumber from Win32_OperatingSystem WHERE BuildNumber = 17763 AND BuildNumber LIKE "%[123456789][0123456789][0123456789][0123456789][0123456789]%" AND ProductType="2"

 

If you should prefer WMI filtering or security group filtering is a design decision you should evaluate yourself for your environment.

If you have only Server 2016 and Server 2019 domain controllers you could use the Server 2019 DC baseline for both and not filter at all. I can't find any setting in the Server 2019 baseline that would pose a problem with Server 2016.

If however you want or need to filter and use different baselines, personally I would use security filtering instead of WMI filtering. Reason being that WMI-Filters are much slower and you can use the security groups you create to collect different servers for other things as well. WMI-filters are only good for group policies and have sometimes a use in scripting, security groups on the other hand can be used for many different things (and are faster for gpo's). ;)

Highlighted
We are looking at applying additional security mitigations outside of the baselines. The baselines are applied already. I try to ensure that when anything is applied, its applied in stages, a small subset of servers, test, then additional servers, so on and so forth.

Adding DCs to a security group "seems" like a security risk, you are now opening up a new avenue of attack. That can be mitigated, but takes a bit to get used to.

Also was curious if DCs would have any issues applying policy with security group filtering, are there any base security settings, either built in, or from the baseline that would stop that processing?
Also, thanks for the filter. I've seen that before, but again, a slightly different way of doing things :)
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
48 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies