Skip to main content
ThreatsXDRSIEM

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

FormWhat it looks likeATT&CKWhat gives it away
Rogue accountA local user created with net user /add, then added to AdministratorsT1136.001Event 4720 (account created) followed by 4732 (member added to a security-enabled local group)
SSH keyA key appended to authorized_keys, so a login works with no passwordT1098.004A write to that file by anyone but the owner or your tooling
Scheduled task or serviceA job or service that restarts the implant on a timer or at bootT1053.005 for tasks4698 for tasks, 7045 for services, with an image path in a user-writable folder
Web shellA script in a web root that runs commands sent over HTTPT1505.003The web server process starting a shell, and new files in the web root
Implant or remote access toolA program that calls out or listens for the operatorT1219 for legitimate remote tools used this wayLong-lived connections from an unexpected process, the command and control pattern
Trojanized softwareMalicious code in a build or update of trusted softwareSupply chain compromiseNothing 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 asc

ShellCommand 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_keys

Repeat 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.exe

The 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.

Free

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

More Threats Terms

Career Path

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 Path

Incident Responder Career Guide: Salary & Skills

Incident Responders lead the technical response when confirmed breaches happen. You coordinate containment, run forensic…

Read more
Career Path

SOC 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
Comparison

SOCSimulator vs Hack The Box: Comparison

Different tools for different career paths. SOCSimulator trains defensive analysts. Hack The Box trains offensive securi…

Read more
Tool

XDR Training Console: SOCSimulator

The XDR console in SOCSimulator replicates the investigation workflow of platforms like CrowdStrike Falcon, Microsoft De…

Read more
Tool

SIEM Training Console: SOCSimulator

The SIEM console in SOCSimulator replicates the workflow of enterprise platforms like Splunk Enterprise Security, Micros…

Read more
Technique

MITRE ATT&CK® Techniques: Detection Training Library

Browse all MITRE ATT&CK® techniques with detection strategies and example alerts.

Read more
Career Path

Cybersecurity Career Paths: 2026 Guide

Explore SOC analyst career paths with salary data, required skills, and certification roadmaps.

Read more
Playbook

SOC Investigation Playbooks: Step-by-Step Guides

Practitioner investigation playbooks with decision trees and real SIEM queries.

Read more
Feature

Shift Mode: Real-Time SOC Simulation

Practice alert triage under realistic time pressure with SLA timers and noise injection.

Read more
Feature

Operations: Guided Training Operations

Structured CTF-style investigation operations covering real-world attack scenarios.

Read more
Blog

SOCSimulator Blog: Security Training Insights

Articles on SOC analyst skills, detection engineering, and career development.

Read more