This Web3 Interview Task Was Actually a Remote Access Trojan
A fake Web3 interview task pointed at a repository whose dependency chain installed a malicious npm package that fetched and eval'd obfuscated remote code. The deobfuscated payload was a remote access trojan able to run shell commands, capture screenshots, control mouse and keyboard, and exfiltrate system details to a command server.
medium.com
Published on medium.com
A seemingly legitimate Web3 “test assignment” turned out to be a supply chain attack.
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 a malicious dependency that silently installs a second package which fetches obfuscated JavaScript from an external server and executes it with eval, with no integrity checks or review.
Impact
The trojan could execute shell commands, take screenshots, control the mouse and keyboard, read and write the clipboard, and send host and user details to the operator, while hiding its process and persisting.
What the attacker needed
Recruiter contact and test assignment; developer runs the project locally; npm installs dependencies from registry
The fix
Developers should verify dependencies and run unknown project code only in an isolated sandbox or virtual machine.
How it was found
- Receive a recruiter message and a PDF test assignment linking to a repository
- Review the project and notice files referenced but not present in the repository
- Inspect package.json and find the suspicious svg-content-validation dependency
- Read that package's code and see it installs another package silently with no-save and no-audit
- Inspect svg-sizer-responsive and find it fetches JSON and runs the model field through eval
- Deobfuscate the fetched payload to reveal the remote access trojan's capabilities
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 'test assignment' from a supposed recruiter led to a code project that quietly pulled in a small package from the public npm registry. That package downloaded more code from an outside server and ran it on the developer's machine, giving the attacker a remote control tool. The lesson is that running unfamiliar project code can hand over your computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.