Try in Splunk Security Cloud

Description

The following analytic identifies a suspicious PowerShell script execution via EventCode 4104 that contains command to add or modify the trustedhost configuration in Windows OS. This behavior raises concerns due to the nature of modifications made to the 'TrustedHost' configuration, which typically involves adjusting settings crucial for remote connections and security protocols. Alterations in this area could potentially indicate attempts to manipulate trusted hosts or systems for unauthorized remote access, a tactic commonly observed in various unauthorized access or compromise attempts.

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

  • Last Updated: 2023-11-23
  • Author: Teoderick Contreras, Splunk
  • ID: bef21d24-297e-45e3-9b9a-c6ac45450474

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1021.006 Windows Remote Management Lateral Movement
T1021 Remote Services Lateral Movement
Kill Chain Phase
  • Exploitation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
`powershell` EventCode=4104  ScriptBlockText = "*WSMan:\\localhost\\Client\\TrustedHosts*" ScriptBlockText IN ("* -Value *", "* -Concatenate *") 
| rename Computer as dest, UserID as user 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ScriptBlockText dest user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_remote_services_add_trustedhost_filter`

Macros

The SPL above uses the following Macros:

:information_source: powershell_remote_services_add_trustedhost_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
  • EventCode
  • ScriptBlockText
  • Computer
  • UserID
  • Score

How To Implement

To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

Known False Positives

user and network administrator may used this function to add trusted host.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
64.0 80 80 a powershell script adding a remote trustedhost on $dest$ .

: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