Phases of a Cyberattack
The six phases attackers work through, what happens in each, and the evidence each one leaves.
1Attacks happen in phases
Cyberattacks aim to disrupt, harm, steal, or destroy devices, networks, or data. Serious attacks rarely happen in one step. Attackers work in phases: they research the target, get in, make sure they can stay, move toward what they want, take it, and try to cover their tracks.
Not every attack uses every phase. A smash-and-grab might skip persistence; an attacker who lands on the right computer right away may not need lateral movement. But the phases give defenders a map for understanding how far an attack got.
2The six phases
1. Reconnaissance
The attacker gathers as much information as possible about the target, often using open source intelligence (OSINT): freely available information such as company websites, job postings, social media, news articles, and public records. A job posting that lists the company's email and remote-access software tells the attacker what to target. Staff pages give names and roles for phishing.
2. Initial access
The attacker establishes a foothold, a first point of control, on a computer in the target's network. The most common ways in are social engineering (a phishing email, a fake login page) and compromised or weak credentials (a guessed, stolen, or reused password).
3. Persistence
Once inside, the attacker sets up a way to keep access without breaking in again, even if the victim restarts the computer or changes a password. Often this uses a command and control (C2) protocol: a way to send commands to the infected device and receive its output. Two common kinds of malware provide this:
- A remote access trojan (RAT): malware disguised as something harmless that gives the attacker remote control of the computer.
- A rootkit: malware that hides deep in the system, often concealing itself and other malware from the user and security tools.
4. Lateral movement
The first computer is rarely the prize. The attacker moves sideways through the network to other computers and accounts, trying to escalate privileges: gain accounts with more permissions, such as an administrator who can reach every file server. Saved passwords, shared accounts, and poorly protected admin tools make this easier.
5. Taking action
The attacker acts on their objective: collecting the targeted data, exfiltrating it (copying it out of the network to a place the attacker controls), and/or disrupting services or destroying data, for example with ransomware.
6. Evading detection
In the final phase, many attackers try to hide what they did by removing or editing log files and erasing files they planted, such as malware. A log that suddenly has a gap, or a security log that was cleared at 3 AM, is itself evidence.
3Reading an incident
Investigators rebuild an attack by putting events in order and assigning each to a phase. Here is a reconstructed timeline from one company's breach:
| When | What happened | Phase |
|---|---|---|
| Mon 09:12 | Job posting reviewed: lists the company's email and VPN products | Reconnaissance |
| Tue 14:40 | Phishing email opened by a receptionist; password typed into a fake login page | Initial access |
| Tue 15:05 | Attacker signs in as the receptionist; installs a remote access tool | Persistence |
| Wed 02:30 | Receptionist's computer connects to an outside server every 10 minutes | Persistence |
| Thu 01:15 | Attacker uses a saved admin password found on a shared drive to reach the file server | Lateral movement |
| Fri 03:00 | 8 GB of customer records copied and sent to an outside address | Taking action |
| Fri 03:40 | Security log on the file server cleared; remote access tool deleted | Evading detection |
Read across the phases and the attack becomes a story: public research, a phishing foothold, a RAT phoning home, a saved admin password unlocking the file server, a large overnight transfer, and a cleared log. Notice the Wednesday 02:30 line: a computer contacting an outside server on a steady schedule is the C2 channel at work.
4Why the phases help defenders
| Phase | Evidence defenders might see | Controls that interrupt it |
|---|---|---|
| Reconnaissance | Very little; most research uses public sources | Share less publicly; train staff on what attackers learn from posts |
| Initial access | A clicked link, a login from a new device, failed logins | Phishing training, MFA, strong unique passwords |
| Persistence | New programs set to start automatically; regular check-ins to an unknown server | Anti-malware, blocking unknown outbound traffic, monitoring startup items |
| Lateral movement | One account signing in to many computers; new admin logins | Least privilege, separating the network into segments, protecting admin accounts |
| Taking action | Large data transfers out; files suddenly encrypted | Data-loss monitoring, backups, encryption of sensitive data |
| Evading detection | Cleared or edited logs; missing files | Sending copies of logs to a separate, protected system |
The earlier an attack is stopped, the less damage it does. Each phase is a chance to catch it, and the phase tells you what the attacker probably did before and will try next.
5Worked examples
Seven events
Assign each event in the timeline above to its phase and explain the Thursday event.
- 1Monday: reading a public job posting is reconnaissance (OSINT).
- 2Tuesday 14:40: the phishing email and captured password are initial access.
- 3Tuesday 15:05 and Wednesday: installing a remote access tool and its regular outside check-ins are persistence (a C2 channel).
- 4Thursday: using a saved admin password to reach the file server is lateral movement with privilege escalation: the attacker went from a receptionist's account to an administrator's.
- 5Friday 03:00: copying records out is taking action (exfiltration). Friday 03:40: clearing the log and deleting the tool is evading detection.
What the attacker learned for free
Before attacking a school district, an attacker finds: a staff directory with emails, a job ad for an “IT technician familiar with our Microsoft 365 and Cisco VPN,” and a teacher's post about the new grading system. How does each help?
- 1Staff directory: names and email format for phishing.
- 2Job ad: the exact email and remote-access products, so the attacker knows which fake login page to build and which flaws to look for.
- 3Teacher's post: a believable topic for a phishing message (“action needed on the new grading system”).
The computer that keeps calling out
An analyst notices that one office computer connects to the same unknown internet address every 10 minutes, all night, even when no one is using it. Which phase is this, and what is likely happening?
- 1Regular automatic contact with an outside server, with nobody at the computer, fits a command and control channel.
- 2That suggests malware such as a RAT is installed and checking in for instructions.
- 3That is persistence: the attacker keeps a way back in.
The missing hour
A server's security log has entries every few minutes, except between 02:00 and 03:10 on Saturday, where it is empty. Then a line records the log being cleared. What does this suggest?
- 1Normal servers do not stop logging for an hour.
- 2A cleared log is an action someone took, and it is itself recorded.
- 3This fits the evading-detection phase: an attacker removing evidence of what they did in that window.
The ransomware smash-and-grab
An attacker guesses a weak password on an internet-facing server, immediately runs ransomware on it, and leaves a ransom note. No tools were left behind, and no other computers were touched. Which phases were used?
- 1Initial access: the guessed password.
- 2Taking action: encrypting the server's files.
- 3No persistence, no lateral movement, and no attempt to hide.
6Common mistakes
Persistence keeps access to a computer the attacker already reached. Lateral movement reaches new computers and higher-permission accounts.
Much reconnaissance uses public sources: websites, job ads, social media. Nothing is broken into.
Missing or cleared logs are a classic sign of the evading-detection phase. Investigate them.
Some attacks skip phases or move fast. Assign phases based on the evidence, not the list.
Collecting gathers the data inside the network. Exfiltrating copies it out to somewhere the attacker controls. Both belong to taking action.
“The repeated connections from the receptionist's computer to an outside server every 10 minutes show the persistence phase: a remote access trojan is using a command and control channel so the attacker can keep sending commands without regaining access.”
Name the phase, point to the evidence, and explain what the attacker gains in that phase.