The Git Repo Was A Trap Inside A Fake Recruiter Attack That Used Git Hooks And The Blockchain As
A fake recruiter sent a malicious Git repository whose hooks executed a script that downloaded and ran a Node.js-based infostealer. The malware used the blockchain as a resilient command-and-control channel and stole clipboard data, documents, and developer secrets.
Muraleekrishnan Unnithan R Follow
Published on cybersecuritywriteups.com
I got a call from one of our L1 analysts saying multiple alerts had fired on a single endpoint. The analyst had already done the initial triage and walked me through what looked like odd outbound connections and some suspicious process activity.
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 victim executed a malicious Git hook script that was included in a repository sent as part of a fake job assessment, which then downloaded and ran further payloads.
Impact
The attacker could steal clipboard data, sensitive documents, developer secrets, and cryptocurrency wallet information, and maintain persistent access with a self-updating malware that is difficult to take down due to blockchain-based C2.
What the attacker needed
Victim receives LinkedIn message; victim downloads and extracts ZIP; victim runs git command
The fix
Users should check .git/hooks for suspicious scripts before running Git commands from untrusted repositories, and organisations should educate employees about fake recruiter attacks.
How it was found
- The victim received a LinkedIn message from a fake recruiter offering a job and a technical assessment.
- The assessment was a Google Drive link containing a PDF and a ZIP archive with a Git repository.
- The victim extracted the ZIP and ran Git commands, triggering a hook script in .git/hooks.
- The hook script downloaded and executed an OS-specific second script that set up a Node.js environment.
- The second script downloaded and ran an obfuscated JavaScript file (parser.js) that retrieved an encrypted payload from the blockchain and executed it.
- The payload performed clipboard monitoring, file exfiltration, and established persistence.
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 was tricked by a fake job interview into downloading a Git repository. Git repositories can contain hidden scripts called hooks that run automatically when you use Git commands. These scripts installed malware that stole files and passwords and could be controlled through the blockchain, making it hard to shut down.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.