Disabled and deleted logs
| Class | Persistence |
|---|---|
| Also known as | Log clearing; indicator removal; covering tracks |
| OWASP Top 10 | A09:2025 Security Logging and Alerting Failures |
| MITRE ATT&CK | T1685.002 Disable or Modify Cloud Log (formerly T1562.008) T1685.006 Clear Linux or Mac System Logs T1070 Indicator Removal |
| Typical severity | High |
| Affects | Log files under /var/log on Linux servers, cloud audit logs such as AWS CloudTrail, Microsoft 365 auditing, and audit tables inside an application |
A log is written by the system it describes, so whoever takes control of that system can rewrite the record too. An intruder with root rights on a Linux server can empty the file where sign-ins are stored, and one with enough permissions in a cloud account can stop the audit log before doing anything else.12 The missing entries delay the moment anyone notices and make the order of events hard to rebuild afterwards, even when forensic work recovers some of them.3
Removal is often selective. Instead of wiping a file, the intruder deletes the entries that would stand out, such as a login from an unfamiliar address, and leaves enough in place for the file to look like normal activity.3
On a server
Most Linux system logs are files under /var/log. Authentication events go to auth.log or secure, and utmp and wtmp hold login records.1 These are the files intruders clear. Salt Typhoon removed .bash_history, auth.log, lastlog, wtmp and btmp, and TeamTNT deleted /var/log/syslog.1 VPN gateways get the same treatment. APT5 used a utility called THINBLOOD to clear SSL VPN log files, and in the Cutting Edge campaign the attackers cleared logs and returned compromised systems to a clean state to get around the vendor's mitigations for CVE-2023-46805 and CVE-2024-21887.3 The steps that follow a break-in on a server are in Responding to an unrecognised server login.
In a cloud account
Cloud providers record management actions, such as creating a server or changing a permission, in an audit log. Where that log is something the customer configures, an identity with the right permissions, such as the one behind a stolen cloud key, can switch it off. On AWS the blunt version is to stop or delete the trail in CloudTrail, the account's audit log; quieter versions remove the notification topic attached to it, turn off logging in other Regions, or turn off validation or encryption of the log files.2 The attack toolkit Pacu, from Rhino Security Labs, has a module that disables or restricts CloudTrail and VPC flow logs.2
Providers differ in what can be switched off. Google Cloud writes Admin Activity audit logs whatever the settings, even when the Cloud Logging API is disabled, but leaves Data Access audit logs off by default for every service except BigQuery.4
In 2026 the ATT&CK catalogue moved log clearing and log disabling into a new technique, Disable or Modify Tools (T1685), under a tactic called Defense Impairment. The old ids T1562.008, T1070.001 and T1070.002 now forward to it.21
APT29 and Purview Audit
In August 2022 Mandiant reported that APT29, an espionage group it has tracked since at least 2014 and considers likely sponsored by Russia's foreign intelligence service, was turning off Purview Audit for chosen accounts in Microsoft 365 tenants it had entered.5 Purview Audit, available with E5 licences and some add-ons, includes the Mail Items Accessed record: the user, IP address, user agent and time of every access to a mail item, through Outlook, a browser or the Graph API alike. With it off, the group went after the inboxes, and the organisation had no log that could show which accounts were targeted or when.5
The same gap opens when a user is moved from an E5 licence to E3, or when the PowerShell command Set-MailboxAuditBypassAssociation turns off logging of mail access for that user.2 Mandiant added a module to its Azure AD Investigator tool that lists users whose advanced auditing is off.5
Keeping a copy out of reach
A protection set on the server can be removed by anyone with root on that server. The append-only attribute, set with chattr +a, lets a file be opened only to add to it, but root can clear the attribute as easily as set it.6 A copy survives an intruder with full rights when it sits on another system and leaves the server as soon as each entry is written.17
On a server that logs through the systemd journal, systemd-journal-upload sends entries to a collecting server, by default over HTTPS on port 19532, and keeps sending new ones as they appear.8 Forward Secure Sealing uses a key made with journalctl --setup-keys so that later edits to the stored journal files do not go unnoticed.9
# create a sealing key for the local journal
journalctl --setup-keys
# send journal entries to a separate log server
systemd-journal-upload --url=https://logs.example.com:19532On AWS, an organization trail created from the management account is copied into every member account, and users in a member account cannot delete it, stop it or change which events it records.10 A key for one member account therefore cannot silence it. Within any account, the permission to change logging settings belongs only to the people who need it.2
An application's own audit table follows the same idea: rows go in through a database account that may only write log data, and the table accepts new rows but not edits or deletes.711 Every read of the logs is itself recorded.7
Noticing that logging stopped
Logging that has been switched off records nothing afterwards, so the check watches for the change in settings itself or for a log source that falls silent.7 Amazon GuardDuty raises Stealth:IAMUser/CloudTrailLoggingDisabled when a trail is turned off, at Low severity by default, and a Medium finding when logging for Amazon Bedrock is disabled.12 Without GuardDuty, an alert on the API calls StopLogging, DeleteTrail and UpdateSink from anyone who does not normally change logging settings covers the same ground.2 For per-user auditing such as Purview Audit, the sign is a monitored mailbox whose activity records stop arriving.2 Which events deserve an alert at all is the subject of Security logging and alerting.
In SecFlash
SecFlash reports a login log that has become shorter since its last look, or was replaced, with no rotated copy next to it, as SF-DET-406 on the Detections page.
See also
- Audit logs
- Security logging and alerting
- Log injection
- Responding to an unrecognised server login
- Stolen cloud credentials
- Deleting backups
- Rogue administrator account
- Category: Persistence
References
- a b c d e MITRE (created 14 April 2026). "Disable or Modify Tools: Clear Linux or Mac System Logs, Sub-technique T1685.006". MITRE ATT&CK.
- a b c d e f g h MITRE (created 14 April 2026, modified 12 May 2026). "Disable or Modify Tools: Disable or Modify Cloud Log, Sub-technique T1685.002". MITRE ATT&CK.
- a b c MITRE (version 3.0, modified 12 May 2026). "Indicator Removal, Technique T1070". MITRE ATT&CK.
- back Google Cloud. "Cloud Audit Logs overview". Google Cloud documentation.
- a b c Bienstock, D. (18 August 2022). "You Can't Audit Me: APT29 Continues Targeting Microsoft 365". Mandiant, Google Cloud blog.
- back "chattr(1)". Linux manual pages, man7.org.
- a b c d "Logging Cheat Sheet". OWASP Cheat Sheet Series.
- back "systemd-journal-upload.service". systemd manual, freedesktop.org.
- back "journald.conf". systemd manual, freedesktop.org.
- back Amazon Web Services. "Creating a trail for an organization". AWS CloudTrail User Guide.
- back "A09:2025 Security Logging and Alerting Failures". OWASP Top 10:2025. OWASP Foundation.
- back Amazon Web Services. "GuardDuty IAM finding types". Amazon GuardDuty User Guide.
External links
- Logging Cheat Sheet, OWASP Cheat Sheet Series