Golang Cobalt Strike Beacon Uses VS Code Tunnels for Command and Control

· Original article ↗

Summary

Researchers traced a Golang Cobalt Strike beacon to a server using VS Code dev tunnels for command and control. The investigation details beacon behavior and indicators, while noting that no specific target has been identified.

Key points

  • Researchers identified a Cobalt Strike server at 189.1.231[.]190, with servers on ports 443 and 1001 using a shared watermark and self-signed TLS certificate.
  • A Golang-compiled beacon communicated with the server and made a request to a VS Code dev tunnel hosted on Microsoft Azure.
  • The beacon checked its execution environment and collected host details, including OS version, hosts file, computer name, and timezone.
  • The tunnel's creation timestamp indicated it was established less than 24 hours before the researchers' analysis was written.
  • The investigation found no evidence identifying a specific target, and researchers cautioned that other domains on the shared Azure host may be unrelated.
  • Defenders are advised to monitor traffic to dev tunnel domains and consider restricting their use where VS Code is not needed.

Article Details

Attack Vectors
  • A Golang-compiled Cobalt Strike beacon communicated with a Cobalt Strike server and made an HTTP GET request to a Visual Studio Code dev tunnel endpoint.
  • The beacon collected host details, including operating system version, hosts file, computer name, and machine timezone; the article says this data was likely exfiltrated.
  • The beacon checked its execution environment using the GetCommandLine API to determine whether it was running in a virtualized environment.
Defensive Notes
  • Monitor traffic to known dev tunnel domains.
  • Scrutinize or restrict Visual Studio Code dev tunnel use in environments where Visual Studio Code is not operational.

Indicators of compromise

TypeIndicatorContext
IPV4189[.]1[.]231[.]190Cobalt Strike C2 server identified by the researchers; the beacon also communicated with it.
SHA256c717d8b26de612e15015cd55940215be336963b6062196f9d847912b98582627SHA-256 hash of the malicious executable identified as a Cobalt Strike beacon.
SHA256eb5ac849e783e3c6eddcd5619ca230b6d8e218e3c7326e0148c21eef3847ff69SHA-256 hash of the self-signed TLS certificate used by the identified Cobalt Strike servers.
URLhxxps[:]//189[.]1[.]231[.]190:1001/sugrecC2 endpoint on the identified server, contacted by the beacon.
URLhxxps[:]//lcjp4gwb-1001[.]asse[.]devtunnels[.]ms/_/passApi/js/wrapper[.]jsVisual Studio Code dev tunnel endpoint contacted by the beacon as part of its communications.

MITRE ATT&CK

People

Malware

Vendors

Products

Tools

Related Articles