This repository contains the Audit-DS module.
This module is designed for DS auditing purposes. More details will be added soon.
Imports GPO settings to enable auditing.
Exports comprehensive Active Directory information to files.
-zip: Compresses output files into a zip archive.- Also runs
Export-UserSecurityautomatically and writes its files into the same output folder.
Exports administrative users based on group membership and adminCount.
-OutputPath: Path to export the CSV file.
Exports LDAP events from domain controllers.
-MaxEvents: Maximum number of events to retrieve (default: 10000).-Days: Number of days back from the current date to limit events (default: 7).-IgnoredDCs: Specifies one or more Domain Controller names to ignore (e.g., 'DC1', 'DC2', 'DC3').
Exports NTLM authentication events from domain controllers.
-MaxEvents: Maximum number of events to retrieve (default: 10000).-AllNTLM: Includes NTLM V2 events (default: only NTLM V1).-Days: Number of days back from the current date to limit events (default: 7).-IgnoredDCs: Specifies one or more Domain Controller names to ignore (e.g., 'DC1', 'DC2', 'DC3').
Exports SMB1 access events from the local server.
-MaxEvents: Maximum number of events to retrieve (default: 10000).-Days: Number of days back from the current date to limit events (default: 7).
Exports computer OS details and end-of-support status from Active Directory.
-OutputPath: Path to export the CSV file.-ExportAll: Exports all computers, not just those nearing or past end-of-support.
Exports the default security descriptor for the AD user schema class and the current AdminSDHolder ACL.
-OutputPath: Path where the security CSV and SDDL files will be written.- Exports the parsed user class default security descriptor to CSV.
- Checks whether
EveryoneandNT AUTHORITY\SELFhave theUser-Change-Passwordright. - Exports the current
AdminSDHolderACL, the expected baseline, a detailed diff CSV, and a summary CSV.
UserClass-DefaultSecurityDescriptor.txt: RawdefaultSecurityDescriptorSDDL value from the ADuserclass in schema.UserClass-DefaultSecurityDescriptor.csv: Parsed ACE rows from the user class default descriptor.UserClass-ChangePasswordCheck.csv: Validation result for the requiredUser-Change-PasswordACEs forEveryoneandNT AUTHORITY\SELF.AdminSDHolder-SDDL.txt: Raw SDDL for currentCN=AdminSDHolder,CN=System,<domainDN>permissions.AdminSDHolder-CurrentAccess.csv: Parsed current AdminSDHolder ACL entries.AdminSDHolder-Baseline.csv: Baseline ACL entries used for comparison.AdminSDHolder-BaselineDiff.csv: Detailed ACE-level differences between current ACL and baseline.AdminSDHolder-BaselineSummary.csv: High-level comparison summary with match status and counts.
- Run directly:
Export-UserSecurity -OutputPath C:\AuditOutput\UserSecurity - Run as part of full collection:
Export-ADInfo(callsExport-UserSecurityautomatically and saves files in the same output folder)
Lists domain controllers with specific details.
Sets the maximum size for Security and Directory Service event logs on domain controllers.
-Size: Specifies the maximum log size in GB (Valid: 2, 3, or 4. Default: 2).-IgnoredDCs: Specifies one or more Domain Controller names to ignore (e.g., 'DC1', 'DC2', 'DC3').
- Download latest release from https://github.com/Aabayoumy/Audit-DS/releases/latest
- Open PowerShell as Admin and CD to extracted folder.
- Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force Import-Module -Name .\AuditModule -Force