Terminal Services DLL T1505.005
- Tactic
- Persistence
- Platform
- Windows
- Version
- 1.0
- Created
- 28 March 2022
- Last modified
- 24 October 2025
Adversaries may abuse components of Terminal Services to enable persistent access to systems. Microsoft Terminal Services, renamed to Remote Desktop Services in some Windows Server OSs as of 2022, enable remote terminal connections to hosts. Terminal Services allows servers to transmit a full, interactive, graphical user interface to clients via RDP.[1]
Offense vs defense T1505.005
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
How it got here
Adversary activity (campaign spans) over cumulative rule output. Each source is plotted independently from zero, so neither line includes the other. Campaign dates are year-granularity.
Terminal Services DLL detection strategy DET0212
MITRE names one behaviour worth catching for this technique and breaks it into 1 analytic, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detection Strategy for T1505.005 – Terminal Services DLL Modification (Windows)
AN0595 · Windows
Adversary modifies or replaces the Terminal Services DLL (termsrv.dll) or changes the associated ServiceDll Registry value to load an arbitrary or patched DLL that enables persistent and enhanced RDP access. This may include binary replacement, registry tampering, and unexpected module loads by the svchost.exe -k termsvcs process.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Module LoadDC0016 | WinEventLog:Sysmon | EventCode=7 |
| Process CreationDC0032 | WinEventLog:Sysmon | EventCode=1 |
| File CreationDC0039 | WinEventLog:Sysmon | EventCode=11 |
| Windows Registry Key ModificationDC0063 | WinEventLog:Security | EventCode=4657 |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| TargetDLLPath | Defenders may tune for non-standard DLLs loaded by svchost.exe or termsrv.exe processes. |
| RegistryKeyTarget | Environment-specific variations in the path to ServiceDll registry key (e.g., nested group policies). |
| TimeWindow | Correlation time window for registry change followed by DLL load or svchost restart. |
| ParentProcessName | Some environments may spawn registry changes from automation tools or administrative scripts. |
Regularly check component software on critical services that adversaries may target for persistence to verify the integrity of the systems and identify if unexpected changes have been made.
Consider using Group Policy to configure and block modifications to Terminal Services parameters in the Registry.
Tests from Atomic Red Team (MIT licence) · technique definition