1. Resources
  2. Detection sources
  3. 295

295: A password was retrieved from the Vault

Code 295 (Retrieve password): a user retrieved the value of an account in a Safe, to show it, copy it or connect with it outside the session manager. CyberArk lists it among the codes it recommends for general monitoring.

Log source
Idira (formerly CyberArk) Vault audit log
Detection value
High
Volume
Medium (estimate)
Last updated
Log
Idira Vault audit (Idira Vault audit, on by default)
Service
Idira Vault audit
Operation
295
Detects
5 attacks (2 rules · 6 detection logic)
MITRE ATT&CK
5 techniques in 5 tactics
Threat groups
15 groups that MITRE ATT&CK records using these techniques
Fields the rules read
deviceEventClassIdsuser

When it is written

The Vault writes code 295 when the password of an account is retrieved. A Safe member needs the Retrieve accounts permission to show or copy an account in the web portal, to connect to a remote machine through the portal without the session manager (PSM), or to call the REST method that returns a password, where the request names the action (show, copy or connect), can carry a reason and a ticket ID, and can ask for an earlier version of the password. Where the account's platform does not let users view the value, showing or copying it takes the Manage Safe permission. CyberArk states that the REST method is meant for people; applications are pointed to a Credential Provider, and the code table has a separate code for retrievals from a provider, 319. An older REST method returns the password without taking a reason, and fails when the Master Policy requires one. Connecting through PSM needs the Use accounts permission (with List accounts) and not Retrieve accounts, and the code table has a separate code for using a password, 308 (Use Password); SSH keys have code 428.

The Master Policy shapes the record: by default users must give a reason before they retrieve an account, and dual control, exclusive access and one-time access can apply. The code table gives a file name as Info1, by the code's name the account's object in the Safe, and no other value for this code. The account is expected in the record's File element (fname, the name of the target file in CyberArk's field list), but CyberArk maps none of the code table's Info columns to a syslog element, so confirm it with one record of your own. The field list also has elements for the reason a user entered (Reason) and the dual control request (RequestId), without saying which codes fill them. CyberArk's example record leaves Reason empty and shows a user's reason, a ticket ID and connection details inside a PvwaDetails element, and the account's own properties (user name, address) inside CAProperties. The sample CEF translator writes neither element, so they reach a SIEM only through a translator that adds them.

CyberArk writes the name of this code three ways: Retrieve password in the full code table, Retrieve Password in its list of codes recommended for general monitoring, and Retrieve Password succeeded in the list of useful events on its SIEM page. Match on the code.

How to turn it on

Idira Vault audit records 295 calls to Idira Vault audit without any setup. Vendor documentation

The Vault writes an audit record, identified by its audit action code, for every user and Safe activity. The records appear in the User and Safe Activities report and in Export Vault Data (EVD) output, where the code table's Info1 and Info2 values are separate columns. They stay for the Master Policy's Activities audit retention period (90 days by default); a user's own activity records stay for the History days of its Time Limitations tab. CyberArk notes that a value of zero in either setting stops those activities from being written to the audit log.

The Vault is not a collection point. To send the records to a SIEM:

  • PAM Self-Hosted: on every Vault server, set the syslog parameters in Server\Conf\DBParm.ini (SyslogServerIP, SyslogServerPort, SyslogServerProtocol, SyslogTranslatorFile, UseLegacySyslogFormat, and SyslogTrustedCAPath for TLS) and restart the Vault. TLS, TCP and UDP are supported; UDP is the default.
  • SyslogMessageCodeFilter lists the codes that are sent. By default all codes of user and Safe activities are sent; a filter that leaves out the codes a rule reads silences that rule.
  • The translator decides the field names. An XSL file turns the Vault's XML record into the syslog message. These pages name the fields as CyberArk's sample CEF translator writes them. The Vault's record has more elements than that translator writes: OSUser, PvwaDetails (the user's reason, the ticket ID and connection details of web portal operations), GatewayStation (the address of the web portal server) and CAProperties (the account's own properties). They reach a SIEM only through a translator that adds them. Sample files for ArcSight, QRadar, McAfee ESM, RSA enVision and a generic format are copied to Server\Syslog on installation, and a SIEM's own add-on may ship another translator with other keys, so check one record of your own.
  • Privilege Cloud (Standard): deploy the Secure Tunnel and give Technical Support the SIEM server, port, protocol (TLS is recommended; TCP risks losing messages; UDP is not supported), the SIEM type (one of the same translators) and the TLS certificate. Up to five syslog servers can be connected.
  • Privilege Cloud on the Identity Security Platform also lists most of these events in the Audit service, with codes written as PAM<code>. Its list does not have every code of the Vault's tables (460 and 461, and 427 and 428, are missing from it), and the pages of those codes say so. Its SIEM export is a JSON API with its own field names, which these pages do not describe.
  • CyberArk states no delivery delay. The Vault queues syslog messages and writes a notification to its ITALog when more than SyslogMsgsQueueNotificationThreshold (1,000 by default) are waiting.
Show the syslog settings of the Vault (run on each Vault server, read only)
Select-String -Path 'C:\Program Files (x86)\PrivateArk\Server\Conf\DBParm.ini' -Pattern '^\s*(Syslog|UseLegacySyslogFormat)'
Based on vendor documentation.
List the translator files on the Vault server (read only)
Get-ChildItem -Path 'C:\Program Files (x86)\PrivateArk\Server\Syslog' -Filter '*.xsl'
Based on vendor documentation.

Fields

The vendor documents no fields of this operation’s own, so none are listed: read one record of your own to see what it carries. The fields every Idira Vault audit record has are below; their names are the JSON paths of the record as the vendor documents it.

Fields every Idira Vault audit record has (12)
FieldWhat it holds
deviceVendorDevice Vendor of the CEF header, from the record's Vendor element (a static value). CyberArk's two copies of its sample record disagree: one shows CyberArk, the other Idira. The samples of Splunk and Microsoft show Cyber-Ark. Read the value in a record of your own.
deviceProductDevice Product, Vault for audit records (VaultMonitor for the Vault's performance messages).
deviceVersionDevice Version, the version of the Vault.
deviceEventClassIdRead by 2 rulesDevice Event Class ID, from the MessageID element: the audit action code. The operation this page is about. The rules match this number, not the name.
nameName, from the Desc element: a static description of the code. CyberArk's wording varies (code 4 is "User Authentication" in one table, "User Authentication Failure" in another and "Authentication failed" in the sample record), so match on the code.
severitySeverity. The record's Severity element is Error or Info; the sample translator writes Critical as 10, Error as 7, Info as 5 and anything else as 0. CyberArk does not list the severity of each code.
suserRead by 2 rulesThe Issuer element: the Vault user who wrote the audit record, which CyberArk says is usually the user who performed the operation.
actThe Action element, a description of the audit record.
duserThe SourceUser element, which CyberArk's field list describes as the name of the Vault user who performed the operation.
fnameThe File element, the name of the target file (for account operations, expected to be the account's object in the Safe; CyberArk maps none of the code table's Info columns to it).
srcThe Station element, the address the operation came from. For sessions of the web portal (PVWA) it is the address of the user's own machine, not of the PVWA server.
msgOne string with nine parts separated by commas: TargetUser (the Vault user the operation was performed on), Safe (the target Safe), Location, Category, RequestId (the dual control request), Note, Reason (the reason the user entered), ExtraDetails and Message (the description again). The sample shows each part by name.

Values to know

suser

ValueMeaningSignal
a person retrieving an account of its own team, with a reasonRoutine use of the PAM systemThe normal case; still counted by the threshold rule.Expected
one person retrieving many accounts in a short timeA script with that right, or someone emptying the Safes the user can reachThe case the threshold rule reports. Ask the owner, and read which Safes the accounts came from.Attack signal
a name starting with PasswordManager or PSMApp_Treated by the detection rules as a CyberArk componentCheck that the name belongs to a component you run; a user named like a component is not one.Noise

Volume and noise

Steady wherever people show or copy passwords; it is the normal work of a PAM system. The detection rules leave out issuers whose names start with PasswordManager or PSMApp_, which they treat as CyberArk components. What stands out is a person retrieving accounts they have not retrieved before, many accounts in a short time, accounts of Tier 0 identities, or retrievals from an unusual station or hour.

Keeping it manageable

  • Learn which issuers retrieve as part of a component's or a script's work, confirm their names in your own records, and exclude them by name, not by pattern.
  • Count retrievals per issuer over a short window; the threshold rule on the detection page counts 20 or more in 15 minutes, a starting value.
  • Read the reason the user gave and, where dual control applies, the approved request; a retrieval of a Tier 0 account without either deserves a question.
  • Follow the retrieved account's own logons in the target system; the detection page's hypotheses pair a retrieval with a logon that bypasses the session manager.

Sample event

A Idira Vault audit record in the vendor’s format, with made-up values.

{
  "deviceVendor": "Cyber-Ark",
  "deviceProduct": "Vault",
  "deviceVersion": "14.6.0000",
  "deviceEventClassId": "295",
  "name": "Retrieve password",
  "severity": 5,
  "suser": "j.doe",
  "act": "",
  "duser": "",
  "fname": "Operating System-WinDomain-corp.example.com-adm-tier0",
  "src": "203.0.113.41",
  "msg": {
    "TargetUser": "",
    "Safe": "",
    "Location": "",
    "Category": "",
    "RequestId": "",
    "Note": "",
    "Reason": "",
    "ExtraDetails": "",
    "Message": ""
  }
}

Attacks this event reveals

Detection rules that read this event:

Detection logic (hypotheses that join this event with others) for:

Frequently asked questions

Do PSM sessions write code 295?

A user who connects through the session manager needs the Use accounts permission and not Retrieve accounts, and the code table names separate codes for using a password (308) and for the session itself (300, PSM Connect, and 302, PSM Disconnect). CyberArk does not say whether a session also writes code 295, nor which Vault user is the issuer of what a session writes. PSM has two users of its own: PSMApp_ followed by the machine name, for internal processing, and PSMGW_ followed by the machine name, the gateway through which PSM users access the Vault. The detection rules leave out only the first, so read one session's records in your Vault before you exclude anything.

References