Visual Studio is a robust integrated development environment provided by Microsoft and is primarily utilized for creating applications on the “.NET framework.”

It caters to various programming languages such as “C#,” “VB.NET,” and “C++.”

A recent discovery by Cyble Research and Intelligence Labs revealed that attackers have repurposed Visual Studio code into a tool for remote access.

Visual Studio Code: An Instrument for Remote Access

Investigators recently came across an intricate cyber attack initiative that kicks off with a malicious “.LNK” file.

This particular file is potentially circulated through spam emails, showcasing a false “Installation Successful” notification in ‘Chinese’ while covertly fetching a “Python package” (‘python-3.12.5-embed-amd64.zip’).

Through this file, a folder is generated at “%LOCALAPPDATA%MicrosoftPython” which subsequently runs an obscured Python script (‘update.py’) fetched from ‘paste[.]ee’ with no detections on ‘VirusTotal.’

The malicious software establishes permanence by setting up a timed task named “MicrosoftHealthcareMonitorNode” that operates every 4 hours or on logon with “SYSTEM privileges.”

If Visual Studio Code (“VSCode”) is not detected, the malware downloads the “VSCode CLI” from Microsoft’s servers (“az764295.vo.msecnd[.]net”) and uses it to form a remote conduit to generate an alphanumeric activation code of “8 characters,” facilitating “unauthorized remote access.”

The script then gathers extensive system details from ‘critical directories’ (“C:Program Files, C:Program Files (x86),” “C:ProgramData,” “C:Users”), ‘active processes,’ ‘language settings,’ ‘location,’ ‘computer name,’ ‘username,’ ‘user domain,’ and ‘privilege levels.’

Infection chain (Source – Cyble)

This compiled data is encoded in “Base64” and transmitted to a “C&C server” at “requestrepo[.]com/r/2yxp98b3,” using strategies akin to the approaches followed by the “Stately Taurus” Chinese APT group.

After successfully getting hold of the dispatched information, malefactors capitalize on unauthorized access through GitHub’s validation system by heading to “hxxps://github[.]com/login/device” and leveraging pilfered alphanumeric activation codes.

This grants them the capability to set up a VSCode tunnel connection to the victim’s system, providing full control over the system’s “files,” “directories,” and “command-line interface (terminal).”

Accessing Files using VScode Tunnel (Source – Cyble)

Through this compromised VSCode tunnel connection, invaders can wield potent hacking utilities like Mimikatz (for capturing credentials), LaZagne (for recovering passwords), In-Swor (for exploring systems), and Tscan (for examining networks).

The attack sequence begins with a harmful .LNK file (Windows shortcut) integrating an obfuscated Python script, evading traditional security measures.

Following this establishment, this unsanctioned access empowers malevolent actors to conduct diverse malicious actions:-

  • Managing system files
  • Extracting sensitive data
  • Adjusting system settings
  • Deploying additional malicious payloads

This intricate attack strategy demonstrates how legitimate development tools such as VSCode can be subverted through social manipulation and technical exploitation.

Guidelines

Below are outlined all the recommendations:-

  • Deploy advanced endpoint protection
  • Regularly inspect timed tasks
  • Educate users on dubious files/links
  • Restrict software installations and endorse apps
  • Monitor unusual actions and analyze logs

The post Hackers Turned Visual Studio Code As A Remote Access Tool appeared first on Cyber Security News.