Repository navigation
Expand file tree
/
Copy pathssa___illegal_service_and_process_control_via_powersploit_modules.yml
More file actions
63 lines (60 loc) · 2.63 KB
/
Copy pathssa___illegal_service_and_process_control_via_powersploit_modules.yml
File metadata and controls
63 lines (60 loc) · 2.63 KB
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
name: Illegal Service and Process Control via PowerSploit modules
id: 0e910e5b-309d-4bc3-8af2-0030c02aa353
version: 1
date: '2020-11-09'
author: Stanislav Miskovic, Splunk
type: streaming
datamodel: []
description: This detection identifies access to PowerSploit modules that enable illegal
control of services and processes, such as installing or spoofing of malicious services,
injecting malicious code in DLLs and EXEs, invoking shell code and WMI commands,
modifying access to service objects, etc.
search: '| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)),
cmd_line=ucast(map_get(input_event, "process"), "string", null) | where cmd_line
!= null AND ( match_regex(cmd_line, /(?i)Install-SSP/)=true OR match_regex(cmd_line,
/(?i)Set-CriticalProcess/)=true OR match_regex(cmd_line, /(?i)Install-ServiceBinary/)=true
OR match_regex(cmd_line, /(?i)Restore-ServiceBinary/)=true OR match_regex(cmd_line,
/(?i)Write-ServiceBinary/)=true OR match_regex(cmd_line, /(?i)Set-ServiceBinaryPath/)=true
OR match_regex(cmd_line, /(?i)Invoke-ReflectivePEInjection/)=true OR match_regex(cmd_line,
/(?i)Invoke-DllInjection/)=true OR match_regex(cmd_line, /(?i)Invoke-ServiceAbuse/)=true
OR match_regex(cmd_line, /(?i)Invoke-Shellcode/)=true OR match_regex(cmd_line, /(?i)Invoke-WScriptUACBypass/)=true
OR match_regex(cmd_line, /(?i)Invoke-WmiCommand/)=true OR match_regex(cmd_line,
/(?i)Write-HijackDll/)=true OR match_regex(cmd_line, /(?i)Add-ServiceDacl/)=true
)
| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event,
"dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"),
"string", null)), body=create_map([ "cmd_line", cmd_line]) | into write_ssa_detected_events();'
how_to_implement: You must be ingesting Windows Security logs from devices of interest,
including the event ID 4688 with enabled command line logging.
known_false_positives: None identified.
references:
- https://github.com/PowerShellMafia/PowerSploit
tags:
analytic_story:
- Windows Service Abuse
- Malicious PowerShell
asset_type: Windows
cis20:
- CIS 16
- CIS 20
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logAllPowerSploitModulesWithOldNames.log
kill_chain_phases:
- Actions on Objectives
mitre_attack_id:
- T1055
- T1106
- T1569
nist:
- PR.AC
- PR.IP
product:
- Splunk Behavioral Analytics
required_fields:
- dest_device_id
- dest_user_id
- process
- _time
risk_severity: high
security_domain: endpoint