Sigma rule: Change User Agents with WebRequest
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-86f8d18cd3d6, updated 2025-07-18T00:00:00.000Z.
Rule
- Title
- Change User Agents with WebRequest
- Status
- test
- Level
- medium
- Author
- frack113
- Date
- 2022-01-23
- Modified
- 2025-07-18
- File
- rules/windows/powershell/powershell_script/posh_ps_susp_invoke_webrequest_useragent.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Adversaries may communicate using application layer protocols associated with web traffic to avoid detection/network filtering by blending in with existing traffic.
Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.
Log source
- product
- windows
- category
- ps_script
- definition
- Requirements: Script Block Logging must be enabled
Detection
selection_webrequest:
ScriptBlockText|contains:
- 'Invoke-WebRequest'
- 'Invoke-RestMethod'
- ' irm ' # Space before and after to avoid false positives with 'irm' as a variable
- 'iwr '
selection_useragent:
ScriptBlockText|contains: '-UserAgent '
condition: all of selection_*False positives (as the rule lists them)
- Unknown
Tags
- attack.command-and-control
- attack.t1071.001
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_susp_invoke_webrequest_useragent.yml
Sources and licences
SigmaHQ
"Change User Agents with WebRequest" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_invoke_webrequest_useragent.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Change User Agents with WebRequest",
entity page, dataset version ref-86f8d18cd3d6, updated 2025-07-18T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/d4488827-73af-4f8d-9244-7b7662ef046e (accessed 2026-11-03).
Underlying source: SigmaHQ rule d4488827-73af-4f8d-9244-7b7662ef046e, 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.