{"id":"90d6bd71-dffb-4989-8d86-a827fedd6624","title":"Visual Studio Code Tunnel Execution","description":"Detects Visual Studio Code tunnel execution. Attackers can abuse this functionality to establish a C2 channel","author":"Nasreddine Bencherchali (Nextron Systems), citron_ninja","status":"test","level":"medium","date":"2023-10-25","modified":"2025-10-29","tags":["attack.command-and-control","attack.t1071.001","attack.t1219"],"technique_ids":["T1071.001","T1219"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Legitimate use of Visual Studio Code tunnel"],"references":["https://ipfyx.fr/post/visual-studio-code-tunnel/","https://badoption.eu/blog/2023/01/31/code_c2.html","https://code.visualstudio.com/docs/remote/tunnels"],"source_path":"rules/windows/process_creation/proc_creation_win_vscode_tunnel_execution.yml","source_sha256":"31c208cc67402377f5db253460e1ff90588474f88e0cb27bdb4a02ce0b7eb6c7","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_vscode_tunnel_execution.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Visual Studio Code Tunnel Execution\nid: 90d6bd71-dffb-4989-8d86-a827fedd6624\nstatus: test\ndescription: Detects Visual Studio Code tunnel execution. Attackers can abuse this functionality to establish a C2 channel\nreferences:\n    - https://ipfyx.fr/post/visual-studio-code-tunnel/\n    - https://badoption.eu/blog/2023/01/31/code_c2.html\n    - https://code.visualstudio.com/docs/remote/tunnels\nauthor: Nasreddine Bencherchali (Nextron Systems), citron_ninja\ndate: 2023-10-25\nmodified: 2025-10-29\ntags:\n    - attack.command-and-control\n    - attack.t1071.001\n    - attack.t1219\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_only_tunnel:\n        OriginalFileName: null\n        CommandLine|endswith: '.exe tunnel'\n    selection_tunnel_args:\n        CommandLine|contains|all:\n            - '.exe tunnel'\n            - '--accept-server-license-terms'\n    selection_parent_tunnel:\n        ParentCommandLine|endswith: ' tunnel'\n        Image|endswith: '\\cmd.exe'\n        CommandLine|contains|all:\n            - '/d /c '\n            - '\\servers\\Stable-'\n            - 'code-server.cmd'\n    condition: 1 of selection_*\nfalsepositives:\n    - Legitimate use of Visual Studio Code tunnel\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/"},{"key":"enterprise/T1219","id":"T1219","name":"Remote Access Tools","page":"techniques/enterprise/T1219/"}],"data_path":"data/detection-rules/90d6bd71-dffb-4989-8d86-a827fedd6624.json","kind":"sigma"}
