Windows: Launch-VsDevShell.ps1 Proxy Execution via Process Command Line

Detects command-line usage of Launch-VsDevShell.ps1 with Visual Studio path flags on Windows.

FreeReviewedSigma · Medium · v2
Product
windows
Category
process_creation
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-08-19
Updated
2026-07-31
title: "Windows: Launch-VsDevShell.ps1 Proxy Execution via Process Command Line"
id: d9ba682a-ae7e-4855-89e6-4f600e5d099f
status: test
description: This rule flags process executions where the command line contains 'Launch-VsDevShell.ps1' and also includes one or more Visual Studio path argument strings such as 'VsWherePath ' or 'VsInstallationPath '. Attackers can leverage this Microsoft signed script as a proxy to prepare an environment and run subsequent commands while blending in with legitimate developer tooling. It relies on Windows process creation telemetry with the full command line to match these script and parameter substrings.
references:
  - https://twitter.com/nas_bench/status/1535981653239255040
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_lolbin_launch_vsdevshell.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-08-19
tags:
  - attack.stealth
  - attack.t1216.001
logsource:
  category: process_creation
  product: windows
detection:
  selection_script:
    CommandLine|contains: Launch-VsDevShell.ps1
  selection_flags:
    CommandLine|contains:
      - "VsWherePath "
      - "VsInstallationPath "
  condition: all of selection_*
falsepositives:
  - Legitimate usage of the script by a developer
level: medium
license: DRL-1.1
related:
  - id: 45d3a03d-f441-458c-8883-df101a3bb146
    type: derived