Suspicious Use Of Web Request Commands And Cmdlets - ScriptBlock (via ps_script)
This rule detects the use of various web request commands with commandline tools and Windows PowerShell cmdlets (including aliases) via PowerShell scriptblock logs
SigmamediumWindowsv1
sigma
suspicious-use-of-web-request-commands-and-cmdlets-scriptblock-via-ps-script
title: Suspicious Use Of Web Request Commands And Cmdlets - ScriptBlock (via ps_script)
id: bf187849-b166-5663-adbf-f4e91029a464
status: stable
description: This rule detects the use of various web request commands with commandline tools and Windows PowerShell cmdlets (including aliases) via PowerShell scriptblock logs
references:
- https://attack.mitre.org/techniques/T1059/001/
- https://4sysops.com/archives/use-powershell-to-download-a-file-with-http-https-and-ftp/
- https://blog.jourdant.me/post/3-ways-to-download-files-with-powershell
author: Huntrule Team
date: 2026-07-13
tags:
- attack.execution
- attack.t1059.001
logsource:
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 '
- 'iwr '
- 'Resume-BitsTransfer'
- 'Start-BitsTransfer'
- 'wget '
- 'WinHttp.WinHttpRequest'
filter:
Path|startswith: 'C:\Packages\Plugins\Microsoft.GuestConfiguration.ConfigurationforWindows\'
condition: selection and not filter
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.