{"id":"2cf29f11-e356-4f61-98c0-1bdb9393d6da","title":"Renamed Visual Studio Code Tunnel Execution","description":"Detects renamed Visual Studio Code tunnel execution. Attackers can abuse this functionality to establish a C2 channel","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"high","date":"2023-09-28","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":["Unknown"],"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_renamed_execution.yml","source_sha256":"701aac4d2b1694e39d2d1fdbdc335e89694a6b2f5980ec4bdeb3109130b8312e","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_vscode_tunnel_renamed_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: Renamed Visual Studio Code Tunnel Execution\nid: 2cf29f11-e356-4f61-98c0-1bdb9393d6da\nstatus: test\ndescription: Detects renamed 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)\ndate: 2023-09-28\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_image_only_tunnel:\n        OriginalFileName: null\n        CommandLine|endswith: '.exe tunnel'\n    selection_image_tunnel_args:\n        CommandLine|contains|all:\n            - '.exe tunnel'\n            - '--accept-server-license-terms'\n    selection_image_tunnel_service:\n        CommandLine|contains|all:\n            - 'tunnel '\n            - 'service'\n            - 'internal-run'\n            - 'tunnel-service.log'\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    filter_main_parent_code:\n        ParentImage|endswith:\n            - '\\code-tunnel.exe'\n            - '\\code.exe'\n    filter_main_image_code:\n        Image|endswith:\n            - '\\code-tunnel.exe'\n            - '\\code.exe'\n    condition: (1 of selection_image_* and not 1 of filter_main_image_*) or (selection_parent_tunnel and not 1 of filter_main_parent_*)\nfalsepositives:\n    - Unknown\nlevel: high\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/2cf29f11-e356-4f61-98c0-1bdb9393d6da.json","kind":"sigma"}
