Try in Splunk Security Cloud

Description

The following analytic detects processes loading the samlib.dll or samcli.dll modules, which are often abused to access Security Account Manager (SAM) objects or credentials on domain controllers. This detection leverages Sysmon EventCode 7 to identify these DLLs being loaded outside typical system directories. Monitoring this activity is crucial as it may indicate attempts to gather sensitive identity information. If confirmed malicious, this behavior could allow attackers to obtain credentials, escalate privileges, or further infiltrate the network.

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

  • Last Updated: 2024-05-10
  • 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: 2