How the attack works
The Vault keeps its own audit trail: the activity log of every Safe and the activity records of every user. The Inspect windows of the PrivateArk Client, the Activity tab of an account and the User and Safe Activities report all read it. Clearing history deletes records from that trail. CyberArk documents one limit: only records that have been held for longer than the retention time can be deleted. For a Safe, that time is the number of days the Safe activities log is stored (SafeLogRetentionPeriod in the Safe template, 90 by default). For a user, it is the History value in the user's time limitations. Someone who may update the Safe or the user can change both, and for both CyberArk states that a value of zero means the activities are not written to an audit log at all.
Clearing alone therefore removes old records, and the Vault does the same by itself: AutoClearSafeHistory and AutoClearUserHistory in DBParm.ini are on by default, the internal Batch user carries the task out, and codes 288 to 291 mark the start and end of each run. What turns a clear into evidence removal is the order of events: the retention is shortened or set to zero, and then the history is cleared by a named user. The Vault records a manual clear with code 58 or 83 (Clear User History) or 59 (Clear Safe History), and a refused one with code 82 (Clear User History (Unauthorized)) or 168 and 169 (Clear Expired History (Unauthorized)). Records that were already forwarded to a SIEM are not touched by a clear.
What must be collected. The rules read the Vault's audit records forwarded by syslog in CEF format (SIEM integration, configured in DBParm.ini). The CEF header's Device Event Class ID carries the Vault audit action code and the extension key suser carries the issuer, the Vault user who performed the operation. SyslogMessageCodeFilter must not exclude codes 58, 59, 82, 83, 168 and 169. By default all codes are sent.
What an attacker needs
- A Vault user that is allowed to clear history. CyberArk documents the menu command and the codes for a refused attempt, but not the name of the authorization the command needs.
- To remove recent records, the right to shorten the retention first: the Manage Safe permission for a Safe, or the Audit Users and Add/Update Users authorizations for a user.
Impact
The Vault no longer holds the record of what happened in the Safe or what the user did in the cleared period: logons, retrievals, changes to members. Reports and investigations that read the Vault miss it. With a retention of zero, new activities are not recorded either. The copies that syslog sent to a SIEM are not affected.
Detection rules
CyberArk Vault Refused an Attempt to Clear User or Safe History
Detects an attempt to clear history in the CyberArk Digital Vault that the Vault refused: audit action codes 82 (Clear User History (Unauthorized)) and 168 and 169 (Clear Expired History (Unauthorized)). The code table flags all three in its Alert column, which CyberArk explains as an unauthorized operation, and gives the user name in Info1 for code 82. Nothing was deleted, but someone tried to remove activity records with a user that may not do so. Look for a successful clear (codes 58, 59 and 83) by the same or another issuer afterwards. The code table gives no description beyond the names, so the rule matches the codes alone. deviceEventClassId is the CEF header's Device Event Class ID, which CyberArk's syslog translator fills with the Vault audit action code.
title: CyberArk Vault Refused an Attempt to Clear User or Safe History
id: ea99a797-1c5b-459e-be78-0f521ae2903b
status: experimental
description: >-
Detects an attempt to clear history in the CyberArk Digital Vault that the
Vault refused: audit action codes 82 (Clear User History (Unauthorized))
and 168 and 169 (Clear Expired History (Unauthorized)). The code table
flags all three in its Alert column, which CyberArk explains as an
unauthorized operation, and gives the user name in Info1 for code 82.
Nothing was deleted, but someone tried to remove activity records with a
user that may not do so. Look for a successful clear (codes 58, 59 and 83)
by the same or another issuer afterwards. The code table gives no
description beyond the names, so the rule matches the codes alone.
deviceEventClassId is the CEF header's Device Event Class ID, which
CyberArk's syslog translator fills with the Vault audit action code.
references:
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasref/vault%20audit%20action%20codes.htm
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/inspecting-user-activity.htm
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/safes-privateark-management.htm
- https://attack.mitre.org/techniques/T1070/
author: Forestall
date: 2026-11-18
tags:
- attack.stealth
- attack.t1070
logsource:
product: cyberark
service: vault
detection:
selection:
deviceEventClassId:
- '82'
- '168'
- '169'
condition: selection
falsepositives:
- Users of the PrivateArk Client who answer its reminder to clear expired history without having the right to do so. CyberArk documents this reminder for Vaults where the automatic clearing is not active.
level: low
False positives
- Users of the PrivateArk Client who answer its reminder to clear expired history without having the right to do so. CyberArk documents this reminder for Vaults where the automatic clearing is not active.
CyberArk Vault User or Safe History Cleared by a Named User
Detects history being cleared in the CyberArk Digital Vault by an issuer other than the internal Batch user: audit action codes 58 and 83 (Clear User History) and 59 (Clear Safe History). Clearing deletes activity records from the Vault's own audit trail. CyberArk documents that only records held for longer than the retention time can be deleted, and that the Vault clears expired history automatically (AutoClearSafeHistory and AutoClearUserHistory in DBParm.ini, on by default, carried out by the internal Batch user that cannot be logged on to). A clear by a named user is therefore not needed for operations, and it removes more when the retention of the Safe log or of the user's history was shortened first. CyberArk does not say whether an automatic run writes these codes or only codes 288 to 291, so the rule excludes the issuer Batch. The code table gives the user name in Info1 for code 83 and no fields for codes 58 and 59. deviceEventClassId is the CEF header's Device Event Class ID, which CyberArk's syslog translator fills with the Vault audit action code; suser is the issuer, the Vault user who performed the action.
title: CyberArk Vault User or Safe History Cleared by a Named User
id: 7d259b07-fdf3-4930-81da-2200d39d5506
status: experimental
description: >-
Detects history being cleared in the CyberArk Digital Vault by an issuer
other than the internal Batch user: audit action codes 58 and 83 (Clear
User History) and 59 (Clear Safe History). Clearing deletes activity
records from the Vault's own audit trail. CyberArk documents that only
records held for longer than the retention time can be deleted, and that
the Vault clears expired history automatically (AutoClearSafeHistory and
AutoClearUserHistory in DBParm.ini, on by default, carried out by the
internal Batch user that cannot be logged on to). A clear by a named user
is therefore not needed for operations, and it removes more when the
retention of the Safe log or of the user's history was shortened first.
CyberArk does not say whether an automatic run writes these codes or only
codes 288 to 291, so the rule excludes the issuer Batch. The code table
gives the user name in Info1 for code 83 and no fields for codes 58 and 59.
deviceEventClassId is the CEF header's Device Event Class ID, which
CyberArk's syslog translator fills with the Vault audit action code; suser
is the issuer, the Vault user who performed the action.
references:
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasref/vault%20audit%20action%20codes.htm
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/inspecting-user-activity.htm
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/safes-privateark-management.htm
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasref/dbparm.ini.htm
- https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/predefined-users-and-groups.htm
- https://attack.mitre.org/techniques/T1070/
author: Forestall
date: 2026-11-18
tags:
- attack.stealth
- attack.t1070
logsource:
product: cyberark
service: vault
detection:
selection:
deviceEventClassId:
- '58'
- '59'
- '83'
filter_batch_user:
suser: Batch
condition: selection and not filter_batch_user
falsepositives:
- Users of the PrivateArk Client who answer its reminder to clear expired history. CyberArk documents this reminder for Vaults where the automatic clearing is not active. Turn the automatic clearing on instead of excluding the users.
- An administrator who clears expired history by hand during maintenance. Confirm it with the issuer and check that the retention was not changed before.
level: medium
False positives
- Users of the PrivateArk Client who answer its reminder to clear expired history. CyberArk documents this reminder for Vaults where the automatic clearing is not active. Turn the automatic clearing on instead of excluding the users.
- An administrator who clears expired history by hand during maintenance. Confirm it with the issuer and check that the retention was not changed before.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Safe or user updated and its history cleared by the same issuer
A clear removes only records older than the retention time, so removing a recent trail takes two steps: the Safe or the user is updated, and then its history is cleared. Each record alone is ordinary administration. The same issuer doing both on the same Safe or user is the pattern of evidence removal.
- A Safe or a user is updated: code 181 (Update Safe), or code 182 (Update User) together with code 211 (Update User Detailed Information). Keep the issuer (
suser) and the Safe or the target user of the audit record. - Within 7 days the same issuer clears history: code 59 (Clear Safe History) for that Safe, or code 58 or 83 (Clear User History). For code 83 the code table gives the user name in Info1.
- Read the current retention: the number of days the Safe activities log is stored, or the History value of the user. A value below your standard, or zero, confirms the order of events.
Events181182211585983
LimitsThe code table gives no detail field for code 181, so the record does not say that the retention was the property that changed, and any update of the Safe matches. An administrator who tidies a Safe and clears its expired history looks the same. The Safe and the target user reach the SIEM under keys that depend on the translator file. The 7 days are a starting point.
Triage
- Read the issuer (suser) and the station of the audit record. For code 83 the code table gives the user whose history was cleared in Info1, and for code 59 the Safe is in the Safe field of the record.
- Check whether the retention was changed shortly before. For a Safe look for code 181 (Update Safe), for a user for codes 182 and 211 (Update User, Update User Detailed Information), and read the value that is set now.
- Compare what your SIEM holds for that Safe or user with what the Vault still shows. The difference is what was removed.
- Review what the issuer and the cleared user did in the days before, above all retrievals (codes 295 and 428), new Safe members and logons from unusual stations.
- Ask the issuer why the history was cleared by hand. While the automatic clearing is on there is no operational need for it.
Response
Once the attack is confirmed:
- Preserve the SIEM copy of the Vault audit for the Safe and the user, and export what the Vault still holds, before anything else is changed.
- Set the retention of the Safe activity log or of the user's history back to the approved value.
- Suspend the issuer until the clear is explained, and reset its password and second factor before it is enabled again.
- Rebuild the timeline of the cleared period from the SIEM copy and start a password change for every account that was retrieved or used in it.
- Check the other Safes and users for the same change of retention, and correct each one you find.
Mitigation
- Forward the Vault audit to your SIEM by syslog, as CyberArk's security fundamentals advise, so that a record cleared in the Vault still exists outside it.
- Set the retention of Safe activity logs and of user history to the period your investigations need, never to zero, and handle a change of either value as a security change.
- Leave the automatic clearing on (
AutoClearSafeHistoryandAutoClearUserHistory), so that nobody has a reason to clear history by hand. - Give the Manage Safe permission and the Add/Update Users authorization to as few named administrators as possible.
Frequently asked questions
Can clearing history remove recent audit records from the Vault?
Not by itself. CyberArk documents that only records held for longer than the retention time can be deleted. The retention can be changed, though: the Safe activities log has its own number of days and each user has a History value. CyberArk does not describe whether a shorter value applies to records that already exist, so treat a retention change that is followed by a clear as the case to investigate.
Why does the rule exclude the Batch user?
CyberArk describes Batch as an internal user that cannot be logged on to and that carries out tasks such as automatically clearing expired user and Safe history. The documented codes for those runs are 288 to 291. CyberArk does not say whether a run also writes codes 58, 59 or 83, so the rule excludes the issuer Batch in case it does. Remove the filter if your audit shows that it is not needed.
Does a cleared history also remove the records in the SIEM?
No. A clear deletes records inside the Vault. What the Vault already sent by syslog stays in the SIEM, which is why forwarding the audit matters. It also gives you the comparison that shows what was removed, as long as the code filter of the syslog output sends all codes.
Is there a public incident report that describes this technique?
No public incident report describes this at the audit event level. The page rests on CyberArk's documentation of the clear history commands, of the retention settings and of the audit codes the Vault writes for them.
References
- MITRE ATT&CK T1070: Indicator Removal
- CyberArk Docs: Vault Audit Action Codes
- CyberArk Docs: Inspect user activity (Clear user history)
- CyberArk Docs: Manage Safes in PrivateArk (Clear Safe history)
- CyberArk Docs: Default Safe Configuration (SafeLogRetentionPeriod)
- CyberArk Docs: Add and manage users in PrivateArk (History, Vault authorizations)
- CyberArk Docs: DBParm.ini (AutoClearSafeHistory, AutoClearUserHistory)
- CyberArk Docs: Predefined users and groups (Batch user)
- CyberArk Docs: Security Fundamentals
- CyberArk Docs: Create a Custom XSL Translator File (audit record fields)