DSInternals Suspicious PowerShell Cmdlets

Last updated on:

About the rule

Rule Type

Standard

Rule Description

Detects execution and usage of the DSInternals PowerShell module. Which can be used to perform what might be considered as suspicious activity such as dumping DPAPI backup keys or manipulating NTDS.DIT files. The DSInternals PowerShell Module exposes several internal features of Active Directory and Azure Active Directory. These include FIDO2 and NGC key auditing, offline ntds.dit file manipulation, password auditing, DC recovery from IFM backups and password hash calculation.

Severity

Trouble

Rule Requirement

Criteria

Action1: actionname = "Process started" AND COMMANDLINE contains "Add-ADDBSidHistory,Add-ADNgcKey,Add-ADReplNgcKey,ConvertFrom-ADManagedPasswordBlob,ConvertFrom-GPPrefPassword,ConvertFrom-ManagedPasswordBlob,ConvertFrom-UnattendXmlPassword,ConvertFrom-UnicodePassword,ConvertTo-AADHash,ConvertTo-GPPrefPassword,ConvertTo-KerberosKey,ConvertTo-LMHash,ConvertTo-MsoPasswordHash,ConvertTo-NTHash,ConvertTo-OrgIdHash,ConvertTo-UnicodePassword,Disable-ADDBAccount,Enable-ADDBAccount,Get-ADDBAccount,Get-ADDBBackupKey,Get-ADDBDomainController" OR COMMANDLINE contains "Get-ADDBGroupManagedServiceAccount,Get-ADDBKdsRootKey,Get-ADDBSchemaAttribute,Get-ADDBServiceAccount,Get-ADDefaultPasswordPolicy,Get-ADKeyCredential,Get-ADPasswordPolicy,Get-ADReplAccount,Get-ADReplBackupKey,Get-ADReplicationAccount,Get-ADSIAccount,Get-AzureADUserEx,Get-BootKey,Get-KeyCredential,Get-LsaBackupKey,Get-LsaPolicy,Get-SamPasswordPolicy,Get-SysKey,Get-SystemKey,New-ADDBRestoreFromMediaScript,New-ADKeyCredential" OR COMMANDLINE contains "New-ADNgcKey,New-NTHashSet,Remove-ADDBObject,Save-DPAPIBlob,Set-ADAccountPasswordHash,Set-ADDBAccountPassword,Set-ADDBBootKey,Set-ADDBDomainController,Set-ADDBPrimaryGroup,Set-ADDBSysKey,Set-AzureADUserEx,Set-LsaPolicy,Set-SamAccountPasswordHash,Set-WinUserPasswordHash,Test-ADDBPasswordQuality,Test-ADPasswordQuality,Test-ADReplPasswordQuality,Test-PasswordQuality,Unlock-ADDBAccount,Write-ADNgcKey,Write-ADReplNgcKey" select Action1.HOSTNAME,Action1.MESSAGE,Action1.COMMANDLINE,Action1.FILE_NAME,Action1.PROCESSNAME,Action1.USERNAME,Action1.PARENTPROCESSNAME

Detection

Execution Mode

realtime

Log Sources

Active Directory

Author

Nasreddine Bencherchali (Nextron Systems), Nounou Mbeiri