Files
splunk-security_content/dev/endpoint/windows_private_keys_discovery.yml
2023-01-20 13:24:15 +01:00

80 lines
2.6 KiB
YAML

name: Windows Private Keys Discovery
id: 5c1c2877-06c0-40ee-a1a2-db71f1372b5b
version: 1
date: '2022-11-30'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: The following analytic identifies a process command line that retrieves
information related to private keys files. This technique was seen in several post
exploitation tools like winpeas that are being used by Ransomware Prestige to search
for private key certificates on the compromised host for insecurely stored credentials.
This files can be used by adversaries to gain privileges, persistence or remote
service authentication to collect more sensitive information. Some private keys
required password for operation, so in this case adversaries may need to have that
passphrase either via keylogging or brute force attack.
data_source:
- Sysmon Event ID 1
search:
selection1:
CommandLine: '*dir *'
selection2:
CommandLine:
- '*.rdg*'
- '*.gpg*'
- '*.pgp*'
- '*.p12*'
- '*.der*'
- '*.csr*'
- '*.cer*'
- '*.ovpn*'
- '*.key*'
- '*.ppk*'
- '*.p12*'
- '*.pem*'
- '*.pfx*'
- '*.p7b*'
- '*.asc*'
selection3:
CommandLine: '*findstr*'
condition: selection1 or selection2 or selection3
how_to_implement: To successfully implement this search, you need to be ingesting
logs with the process name, parent process, and command-line executions from your
endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the
Sysmon TA. Tune and filter known instances of wermgr.exe may be used.
known_false_positives: unknown
references:
- https://attack.mitre.org/techniques/T1552/004/
- https://github.com/carlospolop/PEASS-ng/tree/master/winPEAS
- https://www.microsoft.com/en-us/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/
tags:
analytic_story:
- Windows Post-Exploitation
- Prestige Ransomware
asset_type: Endpoint
confidence: 50
impact: 50
message: a process with commandline $process$ that can retrieve information related
to private keys in $dest$
mitre_attack_id:
- T1552.004
- T1552
observable:
- name: dest
type: Hostname
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
risk_score: 25
security_domain: endpoint
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/winpeas/winpeas_search_private_key/dir-private-sysmon.log
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
sourcetype: xmlwineventlog
update_timestamp: true