{"id":"d4488827-73af-4f8d-9244-7b7662ef046e","title":"Change User Agents with WebRequest","description":"Adversaries may communicate using application layer protocols associated with web traffic to avoid detection/network filtering by blending in with existing traffic.\nCommands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.\n","author":"frack113","status":"test","level":"medium","date":"2022-01-23","modified":"2025-07-18","tags":["attack.command-and-control","attack.t1071.001"],"technique_ids":["T1071.001"],"logsource":{"product":"windows","category":"ps_script","definition":"Requirements: Script Block Logging must be enabled"},"falsepositives":["Unknown"],"references":["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1071.001/T1071.001.md#t1071001---web-protocols"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_susp_invoke_webrequest_useragent.yml","source_sha256":"8b4b764124078f74ed045f5bfb1e33c6613c345da6126b8b904b5d7d71f6e5d8","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_susp_invoke_webrequest_useragent.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Change User Agents with WebRequest\nid: d4488827-73af-4f8d-9244-7b7662ef046e\nstatus: test\ndescription: |\n    Adversaries may communicate using application layer protocols associated with web traffic to avoid detection/network filtering by blending in with existing traffic.\n    Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1071.001/T1071.001.md#t1071001---web-protocols\nauthor: frack113\ndate: 2022-01-23\nmodified: 2025-07-18\ntags:\n    - attack.command-and-control\n    - attack.t1071.001\nlogsource:\n    product: windows\n    category: ps_script\n    definition: 'Requirements: Script Block Logging must be enabled'\ndetection:\n    selection_webrequest:\n        ScriptBlockText|contains:\n            - 'Invoke-WebRequest'\n            - 'Invoke-RestMethod'\n            - ' irm ' # Space before and after to avoid false positives with 'irm' as a variable\n            - 'iwr '\n    selection_useragent:\n        ScriptBlockText|contains: '-UserAgent '\n    condition: all of selection_*\nfalsepositives:\n    - Unknown\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1071.001","id":"T1071.001","name":"Web Protocols","page":"techniques/enterprise/T1071.001/"}],"data_path":"data/detection-rules/d4488827-73af-4f8d-9244-7b7662ef046e.json","kind":"sigma"}
