Sigma rule: Usage Of Web Request Commands And Cmdlets - ScriptBlock

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-fdf2fa32d2f4, updated 2025-10-20T00:00:00.000Z.

Rule

Title
Usage Of Web Request Commands And Cmdlets - ScriptBlock
Status
test
Level
medium
Author
James Pemberton / @4A616D6573
Date
2019-10-24
Modified
2025-10-20
File
rules/windows/powershell/powershell_script/posh_ps_web_request_cmd_and_cmdlets.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects the use of various web request commands with commandline tools and Windows PowerShell cmdlets (including aliases) via PowerShell scriptblock logs

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection:
    ScriptBlockText|contains:
        - '[System.Net.WebRequest]::create'
        - 'curl '
        - 'Invoke-RestMethod'
        - 'Invoke-WebRequest'
        - ' irm ' # Space before and after to avoid false positives with 'irm' as a substring
        - 'iwr '
        # - 'Net.WebClient' # There are various other rules that cover this, so it is commented out
        - 'Resume-BitsTransfer'
        - 'Start-BitsTransfer'
        - 'wget '
        - 'WinHttp.WinHttpRequest'
filter:
    Path|startswith: 'C:\Packages\Plugins\Microsoft.GuestConfiguration.ConfigurationforWindows\'
condition: selection and not filter

False positives (as the rule lists them)

  • Use of Get-Command and Get-Help modules to reference Invoke-WebRequest and Start-BitsTransfer.

Tags

  • attack.execution
  • attack.t1059.001

MITRE ATT&CK ids this rule names

Related rules

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_web_request_cmd_and_cmdlets.yml

Sources and licences

  • SigmaHQ

    "Usage Of Web Request Commands And Cmdlets - ScriptBlock" by James Pemberton / @4A616D6573 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_web_request_cmd_and_cmdlets.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: Usage Of Web Request Commands And Cmdlets - ScriptBlock",
entity page, dataset version ref-fdf2fa32d2f4, updated 2025-10-20T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/1139d2e2-84b1-4226-b445-354492eba8ba (accessed 2026-11-03).
Underlying source: SigmaHQ rule 1139d2e2-84b1-4226-b445-354492eba8ba, 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.