Securing Active Directory (AD) is a critical priority for organizations. Misconfigurations in AD, such as excessive permissions, outdated protocols, or unprotected service accounts, are common targets for attackers.
Traditional methods of manually running disjointed PowerShell scripts to audit AD environments are time-consuming, error-prone, and ill-suited for modern security demands.
To address this gap, cybersecurity professionals Niels Hofland and Justin Perdok developed InvokeADCheck, an open-source PowerShell module designed to automate AD security assessments and identify vulnerabilities with precision.
InvokeADCheck for AD Assessments
The project originated from practical challenges faced during AD audits. “During an assessment, I struggled with a collection of individual scripts that lacked consistency in formatting and output,” explained Hofland.
Existing tools, such as Sean Metcalf’s Invoke-TrimarcADChecks, provided inspiration but were limited to single-domain forests. Collaborating with Pereira, the team leveraged the ModuleBuild framework to refactor disparate scripts into a unified tool capable of evaluating diverse AD configurations.
InvokeADCheck performs over 20 targeted checks across key security areas:
- Account Vulnerabilities: Inactive users, default administrator settings, and guest account status.
- Group Policy Risks: Misconfigured Group Policy Objects (GPOs) and exposed credentials in Group Policy Preferences (GPP).
- Delegation Flaws: Kerberos delegation settings and unprotected service accounts.
- Domain Health: Functional levels, tombstone lifetime, and backup status.
By consolidating these checks, the module eliminates the need for manual script execution, reducing human error and ensuring comprehensive coverage.
The tool’s flexibility shines in its output options. Administrators can run specific checks (e.g., Invoke-ADCheck -Checks UserAccountHealth, GPO
) or perform full scans, with results displayed in the command-line interface (CLI) or exported to JSON, Excel, or CSV formats. For example, the UserAccountHealth
check flags accounts with non-expiring passwords or stale last-login dates while GPPPassword
detects lingering credentials in SYSVOL—a common attack vector.
powershellPS C:> Invoke-ADCheck -Checks UserAccountHealth -OutputTypes CLI, XLSX -OutputPath C:Reports
Results highlight critical issues in red, such as Anonymous LDAP access or DCSync privileges granted to non-administrators. The accompanying Excel report details attribute-level findings, enabling prioritized remediation.
The module’s architecture separates concerns into 30+ private functions (e.g., Get-IADKerberosDelegation
, Write-IADOutput
) and a public Invoke-ADCheck
a function that handles parameter parsing and output formatting. Dependency management ensures prerequisites like the AD PowerShell module are installed automatically.
InvokeADCheck is optimized for smaller, single-domain environments. “Larger enterprises with multi-forest setups should consider complementary tools like PingCastle or commercial solutions,” notes Pereira. The developers also caution that while the tool identifies risks, contextual analysis by AD experts remains essential.
Available on GitHub under a permissive license, InvokeADCheck encourages community contributions. Planned enhancements include cloud-hybrid AD checks and integration with MITRE ATT&CK frameworks.
This tool offers a pragmatic balance between automation and granularity for teams resource-constrained yet committed to AD security, proving that streamlined PowerShell solutions can fortify even the most complex directories.
As cyber threats grow more sophisticated, tools like InvokeADCheck exemplify how open-source innovation can democratize enterprise security.
By transforming fragmented scripts into cohesive workflows, Eeden and Pereira have provided administrators with a vital ally in the relentless battle against AD vulnerabilities.
Collect Threat Intelligence on the Latest Malware and Phishing Attacks with ANY.RUN TI Lookup -> Try for free