Skip to content
Leaked secrets Write-up Beginner

We Hacked Multi-Billion $ Companies in 30 Minutes with a VSCode Extension

The authors created a malicious Visual Studio Code extension that impersonated a popular theme and exfiltrated source code and host information to a remote server. They published it on the marketplace and quickly gained victims, including employees at large companies.

medium.com

Published on medium.com

30 minutes. 30 minutes is how long it took us to develop, publish, and polish a Visual Studio Code (The most popular IDE on the planet with over 15m monthly users) extension that changes your IDE’s colors while leaking all your source code to a remote server.

Amit Assaraf, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the marketplace's weak verification allowed a copycat extension with a similar name and a verified publisher status obtained by simply registering a similar domain, and the extension's code was not reviewed for malicious behaviour.

Impact

The extension could steal source code and host information from developers, and it was installed inside multiple multi-billion dollar companies, though the authors did not leak actual source code.

What the attacker needed

Ability to publish a VSCode extension; a domain to verify as publisher; victim installs the extension

How it was found

  1. Download the source code of a popular theme extension.
  2. Add code that reads open documents and sends them to a remote server.
  3. Copy marketing resources and register a similar domain to become a verified publisher.
  4. Add a GitHub repository link in the package.json to appear official.
  5. Publish the extension on the VSCode Marketplace.
  6. Wait for users to install it and receive exfiltrated data.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A Visual Studio Code extension is a small add-on that changes how the code editor works. The authors made a fake extension that looked like a popular theme but secretly sent the user's code to their own server. This shows that anyone can publish an extension and it can do harmful things once installed.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.