DirectorySearcher Powershell Exploitation

 Original Source: [Sigma source]
Title: DirectorySearcher Powershell Exploitation
Status: test
Description:Enumerates Active Directory to determine computers that are joined to the domain
References:
  -https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1018/T1018.md#atomic-test-15---enumerate-domain-computers-within-active-directory-using-directorysearcher
Author: frack113
Date: 2022-02-12
modified:None
Tags:
  • -'attack.discovery'
  • -'attack.t1018'
Logsource:
  • product: windows
  • category: ps_script
  • definition: Requirements: Script Block Logging must be enabled
Detection:
  selection:
    ScriptBlockText|contains|all:
      -'New-Object '
      -'System.DirectoryServices.DirectorySearcher'
      -'.PropertiesToLoad.Add'
      -'.findall()'
      -'Properties.name'

  condition:selection
Falsepositives:
  -Unknown
Level: medium