Bruegel Trade-Policy Lure Uses VS Code Tunnels for Suspected Espionage

Summary
A Windows shortcut disguised as a Bruegel workshop PDF installs Python and an hourly task that uses VS Code Remote Tunnels and GitHub device-code sign-in to seek remote access. The analysis assesses likely espionage targeting trade-policy staff, but finds no known-group
Key points
- A 425 KB Windows shortcut disguised as a PDF embeds a decoy document, batch script, and Python stages.
- The scripts download Python and a payload, then create an hourly scheduled task named MicrosoftEdgeUpdateTask; it can run as SYSTEM when the victim has admin rights.
- The payload uses Microsoft’s VS Code CLI to start a remote tunnel and request GitHub device-code authentication.
- The script sends command output—expected to include the sign-in code, though this was not confirmed in captured reports—along with host details and folder listings to an attacker-controlled endpoint.
- No sign-in code was entered during sandbox runs, so the analysis did not observe an operator connecting; each hourly run closes existing VS Code and Node processes and resets the tunnel.
- The Bruegel trade-policy lure suggests espionage targeting, but the analysis found no link to a known group or country.
- Defenders are advised to monitor for the named task and unusual Python or VS Code paths, and to investigate promptly if a tunnel is approved.
Article Details
- Attack Vectors
- A 425 KB Windows shortcut disguised as a PDF carries an embedded decoy PDF, batch file, and Python script; opening it runs commands while the window starts minimized.
- The batch script extracts the embedded files, and the Python stage downloads winsock.py from a Dropbox share and registers the MicrosoftEdgeUpdateTask scheduled task.
- The payload uses the VS Code tunnel CLI to request a GitHub device sign-in code, then sends the code output and selected host details and directory listings to external endpoints.
- The scheduled task runs immediately and hourly, repeatedly requesting a new sign-in code; when run with administrator rights, it is configured to run as SYSTEM.
- Defensive Notes
- Treat .lnk files as shortcuts regardless of their icon or tooltip; do not open shortcuts delivered inside archives, and request documents through another channel.
- Hunt for code.exe tunnel activity from unusual VS Code folders, pythonw.exe under the Microsoft\Python folder, and MicrosoftEdgeUpdateTask actions that run pythonw.exe.
- Review systems where a VS Code tunnel was approved for persistence added during the reported window of up to an hour of access.
- If VS Code tunnels are not used in the organization, block or alert on the dev-tunnels service and GitHub device-code logins initiated from VS Code.
- Monitor bitsadmin transfers downloading python-*-embed-amd64.zip.
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| DOMAIN | guye2u0j[.]requestrepo[.]com | Exfiltration endpoint where the payload sent its encoded report. |
| HOSTNAME | promotions-highlights-guest-complex[.]trycloudflare[.]com | Cloudflare quick-tunnel hostname used as an additional report destination; the article says it no longer resolved. |
| SHA256 | 5c0367212b9286a1412a1d6205df1af3718a655df0b9b6829a47d6268203fbad | SHA-256 of install.bat, which installs Python and starts the first Python stage. |
| SHA256 | ae8871a6305767b616f611cd6bf908bb1597656c41ae1c5071c2d9ba09004dcf | SHA-256 of the decoy PDF bundled with the malicious shortcut. |
| SHA256 | d1b347bd3ce659a96782e869e897a808194921d9901124c79d31371da4e37a2b | SHA-256 of the malicious LNK shortcut used to launch the infection chain. |
| SHA256 | d5f7fffa6bd0382f0da38e631716c7f6eadbe576af88e155406e8b3f14c45350 | SHA-256 of stage1.py, the script that downloads the payload and sets up persistence. |
| SHA256 | ec6f300a7a2d94cb988018c648c440de31f59fec37c1156044adde3af16d6dd1 | SHA-256 of winsock.py, the payload that drives the VS Code tunnel and sends host reports. |
| URL | hxxps[:]//www[.]dropbox[.]com/scl/fi/i6g1e53ebt2roilm0ji5u/winsock[.]py | Specific Dropbox share URL used to download the winsock.py payload. |
MITRE ATT&CK
T1027 · Obfuscated Files or InformationThe winsock.py payload lightly obfuscates names and hides strings using base64 and XOR.T1033 · System Owner/User DiscoveryThe payload collects the victim's user name and domain along with other host details.T1053.005 · Scheduled Taskstage1.py registers MicrosoftEdgeUpdateTask to run the payload immediately and hourly, configured to run as SYSTEM when the victim has administrator rights.T1059.003 · Windows Command ShellThe LNK points to cmd.exe, which runs the extracted batch script.T1059.006 · Pythonpythonw.exe runs the Python stages, including the script that downloads winsock.py and the payload itself.T1059.007 · JavaScriptThe batch script writes and runs a JScript program through Windows Script Host to extract files embedded in the shortcut.T1082 · System Information DiscoveryThe payload collects the computer name and system details including language and whether the user has administrator rights.T1083 · File and Directory DiscoveryThe payload collects directory listings from Desktop, Documents, Downloads, C:\Users, Program Files, and ProgramData.T1105 · Ingress Tool TransferThe infection chain downloads the Python embeddable package, winsock.py from Dropbox, and the VS Code CLI.T1132.001 · Standard EncodingThe payload base64-encodes its collected report before sending it to the exfiltration endpoints.T1219 · Remote Access ToolsThe payload uses the legitimate VS Code tunnel feature to provide remote terminal and file access after an operator enters the stolen GitHub device code.T1567 · Exfiltration Over Web ServiceThe payload sends its collected report to a requestrepo.com bin and a trycloudflare.com address.
Vendors
CloudflareExfiltration: a requestrepo.com bin and a Cloudflare quick tunnel.DropboxPayload: a Python script from Dropbox that drives the VS Code CLI’s tunnel feature and leaks the GitHub device code plus folder listings.GitHubRight away, and every hour after that, the task has Microsoft’s own VS Code tool request a GitHub sign-in code, then sends the result, which should include the code, to the attacker.MicrosoftRight away, and every hour after that, the task has Microsoft’s own VS Code tool request a GitHub sign-in code, then sends the result, which should include the code, to the attacker.
Products
Microsoft WindowsThe file is a Windows shortcut with a PDF icon.PythonTools used: Malcat, Python, Ghostscript, ANY.RUN, Deception Pro, Triage (hash lookups).VS CodeRight away, and every hour after that, the task has Microsoft’s own VS Code tool request a GitHub sign-in code, then sends the result, which should include the code, to the attacker.
