/
powershell_remote_services_add_trustedhost.yml
65 lines (65 loc) · 2.55 KB
/
powershell_remote_services_add_trustedhost.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Powershell Remote Services Add TrustedHost
id: bef21d24-297e-45e3-9b9a-c6ac45450474
version: 1
date: '2023-11-23'
author: Teoderick Contreras, Splunk
status: production
type: TTP
data_source:
- Powershell Script Block Logging 4104
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.
search: '`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`'
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.
references:
- https://malpedia.caad.fkie.fraunhofer.de/details/win.darkgate
tags:
analytic_story:
- DarkGate Malware
asset_type: Endpoint
confidence: 80
impact: 80
message: a powershell script adding a remote trustedhost on $dest$ .
mitre_attack_id:
- T1021.006
- T1021
observable:
- name: dest
type: Hostname
role:
- Victim
- name: user
type: User
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
risk_score: 64
required_fields:
- _time
- EventCode
- ScriptBlockText
- Computer
- UserID
- Score
security_domain: endpoint
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1021.006/wsman_trustedhost/wsman_pwh.log
source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
sourcetype: XmlWinEventLog