Skip to content
RCE Write-up Intermediate

How I Almost Got Hacked By A Recruiter

A fake recruiter sent a malicious Next.js project that, when started, would fetch and execute code from a typosquatted domain, giving the attacker full access to the victim's computer. The frontend also collected the victim's IP and location.

Ben Follow

Published on systemweakness.com

I got a message on LinkedIn that looked pretty standard, but the offer was exceptionally tempting.

Ben, on systemweakness.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

The project contained a backdoor that fetched and executed remote code via eval() on server start, disguised as a normal dependency.

Impact

If the project had been run, the attacker could have gained full access to the victim's computer, including private keys, browser passwords, and SSH keys.

What the attacker needed

Victim receives a LinkedIn message; victim downloads and runs the project

The fix

The author avoided running the project and used a virtual machine to analyse it safely; the malicious repository should be reported and taken down.

How it was found

  1. Received a LinkedIn message from a fake recruiter offering a job.
  2. Was sent a Bitbucket repository with a coding task.
  3. Downloaded the repository and inspected the code before running it.
  4. Found a backdoor in server/middlewares/validator/index.js that fetches and evals remote code.
  5. Found commented-out steganography code and frontend IP/location harvesting.
  6. Tested the attacker's API on a VM and confirmed it serves a payload when the User-Agent matches axios.

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 person pretended to be a recruiter and sent a coding test project. Hidden in the project was code that, when run, would download and run malicious software from the internet, letting the attacker control the victim's computer. The author spotted it before running the project.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.