1. Resources
  2. Detection sources
  3. 42

42: The Vault refused to retrieve an account or file

Code 42 (Retrieve File (Unauthorized)): a user tried to retrieve a file from a Safe without the permission to do so. A refused retrieval of an account is expected under this code too, which CyberArk does not state. Nothing was handed out.

Log source
Idira (formerly CyberArk) Vault audit log
Detection value
Supporting
Volume
Low (estimate)
Last updated
Log
Idira Vault audit (Idira Vault audit, on by default)
Service
Idira Vault audit
Operation
42
Detects
1 attack (1 rule · 1 detection logic)
MITRE ATT&CK
2 techniques in 3 tactics
Threat groups
8 groups that MITRE ATT&CK records using these techniques
Fields the rules read
deviceEventClassIdsuser

When it is written

Showing or copying an account's value, saving or opening a file from a Safe, and connecting to a machine without the session manager (PSM) all take the Retrieve accounts permission in the Safe; the command-line interface's RetrieveFile command retrieves a file if the user has the authorizations. The Vault writes code 42 when it refuses a retrieval, and flags it in its Alert column, which CyberArk explains as an unauthorized operation. Code 43 has the same name; CyberArk does not say how the two differ.

The code table gives a file name as Info1 and no other value. It gives the same Info1 for its password codes (295, Retrieve password, and 308, Use Password), and the only code it names for a failed password retrieval is 320, for retrievals from a provider, so a refused retrieval of an account is expected under this code too; CyberArk does not say so in words. The file or 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. A successful file retrieval is code 51 (Retrieve File succeeded) and a successful password retrieval code 295 (Retrieve password); a refused use of a password is 306 or 307 (Use Password (Unauthorized)).

How to turn it on

Idira Vault audit records 42 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 operation’s own fields first, then the fields every Idira Vault audit record has. Field names are the JSON paths of the record as the vendor documents it.

FieldWhat it holds
msg.SafeThe Safe the account or file is in: the SAFE parameter of the command-line RetrieveFile command, and the target Safe in CyberArk's field list. No vendor example shows this code's record.
msg.ReasonThe reason the user entered (Reason in CyberArk's field list), which RetrieveFile takes as REQUESTREASON; the Master Policy requires a reason before accounts are retrieved, by default. No vendor example shows whether a refused retrieval carries 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 1 ruleDevice 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 1 ruleThe 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
one user, ten or more refusals of these eight codes within 10 minutesA user trying one account after anotherThe case the threshold rule for refused listing, searching and retrieval reports.Attack signal
a single refusal, in a Safe the user works inA permission gapFix the Safe membership if the access is approved.Noise

Volume and noise

Low per user: a member who can list a Safe but not retrieve from it, or a script whose user lost a permission, repeats it. The threshold rule counts refused listings, searches, retrievals and uses together (codes 40, 41, 42, 43, 55, 56, 306 and 307): ten or more for one user within 10 minutes is someone trying one account after another.

Keeping it manageable

  • Read refusals together with codes 40, 41, 43, 55, 56, 306 and 307 for the same issuer, as the threshold rule does.
  • Read the account or file (expected in fname) and the Safe. A refused retrieval of a domain administrator's password weighs more than one of a test account.
  • Look for the user being added to that Safe (code 32) and then retrieving from it (code 295).

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": "42",
  "name": "Retrieve File (Unauthorized)",
  "severity": 7,
  "suser": "j.doe",
  "act": "",
  "duser": "",
  "fname": "corp.example.com-da-admin",
  "src": "203.0.113.24",
  "msg": {
    "TargetUser": "",
    "Safe": "Domain-Admins",
    "Location": "",
    "Category": "",
    "RequestId": "",
    "Note": "",
    "Reason": "Maintenance window",
    "ExtraDetails": "",
    "Message": ""
  }
}

Attacks this event reveals

Detection rules that read this event:

References