Notes
Step 1 · Recon
Step one is reconnaissance. The attacker looks before touching anything. Search engines, job ads and public code repositories reveal which technology the company uses. DNS and certificate records list its subdomains. One of them stands out: a staging site, built for testing and then forgotten. Most of this is passive. It reads public information and never touches the target, so the company sees nothing at all.
- search engines, job ads, code repositories
- DNS and certificate records list every subdomain
- found: staging.shoprung.test a forgotten test site
- nothing here touches the target, so nobody sees it
Step 2 · Initial access
Step two is initial access, the first way in. The staging site runs an old build, and its search box is vulnerable to SQL injection, an attack you will run yourself in Part six. The attacker uses it to read the staff table, including password hashes. Notice the pattern: the main site was fine. The way in was something old and forgotten. The other common first doors are a phishing email, a reused password and a key left in public code.
- the staging site runs an old build with a search box
- the search box is open to SQL injection
- result: the staff table, with password hashes
- other common ways in: phishing, stolen passwords, exposed keys
Step 3 · Foothold
Step three is the foothold. One weak password hash cracks offline in minutes. The same password works on the admin page, which has no second factor. The admin page lets staff upload files, so the attacker uploads a small script called a web shell, and can now run commands on the server. Then they add a quiet way back in, in case the first hole is fixed. That is called persistence.
- one weak hash cracks offline
- the same password works on the admin page: no MFA
- the admin page lets staff upload files: a web shell
- now the attacker runs commands on the server, and adds a way back in
Step 4 · Escalate
Step four is privilege escalation. The web server runs as a low-privilege user, which is good practice. But its environment variables hold a cloud access key, and that key belongs to a role allowed to read every storage bucket in the account. Nobody meant to grant that much. It was simply easier at the time. One over-permissive role turns a small break-in into a large one.
- the web server runs as a low-privilege user
- but its environment holds a cloud access key
- the key belongs to a role that can read every bucket
- one over-permissive role is all it takes
Step 5 · Move sideways
Step five is discovery and lateral movement. The attacker lists everything the key can reach. Staging and production share one cloud account, so there is no wall between them. In one bucket sits a nightly backup of the production customer table. The staging server was never the goal. It was only the door. Attackers almost always land somewhere unimportant and then move sideways to what matters.
- list the buckets and databases the key can reach
- staging and production share one account: no wall between find: a nightly backup of the production customer table
- the staging server was never the goal, only the door
Step 6 · Exfiltrate
Step six is exfiltration. The attacker downloads the backup over ordinary encrypted web traffic, at night, so it blends in. Then comes the impact: the data is sold, or the company gets a demand for money to keep it private. For the company that means telling customers, possible fines, lost trust and weeks of cleanup. Count the steps. Six stages, and every single one used something ordinary: a forgotten site, a weak password, a generous role.
- download the backup over normal HTTPS, at night
- it looks like ordinary traffic
- then: sell the data, or demand money to keep it private
- impact: customers, fines, trust, weeks of cleanup
Map 1 · Kill chain
Defenders use two maps to describe attacks like this. The first is the Cyber Kill Chain, from Lockheed Martin. It has seven stages: reconnaissance, weaponization, delivery, exploitation, installation, command and control, and actions on objectives. Its big idea is simple and encouraging. The attacker must complete every stage. The defender only has to break one link, and the earlier the better.
- 1 reconnaissance
- 2 weaponization
- 3 delivery
- 4 exploitation
- 5 installation
- 6 command and control
- 7 actions on objectives
- break one link, the chain stops
Map 2 · MITRE ATT&CK
The second map is MITRE ATT&CK, a free public catalogue built from real incidents. It lists fourteen tactics, which are the attacker's goals, such as initial access, privilege escalation, lateral movement and exfiltration. Under each tactic are techniques, the specific ways to reach that goal, each with an identifier. Security teams use it as a shared language: which techniques can we detect today, and where are we blind?
- 14 tactics: the attacker's goal at each step, from reconnaissance to impact
- techniques: how they do it T1190 exploit a public app T1078 use valid accounts
- built from real incidents
- teams map detections to it
Where to stop it
Now replay it as a defender. An asset inventory would have found and deleted the forgotten staging site. Safe database queries would have blocked the injection. A second login factor would have made the cracked password useless. Least privilege would have kept that key away from every bucket. Separate accounts would have walled off production. And an alert on a large, unusual download would have caught the last step. Six steps, six chances.
- recon: inventory, delete the old staging site
- access: safe queries, patching
- foothold: MFA, strong hashing
- escalate: least privilege, no keys in the environment
- move: separate accounts
- exfiltrate: alert on big reads
Common mistakes
Mistakes. Protecting only the main website while old and test systems sit open. Trusting everything inside the network once someone is in. Running staging and production in one account. Collecting logs that nobody reads. And when an alert finally fires, treating it as the whole incident, cleaning one server, and never asking how the attacker got there or where else they went.
- guarding only the front door
- forgetting old and test systems
- trusting everything inside
- one account for everything
- logs nobody reads
- treating the first alert as the whole incident
Say it like this
In the interview: an attack is a chain. Reconnaissance, initial access, a foothold with persistence, privilege escalation, lateral movement, and then exfiltration or impact. I describe each step with MITRE ATT&CK tactics and techniques, and for each one I want a preventive control and a detective control, because the attacker needs every step to work and we only need to break one.
- "Attacks are a chain: recon, initial access, a foothold with persistence, privilege
- escalation, lateral movement, then exfiltration or impact.
- I map steps to ATT&CK and put
- a preventive and a detective
- control at each one."