Social engineering attacks people instead of software. Developers are a favourite target because they hold the keys: repository access, cloud credentials, CI tokens and production databases. One convincing message to the right engineer can bypass every firewall the company owns.
In this lesson you will learn the patterns aimed specifically at engineers, the psychological levers they pull, and the habits and technical controls that make these attacks fail.
An attacker who wants into a company rarely starts with the servers. They start with a person who has access and a reason to move fast. Engineers fit that profile: they run code from strangers daily (packages, gists, take-home assignments), keep long-lived secrets on laptops (SSH keys, .env files, cloud CLI sessions), and respond quickly to urgent messages from "the CTO".
| Pattern | How it looks | What the attacker gains |
|---|---|---|
| Fake recruiter or client | "Clone this repo and run the demo before the interview" | Code execution via a postinstall script |
| Typosquatted package | lodahs or expres in npm install | Malware inside node_modules |
| Urgent executive request | "Push the hotfix without review, the client is waiting" | Unreviewed code in production |
| Help desk pretext | "I am from IT, read me the MFA code" | Account takeover |
| Fake CI notification | "Workflow failed, sign in to view logs" | Credentials typed into a cloned page |
Every row shares one structure: a plausible role, a believable reason, and pressure to act before thinking. The pressure comes from three levers: authority (a manager is obeyed, not questioned), urgency (deadlines shut down careful thinking) and familiarity (real project names, the team's chat tone, a reply inside an existing thread). Two of the three together is the signal to slow down.
Never verify a request through the channel it arrived on. If an email asks for an urgent deploy, call the sender. Write this down as policy so nobody feels awkward doing it:
## Verification policy
- Requests to share credentials, MFA codes or tokens are refused, always.
- Requests to skip review, disable a control or send money need confirmation
by phone or in person, never by replying to the original message.
- Unknown archives and executables are opened only inside a disposable VM.A short written policy removes the social cost of saying "let me check first".
Running a stranger's project is the same as letting them type on your keyboard. A malicious package needs only one line:
{
"name": "innocent-demo",
"scripts": {
"postinstall": "node ./setup.js"
}
}That setup.js runs with your permissions the moment npm install finishes. Reduce the blast radius first:
# Install without running lifecycle scripts, then inspect them
npm install --ignore-scripts
grep -A3 '"scripts"' node_modules/innocent-demo/package.json
# Run untrusted projects in a container with no host secrets mounted
docker run --rm -it -v "$PWD":/app -w /app node:22 npm testKeep secrets out of the working directory: a .env file in the repo is readable by any script you run; an OS keychain is not.
Awareness reduces clicks, but technical controls make a successful click harmless:
Finally, report suspected attempts immediately, even after clicking; early reports stop the campaign before it reaches a colleague.
A "recruiter" asks you to clone and run a take-home project before an interview. What is the safest first step?
--ignore-scripts and run untrusted projects in isolated environments.Next lesson: Passwords, Hashing and Multi-Factor Authentication — how credentials are stored safely and why a second factor matters.