Sigma rule: PowerShell Script With File Hostname Resolving Capabilities

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-c03b88a8b62e, updated 2023-05-05T00:00:00.000Z.

Rule

Title
PowerShell Script With File Hostname Resolving Capabilities
Status
test
Level
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Date
2023-05-05
File
rules/windows/powershell/powershell_script/posh_ps_resolve_list_of_ip_from_file.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects PowerShell scripts that have capabilities to read files, loop through them and resolve DNS host entries.

Log source

product
windows
category
ps_script
definition
bade5735-5ab0-4aa7-a642-a11be0e40872

Detection

selection:
    ScriptBlockText|contains|all:
        - 'Get-content '
        - 'foreach'
        - '[System.Net.Dns]::GetHostEntry'
        - 'Out-File'
condition: selection

False positives (as the rule lists them)

  • The same functionality can be implemented by admin scripts, correlate with name and creator

Tags

  • attack.exfiltration
  • attack.t1020

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_resolve_list_of_ip_from_file.yml

Sources and licences

  • SigmaHQ

    "PowerShell Script With File Hostname Resolving Capabilities" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_resolve_list_of_ip_from_file.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: PowerShell Script With File Hostname Resolving Capabilities",
entity page, dataset version ref-c03b88a8b62e, updated 2023-05-05T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/fbc5e92f-3044-4e73-a5c6-1c4359b539de (accessed 2026-11-03).
Underlying source: SigmaHQ rule fbc5e92f-3044-4e73-a5c6-1c4359b539de, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.