npm typosquat → developer workstation → corporate VPN
Publish a typosquat npm package; the developer's `npm install` runs the postinstall script, exfils SSH keys + VPN profile, then connects to the corporate network.
§ Context
Assumed environment: target organisation uses Node.js heavily. Developers run `npm install` without strict-allowlist policies and have VPN profiles + SSH keys on their laptops.
§ Steps
- 01Connect via stolen VPN profileInitial AccessT1078— Valid Accounts
- 02Wait for developer installInitial AccessT1078— Valid Accounts
- 03Exfil ~/.ssh, ~/.aws, VPN profileCredential AccessT1552— Unsecured Credentials
- 04Pick a likely typosquat nameInitial AccessSUP-NPM-TYPOSQUAT— npm / PyPI / RubyGems Typosquat
- 05Publish package with postinstall payloadExecutionSUP-INSTALL-SCRIPT— Malicious Install Script
- 06Internal pivotDiscoveryN-NMAP-INTERNAL— Internal Nmap Sweep
§ References
- T1078Valid Accounts
- T1552Unsecured Credentials
§ Frequently asked
- What is the "npm typosquat → developer workstation → corporate VPN" attack path?
- Publish a typosquat npm package; the developer's `npm install` runs the postinstall script, exfils SSH keys + VPN profile, then connects to the corporate network. It chains 6 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is Connect via stolen VPN profile (T1078) — a initial access primitive. Assumed environment: target organisation uses Node.
- What is the final impact of this kill-chain?
- The final step lands on Internal pivot (N-NMAP-INTERNAL), which falls under Discovery. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques3
Exposed etcd → cluster-wide secret raid
etcd is reachable without mTLS — read every Secret in the cluster including service-account tokens that grant cluster-admin.
- Shared techniques2
Industroyer2 IEC-104 substation hijack
Timed payload speaks IEC-60870-5-104 to substation RTUs at attacker-chosen hour; sends 'open breaker' commands across a substation, blackouts a grid section.
- Shared techniques2
Dev workstation → cloud backup keys → encrypted vault store (LastPass 2022)
Attacker compromised a single LastPass DevOps engineer's home machine via outdated Plex Media Server, harvested AWS keys for the encrypted-vault backup bucket, exfiltrated production vault data.
- Shared techniques2
F5 BIG-IP iControl auth bypass (CVE-2022-1388) → root on LB
Connection-header smuggle bypasses iControl REST auth, command-injection RCE as root. Load balancers see all traffic — recover TLS keys, session cookies, internal SSO config.
- Shared techniques2
z/OS TN3270 → RACF userID brute → mainframe shell
Internet-/intranet-exposed TN3270 mainframe terminal. Userids follow predictable HR scheme. Brute-force passwords; many environments allow short / dictionary passwords for legacy reasons.
- Shared techniques2
Leaked GitHub PAT → org takeover → supply-chain push
A maintainer's PAT lands in a public Gist (or a Docker image layer). The token has repo + workflow scopes — push a malicious commit to a popular package, fire the auto-publish workflow.