What attackers do. Attackers delete or change evidence of their activity, such as event logs, command histories, files, network connection records or email, to avoid detection and slow investigation. This serves the Defence Evasion tactic.
How to defend. Forward logs to a central system as they are created so local deletion does not remove them, and restrict who can clear logs. Monitor log clearing and audit policy changes, and protect logging agents from tampering. Retain logs for long enough to support investigation, and alert when an expected source stops sending data.
Signs to look for. Look for security log cleared events, gaps in log sequences, deleted shell histories, file timestamps that do not match surrounding activity, and stopped logging services. A common gap is storing logs only on the host being attacked.