LevelBlue Shows How Backdoored Electron Apps Can Evade Defenses

· Original article ↗

Summary

LevelBlue GSOC demonstrates how modifying Electron app files can deliver a Meterpreter payload for persistence or hollow Microsoft Teams to run Loki C2 despite WDAC. The report details detection indicators and defensive measures.

Key points

  • The report demonstrates inserting JavaScript into GitHub Desktop’s main.js or Microsoft Teams’ app.asar to download and launch a Meterpreter payload that persists after the Electron app exits.
  • In a separate demonstration, replacing Teams resources with a Loki C2 agent allowed it to run under the trusted, WDAC-safelisted application; the original Teams app stopped working.
  • The analysis identifies potential Loki indicators including connections to Azure Blob Storage subdomains (*.blob.core[.]windows[.]net), an unusual --user-data-dir path, and deletion of application files by an unrelated process.
  • For backdoored apps, suggested detection signals include unexpected child processes, JavaScript file modifications, unexpected network connections and network scanning.
  • LevelBlue recommends installing Electron apps in non-user-writable directories, cataloging expected applications and behavior, establishing baselines, and enabling file-event monitoring.
  • The report says APT27 was documented by researchers as having backdoored the Electron app Mimi Chat in 2021–2022, gaining a foothold on Windows and macOS targets.

Article Details

Attack Vectors
  • Backdoor an installed Electron application by modifying files such as main.js or app.asar to download and execute a Meterpreter payload.
  • Replace the resources of a WDAC-safelisted Microsoft Teams installation with a Loki C2 agent, allowing the agent to run under the trusted Electron application.
  • The article reports that APT27 was documented as backdooring Mimi Chat during 2021–2022 to compromise Windows and macOS targets.
Defensive Notes
  • Install Electron applications in non-user-writable directories and do not rely on application safelisting alone.
  • Baseline expected application behavior and monitor for unrelated processes modifying Electron JavaScript files or deleting application resources.
  • Investigate unexpected child processes, network scanning, unusual external connections, and Electron processes using a --user-data-dir path under AppData\Roaming.
  • Enable file event monitoring and catalog the Electron applications expected in the environment.

Indicators of compromise

TypeIndicatorContext
IPV410[.]0[.]5[.]3Attacker-controlled Linux host in the report's demonstration; served the staged Meterpreter payload and received the reverse-shell C2 connection.

MITRE ATT&CK

People

Threat Actors

Vendors

Products

Tools

Related Articles