Try in Splunk Security Cloud

Description

The following analytic identifies a process that loads the samlib.dll module. This module is being abused by adversaries, threat actors and red teamers to access information of SAM objects or access credentials information in DC. This hunting query can be a good indicator that a process is capable of accessing the SAM object.

  • Type: Hunting
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2022-08-24
  • Author: Teoderick Contreras, Splunk
  • ID: a18e85d7-8b98-4399-820c-d46a1ca3516f

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1589.001 Credentials Reconnaissance
T1589 Gather Victim Identity Information Reconnaissance
Kill Chain Phase
  • Reconnaissance
NIST
  • DE.AE
CIS20
  • CIS 10
CVE
1
2
3
4
5
`sysmon` EventCode=7  (ImageLoaded = "*\\samlib.dll" AND OriginalFileName = "samlib.dll") OR (ImageLoaded = "*\\samcli.dll" AND OriginalFileName = "SAMCLI.DLL") AND NOT (Image IN("C:\\Windows\\*", "C:\\Program File*", "%systemroot%\\*")) 
| stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded process_name dest EventCode Signed ProcessId 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `windows_gather_victim_identity_sam_info_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_gather_victim_identity_sam_info_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • Image
  • ImageLoaded
  • dest
  • EventCode
  • Signed
  • ProcessId

How To Implement

The latest Sysmon TA 3.0 https://splunkbase.splunk.com/app/5709 will add the ImageLoaded name to the process_name field, allowing this query to work. Use as an example and implement for other products.

Known False Positives

this module can be loaded by a third party application. Filter is needed.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
9.0 30 30 An instance of $dest$ that loads $ImageLoaded$ that are related to accessing to SAM object information.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 1