#threatreport #MediumCompleteness
Living off the Land with VS Code: Inside a Sophisticated Phishing Campaign | 19-05-2026
Source:
joesecurity.org/blog/8858614…
Key details below ↓
💀Threats:
Spear-phishing_technique, Lolbin_technique, Device_code_phishing_technique, Clickonce_tool,
🎯Victims: Government, Public safety, Law enforcement
🌐Geo: Pakistan
📚TTPs:
⚔️Tactics: 2
🛠️Technics: 0
🤖LLM extracted TTPs:`
T1036.008, T1059.005, T1078.004, T1102.003, T1105, T1127.002, T1204.002, T1219, T1547.001, T1566.001, ...
🧨IOCs:
- File: 10
- Hash: 4
- Url: 2
💽Software: Microsoft Word, Discord, Visual Studio Code, Windows service, Internet Explorer, Chrome, Firefox, Microsoft Edge
🔢Algorithms: sha256
🔠Functions: AutoOpen, IsCodeExeRunning
#threatreport:
A sophisticated multi-stage phishing campaign targeting the Punjab Safe Cities Authority (PSCA) and PPIC3 in Pakistan has been analyzed, highlighting the use of intelligent tactics by threat actors. The campaign employed spear-phishing emails that masqueraded as legitimate internal communications regarding the Safe Jail Project, integrating familiar terminology about design work and system layouts. This approach indicated thorough research into the organization's internal structure, which allowed the attackers to use specific recipient names and positions to increase the credibility of the deception.
Key technical components of the phishing attack included a Microsoft Word document that contained macros designed to download and execute a binary named code.exe. The macro was built to capture and exfiltrate device authorization codes via Discord webhooks. Once the document was opened, the malicious macro executed automatically, compromising device security and subsequently preparing a JSON payload to send captured information to Discord, facilitating communication for status updates and data theft.
Notably, the attack exploited the Visual Studio Code (VS Code) command-line interface, creatively repurposing VS Code Remote Tunnels. This legitimate feature typically allows users to link to a remote machine; however, the attackers used it to gain unauthorized access and establish persistence on the compromised device. Once the victim completed Microsoft’s device authentication, this macro informed the attackers through Discord, enabling further malicious actions facilitated by a persistent VS Code tunnel service.
The exploitation of VS Code presented significant risks, as it offered a fully functional development environment that an attacker could manipulate. This manipulation included accessing an integrated terminal for backdoor actions, developing malware on the victim's machine, and executing various commands that may further the attacker's objectives. Rather than relying on traditional backdoor techniques, the threat actors leveraged fraudulently obtained access credentials to incorporate the victim’s system into their malicious infrastructure.
A secondary component of the attack involved a ClickOnce deployment manifest titled ANPR Report.pdf. This file facilitated installation and execution of a .NET payload using Microsoft's ClickOnce technology, designed to retrieve an executable presumably named Adobe.exe, furthering the infection vector. The manifest's unusual naming and versioning suggested a potential impersonation tactic, and the analysis revealed the importance of the environment, with modern Microsoft Edge and Internet Explorer being suitable targets, given their support for ClickOnce and differing handling mechanisms.