← Back to SOC feed Coverage →

DSInternals Suspicious PowerShell Cmdlets

sigma HIGH SigmaHQ
T1059.001
imProcessCreate
powershell
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-05-12T11:00:00Z · Confidence: medium

Hunt Hypothesis

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.DI

Detection Rule

Sigma (Original)

title: DSInternals Suspicious PowerShell Cmdlets
id: 43d91656-a9b2-4541-b7e2-6a9bd3a13f4e
related:
    - id: 846c7a87-8e14-4569-9d49-ecfd4276a01c
      type: similar
status: test
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.
references:
    - https://github.com/MichaelGrafnetter/DSInternals/blob/39ee8a69bbdc1cfd12c9afdd7513b4788c4895d4/Src/DSInternals.PowerShell/DSInternals.psd1
author: Nasreddine Bencherchali (Nextron Systems), Nounou Mbeiri
date: 2024-06-26
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        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'
            - 'Get-ADDBGroupManagedServiceAccount'
            - 'Get-ADDBKdsRootKey'
            - 'Get-ADDBSchemaAttribute'
            - 'Get-ADDBServiceAccount'
            - 'Get-ADDefaultPasswordPolicy'
            - 'Get-ADKeyCredential' # Covers 'Get-ADKeyCredentialLink'
            - 'Get-ADPasswordPolicy'
            - 'Get-ADReplAccount'
            - 'Get-ADReplBackupKey'
            - 'Get-ADReplicationAccount'
            - 'Get-ADSIAccount'
            - 'Get-AzureADUserEx'
            - 'Get-BootKey'
            - 'Get-KeyCredential'
            - 'Get-LsaBackupKey'
            - 'Get-LsaPolicy' # Covers 'Get-LsaPolicyInformation'
            - 'Get-SamPasswordPolicy'
            - 'Get-SysKey'
            - 'Get-SystemKey'
            - 'New-ADDBRestoreFromMediaScript'
            - 'New-ADKeyCredential' # Covers 'New-ADKeyCredentialLink'
            - 'New-ADNgcKey'
            - 'New-NTHashSet'
            - 'Remove-ADDBObject'
            - 'Save-DPAPIBlob'
            - 'Set-ADAccountPasswordHash'
            - 'Set-ADDBAccountPassword' # Covers 'Set-ADDBAccountPasswordHash'
            - 'Set-ADDBBootKey'
            - 'Set-ADDBDomainController'
            - 'Set-ADDBPrimaryGroup'
            - 'Set-ADDBSysKey'
            - 'Set-AzureADUserEx'
            - 'Set-LsaPolicy' # Covers 'Set-LSAPolicyInformation'
            - 'Set-SamAccountPasswordHash'
            - 'Set-WinUserPasswordHash'
            - 'Test-ADDBPasswordQuality'
            - 'Test-ADPasswordQuality'
            - 'Test-ADReplPasswordQuality'
            - 'Test-PasswordQuality'
            - 'Unlock-ADDBAccount'
            - 'Write-ADNgcKey'
            - 'Write-ADReplNgcKey'
    condition: selection
falsepositives:
    - Legitimate usage of DSInternals for administration or audit purpose.
level: high

KQL (Azure Sentinel)

imProcessCreate
| where TargetProcessCommandLine contains "Add-ADDBSidHistory" or TargetProcessCommandLine contains "Add-ADNgcKey" or TargetProcessCommandLine contains "Add-ADReplNgcKey" or TargetProcessCommandLine contains "ConvertFrom-ADManagedPasswordBlob" or TargetProcessCommandLine contains "ConvertFrom-GPPrefPassword" or TargetProcessCommandLine contains "ConvertFrom-ManagedPasswordBlob" or TargetProcessCommandLine contains "ConvertFrom-UnattendXmlPassword" or TargetProcessCommandLine contains "ConvertFrom-UnicodePassword" or TargetProcessCommandLine contains "ConvertTo-AADHash" or TargetProcessCommandLine contains "ConvertTo-GPPrefPassword" or TargetProcessCommandLine contains "ConvertTo-KerberosKey" or TargetProcessCommandLine contains "ConvertTo-LMHash" or TargetProcessCommandLine contains "ConvertTo-MsoPasswordHash" or TargetProcessCommandLine contains "ConvertTo-NTHash" or TargetProcessCommandLine contains "ConvertTo-OrgIdHash" or TargetProcessCommandLine contains "ConvertTo-UnicodePassword" or TargetProcessCommandLine contains "Disable-ADDBAccount" or TargetProcessCommandLine contains "Enable-ADDBAccount" or TargetProcessCommandLine contains "Get-ADDBAccount" or TargetProcessCommandLine contains "Get-ADDBBackupKey" or TargetProcessCommandLine contains "Get-ADDBDomainController" or TargetProcessCommandLine contains "Get-ADDBGroupManagedServiceAccount" or TargetProcessCommandLine contains "Get-ADDBKdsRootKey" or TargetProcessCommandLine contains "Get-ADDBSchemaAttribute" or TargetProcessCommandLine contains "Get-ADDBServiceAccount" or TargetProcessCommandLine contains "Get-ADDefaultPasswordPolicy" or TargetProcessCommandLine contains "Get-ADKeyCredential" or TargetProcessCommandLine contains "Get-ADPasswordPolicy" or TargetProcessCommandLine contains "Get-ADReplAccount" or TargetProcessCommandLine contains "Get-ADReplBackupKey" or TargetProcessCommandLine contains "Get-ADReplicationAccount" or TargetProcessCommandLine contains "Get-ADSIAccount" or TargetProcessCommandLine contains "Get-AzureADUserEx" or TargetProcessCommandLine contains "Get-BootKey" or TargetProcessCommandLine contains "Get-KeyCredential" or TargetProcessCommandLine contains "Get-LsaBackupKey" or TargetProcessCommandLine contains "Get-LsaPolicy" or TargetProcessCommandLine contains "Get-SamPasswordPolicy" or TargetProcessCommandLine contains "Get-SysKey" or TargetProcessCommandLine contains "Get-SystemKey" or TargetProcessCommandLine contains "New-ADDBRestoreFromMediaScript" or TargetProcessCommandLine contains "New-ADKeyCredential" or TargetProcessCommandLine contains "New-ADNgcKey" or TargetProcessCommandLine contains "New-NTHashSet" or TargetProcessCommandLine contains "Remove-ADDBObject" or TargetProcessCommandLine contains "Save-DPAPIBlob" or TargetProcessCommandLine contains "Set-ADAccountPasswordHash" or TargetProcessCommandLine contains "Set-ADDBAccountPassword" or TargetProcessCommandLine contains "Set-ADDBBootKey" or TargetProcessCommandLine contains "Set-ADDBDomainController" or TargetProcessCommandLine contains "Set-ADDBPrimaryGroup" or TargetProcessCommandLine contains "Set-ADDBSysKey" or TargetProcessCommandLine contains "Set-AzureADUserEx" or TargetProcessCommandLine contains "Set-LsaPolicy" or TargetProcessCommandLine contains "Set-SamAccountPasswordHash" or TargetProcessCommandLine contains "Set-WinUserPasswordHash" or TargetProcessCommandLine contains "Test-ADDBPasswordQuality" or TargetProcessCommandLine contains "Test-ADPasswordQuality" or TargetProcessCommandLine contains "Test-ADReplPasswordQuality" or TargetProcessCommandLine contains "Test-PasswordQuality" or TargetProcessCommandLine contains "Unlock-ADDBAccount" or TargetProcessCommandLine contains "Write-ADNgcKey" or TargetProcessCommandLine contains "Write-ADReplNgcKey"

Required Data Sources

Sentinel TableNotes
imProcessCreateEnsure this data connector is enabled

False Positive Guidance

MITRE ATT&CK Context

References

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_dsinternals_cmdlets.yml