windows_hardening icon indicating copy to clipboard operation
windows_hardening copied to clipboard

Skip checks for DC if server is not domain controller

Open alexmateescu opened this issue 3 years ago • 4 comments

HI.
Would it be possible to add a check for the type of server and if not domain controller to skip the checks that only apply to the DCs?

Your tool is great but it yields some false positives if the Server is a Member and not DC. Example below:

[*] Domain role: MemberServer [$] ID 2.3.5.1, Domain controller: Allow server operators to schedule tasks (DC), Result=, Recommended=0, Severity=Medium

alexmateescu avatar Aug 31 '21 08:08 alexmateescu

I think the easiest way is to split the CIS lists into member server and DC, similar to the Microsoft Security Baselines. I'll look into it

0x6d69636b avatar Aug 31 '21 16:08 0x6d69636b

also related to the above and why i think there should be some flags to turn on or off checks is because there 2 other checks that only apply if servers are running IIS or HyperV and again the results can show the setting as being wrong but is not actually. 2.2.18.2 and 2.2.32.

alexmateescu avatar Sep 02 '21 13:09 alexmateescu

I think the easiest way is to split the CIS lists into member server and DC, similar to the Microsoft Security Baselines. I'll look into it

Just a suggestion to have fewer files to maintain: add a column "applies to" (like from the MS Security Baseline Windows 10)

image

image

That column then could be compared to $MachineInformation.CsDomainRole. Also since there is e.g. no MSFT auditconfig for the StandaloneWorkstation Type some checks wouldn't fail if you audit them against a non-Domain Member Server

lordfiSh avatar Sep 21 '21 16:09 lordfiSh

@lordfiSh's suggestion would be a plausible approach. I don't want to introduce too much complexity, besides everyone has the possibility to create their own lists and remove findings or define recommendations according to their own needs. I am still considering a solution

0x6d69636b avatar Sep 22 '21 05:09 0x6d69636b