PowerShell Suspicious Discovery Related Windows API Functions
Detects PowerShell scripts that references native Windows API functions commonly used for discovery of users, groups, shares, sessions, domain trusts, and service security. Attackers use these APIs for situational…
Description
Detects PowerShell scripts that references native Windows API functions commonly used for discovery of users, groups, shares, sessions, domain trusts, and service security. Attackers use these APIs for situational awareness and targeting prior to lateral movement or collection.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 12 ATT&CK techniques it maps to.
- Log source category
- event_index
Known benign triggers
- Legitimate PowerShell scripts that make use of these functions.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
- T1007System Service Discovery12 detections cover this technique
- T1016System Network Configuration Discovery45 detections cover this technique
- T1033System Owner/User Discovery63 detections cover this technique
- T1069Permission Groups Discovery39 detections cover this technique
- T1082System Information Discovery134 detections cover this technique
- T1087Account Discovery91 detections cover this technique
- T1135Network Share Discovery21 detections cover this technique
- T1201Password Policy Discovery18 detections cover this technique
- T1482Domain Trust Discovery43 detections cover this technique
References
| Reference | Cited by |
|---|---|
| github.com/BC-SECURITY/Empire/blob/9259e5106986847d2bb770c4289c0c0f1adf2344/data/module_source/situational_awareness/network/powerview.ps1#L21413 | Only this detection cites it |
| github.com/atc-project/atc-data/blob/master/docs/Logging_Policies/LP_0109_windows_powershell_script_block_log.md | 8 |
From the source
- At source
- Open at source
- Upstream identifier
- 61ac3638-40a3-44b2-855a-985636ca985e
- Tagged by the source as
- Data Source: PowerShell LogsDomain: EndpointNoise: HighOS: WindowsPerformance: NormalPlatform: WindowsProfile: AggressiveResources: Investigation GuideRule Type: Custom Query (KQL)Tactic: CollectionTactic: DiscoveryTactic: ExecutionThreat: Script-Based ExecutionUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3