Potentially Suspicious Child Process Of VsCode (via process_creation)
This rule detects uncommon or anomalous child processes spawning from a VsCode "code.exe" process. This could indicate an attempt of persistence via VsCode tasks or terminal profiles.
SigmamediumWindowsv1
sigma
potentially-suspicious-child-process-of-vscode-via-process-creation
title: Potentially Suspicious Child Process Of VsCode (via process_creation)
id: 16478783-203b-535f-9363-078d449cf216
status: stable
description: This rule detects uncommon or anomalous child processes spawning from a VsCode "code.exe" process. This could indicate an attempt of persistence via VsCode tasks or terminal profiles.
references:
- https://attack.mitre.org/techniques/T1202/
- https://attack.mitre.org/techniques/T1218/
- https://twitter.com/nas_bench/status/1618021838407495681
- https://twitter.com/nas_bench/status/1618021415852335105
author: Huntrule Team
date: 2026-06-16
tags:
- attack.execution
- attack.stealth
- attack.t1218
- attack.t1202
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith: '\code.exe'
selection_children_images:
Image|endswith:
- '\calc.exe'
- '\regsvr32.exe'
- '\rundll32.exe'
- '\cscript.exe'
- '\wscript.exe'
selection_children_cli:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- '\cmd.exe'
CommandLine|contains:
- 'Invoke-Expressions'
- 'IEX'
- 'Invoke-Command'
- 'ICM'
- 'DownloadString'
- 'rundll32'
- 'regsvr32'
- 'wscript'
- 'cscript'
selection_children_paths:
Image|contains:
- ':\Users\Public\'
- ':\Windows\Temp\'
- ':\Temp\'
condition: selection_parent and 1 of selection_children_*
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.