Menu

Post image 1
Post image 2
1 / 2
0

The Accidental C2 - Exploring Dev Tunnels for Remote Access

DEV Community·Mark0·23 days ago
#3BBDD8EV
Reading 0:00
15s threshold

This article explores the repurposing of Visual Studio Code Dev Tunnels for remote access and Command and Control (C2) during Red Team assessments. The research deconstructs the multi-layered protocol—covering REST management, WebSocket tunneling, SSH connection nuances, and MsgPack RPC—to understand how commands are executed and files are manipulated remotely. The author highlights the complexity of the protocol, which deviates from standard SSH implementations to support Microsoft's relay infrastructure. Beyond protocol analysis, the post identifies critical attack vectors including persistence via compromised hosts, lateral movement through credential extraction from VS Code's internal databases, and initial access via Device Code Phishing. It specifically examines how Entra ID features like Family of Client IDs (FOCI) and Nested App Authentication (BroCI) can be leveraged to mint access tokens for Dev Tunnels.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More