Accessibility Features
Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by accessibility features. Windows has accessibility features that may be launched with a key combination before a user has logged in (for example, when the user is on the Windows logon screen). Adversaries may replace or add code to these programs: sethc.exe (Sticky Keys, invoked with Shift x5), utilman.exe (Utility Manager, Win+U), osk.exe (On-Screen Keyboard), Magnify.exe, Narrator.exe, DisplaySwitch.exe, AtBroker.exe. These programs may be replaced with a command shell (cmd.exe) or backdoor, or the Image File Execution Options (IFEO) debugger key can be used to trigger an arbitrary program instead of the accessibility feature, providing a SYSTEM shell at the logon screen without credentials.
let AccessibilityBinaries = dynamic([
"sethc.exe", "utilman.exe", "osk.exe", "Magnify.exe",
"Narrator.exe", "DisplaySwitch.exe", "AtBroker.exe"
]);
let AccessibilityAbuse = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (AccessibilityBinaries)
| where InitiatingProcessFileName !in~ ("winlogon.exe", "svchost.exe")
or AccountName == "SYSTEM" and InitiatingProcessFileName =~ "winlogon.exe"
| extend SuspiciousParent = InitiatingProcessFileName !in~ ("winlogon.exe", "svchost.exe", "explorer.exe")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, SuspiciousParent;
let IFEORegistry = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has "Image File Execution Options"
| where RegistryValueName =~ "Debugger"
| where RegistryKey has_any (AccessibilityBinaries)
| project RegistryTime=Timestamp, DeviceName, AccountName, RegistryKey,
RegistryValueName, RegistryValueData,
InitiatingProcessFileName, InitiatingProcessCommandLine;
let BinaryReplacement = DeviceFileEvents
| where Timestamp > ago(24h)
| where FileName in~ (AccessibilityBinaries)
| where FolderPath has_any ("C:\\Windows\\System32\\", "C:\\Windows\\SysWOW64\\")
| where ActionType in ("FileCreated", "FileModified")
| project FileTime=Timestamp, DeviceName, AccountName, FileName, FolderPath, ActionType,
InitiatingProcessFileName;
union AccessibilityAbuse, (IFEORegistry | extend FileTime=RegistryTime),
(BinaryReplacement | extend RegistryTime=FileTime)
| sort by Timestamp desc, RegistryTime desc, FileTime desc Data Sources
Required Tables
False Positives
- Accessibility software testing by QA teams that invoke accessibility features as part of test automation
- Assistive technology configuration that legitimately modifies accessibility feature behavior for users with disabilities
- Remote desktop sessions where accessibility features are launched by the remote desktop client
- Security testing and penetration testing exercises that specifically test this known technique
References (5)
- https://attack.mitre.org/techniques/T1546/008/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.008/T1546.008.md
- https://www.fireeye.com/blog/threat-research/2012/08/hikit-rootkit-advanced-persistent-attack.html
- https://blogs.technet.microsoft.com/jonathantrull/2016/10/03/detecting-sticky-key-backdoors/
- https://www.mandiant.com/resources/blog/apt41-dual-espionage-and-cyber-crime-operation
Unlock Pro Content
Get the full detection package for T1546.008 including response playbook, investigation guide, and atomic red team tests.