EXPLORE
← Back to Explore
sigmamediumHunting

VsCode Code Tunnel Execution File Indicator

Detects the creation of a file with the name "code_tunnel.json" which indicate execution and usage of VsCode tunneling utility. Attackers can abuse this functionality to establish a C2 channel

Detection Query

selection:
  TargetFilename|endswith: \code_tunnel.json
condition: selection

Author

Nasreddine Bencherchali (Nextron Systems)

Created

2023-10-25

Data Sources

windowsFile Events

Platforms

windows

Tags

attack.command-and-controldetection.threat-hunting
Raw Content
title: VsCode Code Tunnel Execution File Indicator
id: 9661ec9d-4439-4a7a-abed-d9be4ca43b6d
status: test
description: |
    Detects the creation of a file with the name "code_tunnel.json" which indicate execution and usage of VsCode tunneling utility. Attackers can abuse this functionality to establish a C2 channel
references:
    - https://ipfyx.fr/post/visual-studio-code-tunnel/
    - https://badoption.eu/blog/2023/01/31/code_c2.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-10-25
tags:
    - attack.command-and-control
    - detection.threat-hunting
logsource:
    category: file_event
    product: windows
detection:
    selection:
        TargetFilename|endswith: '\code_tunnel.json'
    condition: selection
falsepositives:
    - Legitimate usage of VsCode tunneling functionality will also trigger this
level: medium