Automatic Windows event auditing

๐Ÿ”’ Secure Bits ๐Ÿ’ก

๐—”๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ถ๐—ฐ ๐—ช๐—ถ๐—ป๐—ฑ๐—ผ๐˜„๐˜€ ๐—ฎ๐˜‚๐—ฑ๐—ถ๐˜๐—ถ๐—ป๐—ด ๐—ถ๐—ป ๐——๐—ฒ๐—ณ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ฟ ๐—ณ๐—ผ๐—ฟ ๐—œ๐—ฑ๐—ฒ๐—ป๐˜๐—ถ๐˜๐˜† ๐—ป๐—ผ๐˜„ ๐—ด๐—ผ๐—ฒ๐˜€ ๐—ฏ๐—ฒ๐˜†๐—ผ๐—ป๐—ฑ ๐—ฑ๐—ผ๐—บ๐—ฎ๐—ถ๐—ป ๐—ฐ๐—ผ๐—ป๐˜๐—ฟ๐—ผ๐—น๐—น๐—ฒ๐—ฟ๐˜€

You can now enable Windows event auditing on ๐—”๐—— ๐—–๐—ฆ, ๐—”๐—— ๐—™๐—ฆ and ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—˜๐—ป๐˜๐—ฟ๐—ฎ ๐—–๐—ผ๐—ป๐—ป๐—ฒ๐—ฐ๐˜ servers automatically. The servers have to run the ๐˜€๐—ฒ๐—ป๐˜€๐—ผ๐—ฟ ๐˜ƒ๐Ÿฏ.๐˜… to get the audit configuration automatically.

๐Ÿ› ๏ธ ๐—ช๐—ต๐—ฒ๐—ฟ๐—ฒ ๐˜๐—ผ ๐˜๐˜‚๐—ฟ๐—ป ๐—ถ๐˜ ๐—ผ๐—ป:

Microsoft Defender portal โ†’ Settings โ†’ Identities โ†’ General โ†’ Advanced features โ†’ ๐—”๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ถ๐—ฐ ๐—ช๐—ถ๐—ป๐—ฑ๐—ผ๐˜„๐˜€ ๐—ฎ๐˜‚๐—ฑ๐—ถ๐˜๐—ถ๐—ป๐—ด ๐—ฐ๐—ผ๐—ป๐—ณ๐—ถ๐—ด๐˜‚๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป

๐—ช๐—ต๐—ฎ๐˜ ๐˜๐—ต๐—ฒ ๐˜€๐—ฒ๐—ป๐˜€๐—ผ๐—ฟ ๐—ฐ๐—ผ๐—ป๐—ณ๐—ถ๐—ด๐˜‚๐—ฟ๐—ฒ๐˜€:

– Directory services advanced auditing: audit entries in the SACL of the domain root object

– NTLM auditing: the required registry values

– Domain object auditing: the SACL on the Configuration partition

– AD FS: object-level auditing on the AD FS configuration container, plus the Audit Application Generated policy (Success and Failure)

– AD CS: the required value in the CA audit filter in the CA registry configuration

– Entra Connect: the Audit Logon policy (Success and Failure)

– The local Windows audit policies

The sensor writes the settings to the local system policy of the server and repeats the check once every 24 hours.

โš ๏ธ ๐—•๐—ฒ๐—ณ๐—ผ๐—ฟ๐—ฒ ๐˜†๐—ผ๐˜‚ ๐˜๐˜‚๐—ฟ๐—ป ๐—ถ๐˜ ๐—ผ๐—ป:

– AD FS: event auditing in AD FS Management and verbose logging stay manual (Set-AdfsProperties -AuditLevel Verbose)

– If Sensor v2.x is still in use, you have to do it manually

– GPO settings can conflict with the local settings that the sensor applies

๐Ÿ“„ ๐—–๐—ต๐—ฒ๐—ฐ๐—ธ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฐ๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ป๐˜ ๐˜€๐˜๐—ฎ๐˜๐—ฒ ๐—ณ๐—ถ๐—ฟ๐˜€๐˜:

New-MDIConfigurationReport -Path “C:Reports” -Mode Domain -OpenHtmlReport

(DefenderForIdentity PowerShell module)

Do your AD FS, AD CS and Entra Connect servers already run the v3.x sensor?

Author: Martin Strnad