MITRE ATT&CKsub-technique
T1053.002 At
- Domain
- enterprise
- Tactics
- Execution, Persistence, Privilege Escalation
- Platforms
- Windows, Linux, macOS
- Version
- 2.4
- Created
- 2019-11-27
Description
Adversaries may abuse the at utility to perform task scheduling for initial or recurring execution of malicious code. The at utility exists as an executable within Windows, Linux, and macOS for scheduling tasks at a specified time and date. Although deprecated in favor of Scheduled Task's schtasks in Windows environments, using at requires that the Task Scheduler service be running, and the user to be logged on as a member of the local Administrators group. In addition to explicitly running the `at` command, adversaries may also schedule a task with at by directly leveraging the Windows Management Instrumentation `Win32_ScheduledJob` WMI class.
On Linux and macOS, at may be invoked by the superuser as well as any users added to the at.allow file. If the at.allow file does not exist, the at.deny file is checked. Every username not listed in at.deny is allowed to invoke at. If the at.deny exists and is empty, global use of at is permitted. If neither file exists (which is often the baseline) only the superuser is allowed to use at.
Adversaries may use at to execute programs at system startup or on a scheduled basis for Persistence. at can also be abused to conduct remote Execution as part of Lateral Movement and/or to run a process under the context of a specified account (such as SYSTEM).
In Linux environments, adversaries may also abuse at to break out of restricted environments by using a task to spawn an interactive system shell or to run system commands. Similarly, at may also be used for Privilege Escalation if the binary is allowed to run as superuser via sudo.
Related
Subtechnique of · MITRE ATT&CK (1)
- T1053 Scheduled Task/Job technique
Tactic · MITRE ATT&CK (3)
Referenced by MITRE ATT&CK · mitigates (4)
Referenced by MITRE ATT&CK · uses (6)
Referenced by Compliance · mitigates (14)
- CIS-6.8 Define and Maintain Role-Based Access Control CIS Safeguard v8.1
- NIST-AC-2 Account Management NIST 800-53 control
- NIST-AC-3 Access Enforcement NIST 800-53 control
- NIST-AC-5 Separation of Duties NIST 800-53 control
- NIST-AC-6 Least Privilege NIST 800-53 control
- NIST-CM-2 Baseline Configuration NIST 800-53 control
- NIST-CM-5 Access Restrictions for Change NIST 800-53 control
- NIST-CM-6 Configuration Settings NIST 800-53 control
- NIST-CM-7 Least Functionality NIST 800-53 control
- NIST-CM-8 System Component Inventory NIST 800-53 control
- NIST-IA-2 Identification and Authentication (Organizational Users) NIST 800-53 control
- NIST-IA-4 Identifier Management NIST 800-53 control
- NIST-RA-5 Vulnerability Monitoring and Scanning NIST 800-53 control
- NIST-SI-4 System Monitoring NIST 800-53 control
References
- https://www.linkedin.com/pulse/getting-attacker-ip-address-from-malicious-linux-job-craig-rowland/ rowland linux at 2019
- https://gtfobins.github.io/gtfobins/at/ GTFObins at
- https://man7.org/linux/man-pages/man1/at.1p.html Linux at
- https://x.com/leoloobeek/status/939248813465853953 Twitter Leoloobeek Scheduled Task
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-other-object-access-events Microsoft Scheduled Task Events Win10
- https://technet.microsoft.com/library/dd315590.aspx TechNet Scheduled Task Events
- https://www.cybereason.com/blog/wmi-lateral-movement-win32#blog-subscribe Malicious Life by Cybereason
- https://technet.microsoft.com/en-us/sysinternals/bb963902 TechNet Autoruns
- https://social.technet.microsoft.com/Forums/en-US/e5bca729-52e7-4fcb-ba12-3225c564674c/scheduled-tasks-history-retention-settings?forum=winserver8gen TechNet Forum Scheduled Task Operational Setting