T1546: Event Triggered Execution

Adversaries may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events. Various operating systems have means to monitor and subscribe to events such as logons or other user activity such as running specific applications/binaries. Cloud environments may also support various functions and services that monitor and can be invoked in response to specific cloud events.

Adversaries may abuse these mechanisms as a means of maintaining persistent access to a victim via repeatedly executing malicious code. After gaining access to a victim system, adversaries may create/modify event triggers to point to malicious content that will be executed whenever the event trigger is invoked.

Since the execution can be proxied by an account with higher permissions, such as SYSTEM or service accounts, an adversary may be able to abuse these triggered execution mechanisms to escalate their privileges.

Positive Technologies products that cover the technique

MaxPatrol SIEM knowledge base

mitre_attck_privilege_escalation: PT-CR-1353: PrivEsc_Via_Comctl32: An exploitation of a logical error when creating a folder that requires administrator rights to access. This exploitation allows to elevate user's privilege level to SYSTEM when a specific trigger triggers. unix_mitre_attck_persistence: PT-CR-1029: Unix_Sensitive_File_Modification: Sensitive files were opened mitre_attck_persistence: PT-CR-1997: EventViewer_Registry_Modify: The registry key responsible for redirecting to help for the Event Viewer component has been changed. An attacker can put in it the path to the file that will be executed when getting help, to be persisted on the target system

Subtechniques

Expert Required. The technique is detected only with the combination of «PT Product + Expert»

Detection

IDDS0011Data source and componentModule: Module LoadDescription

Monitor DLL loads by processes, specifically looking for DLLs that are not recognized or not normally loaded into a process. Look for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as making network connections for Command and Control, learning details about the environment through Discovery, and conducting Lateral Movement.

IDDS0005Data source and componentWMI: WMI CreationDescription

Monitor for newly constructed WMI Objects that may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events.

IDDS0022Data source and componentFile: File MetadataDescription

Monitor for contextual data about a file, which may include information such as name, the content (ex: signature, headers, or data/media), user/owner, permissions, etc.

IDDS0022Data source and componentFile: File CreationDescription

Monitor newly constructed files that may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events.

IDDS0022Data source and componentFile: File ModificationDescription

Monitor for changes made to files that may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events.

IDDS0024Data source and componentWindows Registry: Windows Registry Key ModificationDescription

Monitor for changes made to windows registry keys and/or values that may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events.

IDDS0017Data source and componentCommand: Command ExecutionDescription

Monitor executed commands and arguments that may establish persistence and/or elevate privileges using system mechanisms that trigger execution based on specific events.

IDDS0025Data source and componentCloud Service: Cloud Service ModificationDescription

Monitor the creation and modification of cloud resources that may be abused for persistence, such as functions and workflows monitoring cloud events.

IDDS0009Data source and componentProcess: Process CreationDescription

Tools such as Sysinternals Autoruns can be used to detect changes to execution triggers that could be attempts at persistence. Also look for abnormal process call trees for execution of other commands that could relate to Discovery actions or other techniques.

Mitigation

IDM1051NameUpdate SoftwareDescription

Perform regular software updates to mitigate exploitation risk.

IDM1026NamePrivileged Account ManagementDescription

Manage the creation, modification, use, and permissions associated to privileged accounts, including SYSTEM and root.