What is Backdoor?
A backdoor is a hidden way into a system that skips the normal login. NIST describes it as an undocumented way of gaining access to a computer system. It can be something an attacker leaves behind, such as a rogue account, an SSH key or a web shell, or code slipped into trusted software, as happened with xz in 2024.
Definition
- Backdoor
- A backdoor is a hidden way into a system that skips the normal login. NIST describes it as an undocumented way of gaining access to a computer system. It can be something an attacker leaves behind, such as a rogue account, an SSH key or a web shell, or code slipped into trusted software, as happened with xz in 2024.
How Backdoor Works
The test that separates a backdoor from the break-in
NIST's glossary has two definitions, and they point at different things. One, from SP 800-82r3, is "an undocumented way of gaining access to a computer system" and adds that a backdoor is a potential security risk. The other, from SP 800-83r1, is "a malicious program that listens for commands on a certain Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port." The first is about the door and the second is about a program that holds it open.
The word ATT&CK uses for the property is persistence, and the backdoor is the thing that provides it. In an incident a simple question sorts the findings: if the original hole were fixed and every password changed tonight, could the attacker still get in tomorrow? If yes, you are looking at a backdoor. The exploit that got them in was the break-in. The account, key or implant they left is the backdoor, and it is the part that survives patching.
Where backdoors live
| Form | What it looks like | ATT&CK | What gives it away |
|---|---|---|---|
| Rogue account | A local user created with net user /add, then added to Administrators | T1136.001 | Event 4720 (account created) followed by 4732 (member added to a security-enabled local group) |
| SSH key | A key appended to authorized_keys, so a login works with no password | T1098.004 | A write to that file by anyone but the owner or your tooling |
| Scheduled task or service | A job or service that restarts the implant on a timer or at boot | T1053.005 for tasks | 4698 for tasks, 7045 for services, with an image path in a user-writable folder |
| Web shell | A script in a web root that runs commands sent over HTTP | T1505.003 | The web server process starting a shell, and new files in the web root |
| Implant or remote access tool | A program that calls out or listens for the operator | T1219 for legitimate remote tools used this way | Long-lived connections from an unexpected process, the command and control pattern |
| Trojanized software | Malicious code in a build or update of trusted software | Supply chain compromise | Nothing in the endpoint log, often a performance or version anomaly |
The web shell row has a full treatment in web shell detection, which is the page for that one. ATT&CK's own detection notes for web shells say to look for web server processes such as w3wp.exe starting command shells or script interpreters like cmd.exe and powershell.exe.
The backdoor no log reported: xz
In March 2024 the xz compression library carried a backdoor in its upstream release tarballs. NVD describes malicious code in the tarballs starting with version 5.6.0, hidden behind obfuscation: the liblzma build process extracts a prebuilt object file from a disguised test file and uses it to modify functions in the library. The result is a modified liblzma that any software linked against it uses, with the data passing through it intercepted and changed. NVD scores CVE-2024-3094 at 10.0.
The discovery is the instructive part. Andres Freund, writing to the oss-security list on 2024-03-29, said he had seen odd symptoms on Debian sid installations over a few weeks: ssh logins using a lot of CPU, and valgrind errors. He traced them to liblzma and concluded the upstream repository and tarballs had been backdoored, in versions 5.6.0 and 5.6.1. No alert said "backdoor". The first symptom was a login that used too much CPU. For a SOC the control that matters once the news breaks is the boring one: a package and version inventory that answers "which of our hosts run 5.6.0 or 5.6.1?" in minutes. The supply chain attack entry and the supply chain compromise playbook cover the process.
Sweeping for backdoors after an intrusion
Treat the sweep as a threat hunt with a known starting point. Closing the entry point does not remove what was planted through it. The order matters: enumerate every backdoor first and remove them together, because removing one while the attacker still holds another tells them you are there. For incident response this is the work between containment and eradication.
A first sweep for the Windows web tier correlates two things: a web server process starting a shell, and an account or group change on the same host in the next two hours.
// IIS worker process started a shell, then an account was created or added to a group on the same host
let shells = SecurityEvent
| where TimeGenerated > ago(1d) and EventID == 4688
| where ParentProcessName endswith @"\w3wp.exe"
| where NewProcessName endswith @"\cmd.exe" or NewProcessName endswith @"\powershell.exe"
| project ShellTime = TimeGenerated, Computer, ShellProcess = NewProcessName, ShellCommand = CommandLine;
SecurityEvent
| where TimeGenerated > ago(1d) and EventID in (4720, 4732)
| join kind=inner shells on Computer
| where TimeGenerated between (ShellTime .. ShellTime + 2h)
| project ShellTime, TimeGenerated, Computer, EventID, SubjectUserName, TargetUserName, MemberName, MemberSid, ShellProcess, ShellCommand
| order by ShellTime ascShellCommand is only filled if process creation command-line auditing is on. For 4720 TargetUserName is the new account. For 4732 it is the group, and on a local group MemberName is "-" even when the new member is a domain account, so read the member from MemberSid. The query follows the documented SecurityEvent schema and has not been run against a live workspace by SOCSimulator.
For Linux, watch the file that holds the keys. The auditctl manual gives the syscall form for a file watch, which is preferred over the deprecated -w:
auditctl -a always,exit -F arch=b64 -F path=/root/.ssh/authorized_keys -F perm=wa -k ssh_authorized_keysRepeat it for the home directory of each account that can log in over SSH. Then check what you cannot watch continuously: the list of local administrators, services and tasks created in the window, and files in the web root newer than your last deployment.
A simulated case
Simulated example generated by SOCSimulator Research. The host, account names and times are invented.
02:14:31 4688 IIS01 w3wp.exe -> cmd.exe /c whoami
02:19:05 EDR IIS01 C:\inetpub\wwwroot\uploads\img_thumb.aspx created
02:21:48 4720 IIS01 account svc_backup created by IIS01$
02:21:52 4732 IIS01 svc_backup added to Administrators (S-1-5-32-544)
02:23:10 7045 IIS01 service WinSyncSvc installed, image path C:\ProgramData\ws\wss.exeThe upload bug that let the attacker in was fixed at 09:00 the same day. That closed the door they used and left three others open: a web shell, an administrator account and a service that restarts an implant. A review that stops at "patched, no further activity" misses all three. The correct reading of this timeline is a list of three things to remove together, plus a reset of any credential that touched the host. The account and the service both appear within ten minutes of the first shell, inside the two-hour window the query above looks at.
Backdoor in SOC Operations
Backdoors are what you hunt for after the alert is closed. The alert gets you to the entry point, and the hunt asks what else was left behind: accounts, keys, tasks, services, files in the web root, remote tools. Build the sweep as a list the whole team uses, with one owner per row, and work it before anyone declares containment complete. Keep the evidence from each find in the ticket: where it was, when it was created, by which account and process. That timeline tells you how long the attacker had access and which credentials to rotate. Two habits save a lot of rework. Check what the machine had before the intrusion, using the baseline or a clean twin, because a service you do not recognize is sometimes a vendor agent. And treat a backdoor you find as proof that the intrusion is wider than the first alert, so search for the same file hash, account name or key on every other host.
Practice Backdoor in a Real SOC
SOCSimulator provides hands-on training with realistic SIEM, XDR, and Firewall interfaces. Build real analyst skills investigating backdoor scenarios with zero consequences, free.
Frequently Asked Questions
- What is a backdoor attack?
- A backdoor attack is one where the attacker plants a hidden way back into a system and uses it later, instead of repeating the original break-in. The planted access can be a new account, an SSH key, a web shell or an implant, or it can arrive inside trusted software, as with the xz library in 2024. It works because it survives a patch and a password reset.
- What are the types of backdoors?
- By where the access lives: a rogue local account, an SSH key added to authorized_keys, a scheduled task or service that restarts an implant, a web shell in a web root, an implant or remote access tool that calls out or listens, and malicious code slipped into trusted software, as with the xz library in 2024. Most are planted after the attacker is already in, using the first break-in to place them. The supply chain case is the exception, because it arrives through a normal update.
- How can you detect a backdoor on a server?
- Enumerate the things that give persistent access instead of waiting for an alert: local administrators and recently created accounts, SSH authorized_keys files, scheduled tasks, services, and new files in the web root. Then look for behavior, such as a web server process starting a shell or a service process holding an outbound connection it never used before. Compare against a known-good baseline.
- How do you remove a backdoor?
- List every backdoor first, then remove them together, because removing one while the attacker holds another tells them you are there. Close the entry point they used, remove the planted accounts, keys, tasks, services and web shells, and reset the credentials that touched the host. Changing passwords alone does not do it: a web shell, an implant, a scheduled task and an SSH key all keep working after every password changes.
- Is a backdoor a virus?
- Not by definition. A backdoor is defined by what it gives the attacker, a way in that skips the normal login. The definition says nothing about how it spreads. NIST's glossary has two definitions, an undocumented way of gaining access to a system and a malicious program that listens for commands on a TCP or UDP port. Some backdoors are malware, such as an implant or a web shell, and others are only a rogue account or an SSH key with no malicious file at all.
Sources
- NIST CSRC Glossary: backdoor
- NVD: CVE-2024-3094 (xz/liblzma malicious code in upstream tarballs)
- Openwall oss-security: backdoor in upstream xz/liblzma leading to ssh server compromise (2024-03-29)
- MITRE ATT&CK: Server Software Component: Web Shell (T1505.003)
- MITRE ATT&CK: Create Account: Local Account (T1136.001)
- MITRE ATT&CK: Account Manipulation: SSH Authorized Keys (T1098.004)
- MITRE ATT&CK: Scheduled Task/Job: Scheduled Task (T1053.005)
- Microsoft Learn: 4732(S) A member was added to a security-enabled local group
- Azure Monitor Logs reference: SecurityEvent table
- Linux manual: auditctl(8)
Related Terms
Persistence is the set of techniques an adversary uses to keep access to a compromised system after ...
A remote access trojan (RAT) is malware that gives an attacker interactive control of an infected co...
A supply chain attack compromises a trusted third-party vendor, software build process, open-source ...
Eradication is the incident response phase where all threat components are permanently removed: malw...
Command and Control (C2) refers to the infrastructure and communication channels adversaries use to ...
A rootkit is malware built to hide itself and other malicious components from the operating system a...
More Threats Terms
Related SOC Training Resources
Threat Hunter Career Guide: Salary & Skills
Threat Hunters do not wait for alerts. You develop hypotheses based on threat intelligence and adversary behavior models…
Read more Career PathIncident Responder Career Guide: Salary & Skills
Incident Responders lead the technical response when confirmed breaches happen. You coordinate containment, run forensic…
Read more Career PathSOC Analyst (Tier 2) Career Guide: Salary & Skills
Tier 2 SOC Analysts handle the investigations that Tier 1 escalates. You dig into multi-stage attacks, coordinate contai…
Read more ComparisonSOCSimulator vs Hack The Box: Comparison
Different tools for different career paths. SOCSimulator trains defensive analysts. Hack The Box trains offensive securi…
Read more ToolXDR Training Console: SOCSimulator
The XDR console in SOCSimulator replicates the investigation workflow of platforms like CrowdStrike Falcon, Microsoft De…
Read more ToolSIEM Training Console: SOCSimulator
The SIEM console in SOCSimulator replicates the workflow of enterprise platforms like Splunk Enterprise Security, Micros…
Read more TechniqueMITRE ATT&CK® Techniques: Detection Training Library
Browse all MITRE ATT&CK® techniques with detection strategies and example alerts.
Read more Career PathCybersecurity Career Paths: 2026 Guide
Explore SOC analyst career paths with salary data, required skills, and certification roadmaps.
Read more PlaybookSOC Investigation Playbooks: Step-by-Step Guides
Practitioner investigation playbooks with decision trees and real SIEM queries.
Read more FeatureShift Mode: Real-Time SOC Simulation
Practice alert triage under realistic time pressure with SLA timers and noise injection.
Read more FeatureOperations: Guided Training Operations
Structured CTF-style investigation operations covering real-world attack scenarios.
Read more BlogSOCSimulator Blog: Security Training Insights
Articles on SOC analyst skills, detection engineering, and career development.
Read more