forked from splunk/security_content
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbatch_file_write_system32.yml
More file actions
105 lines (105 loc) · 3.72 KB
/
batch_file_write_system32.yml
File metadata and controls
105 lines (105 loc) · 3.72 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
asset_type: Endpoint
confidence: high
creation_date: '2018-12-14'
data_metadata:
data_models:
- Endpoint
data_source:
- Endpoint Intel
providing_technologies:
- Carbon Black Response
- CrowdStrike Falcon
- Sysmon
description: The search looks for a batch file (.bat) written to the Windows system
directory tree.
detect:
splunk:
correlation_rule:
notable:
nes_fields: dest, file_name
rule_description: A batch file was written to the system directory on $dest$.
rule_title: Batch file write to system32 detected on $dest$
risk:
risk_object: dest
risk_object_type:
- system
risk_score: 80
schedule:
cron_schedule: 0 * * * *
earliest_time: -70m@m
latest_time: -10m@m
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as
lastTime values(Filesystem.dest) as dest values(Filesystem.file_name) as file_name
values(Filesystem.user) as user from datamodel=Endpoint.Filesystem by Filesystem.file_path
| `drop_dm_object_name(Filesystem)` | `security_content_ctime(lastTime)` | `security_content_ctime(firstTime)`|
rex field=file_name "(?<file_extension>\.[^\.]+)$" | search file_path=*system32*
AND file_extension=.bat'
suppress:
suppress_fields: dest,file_name
suppress_period: 14400s
eli5: This search looks at file modifications across your hosts, as well as for evidence
of batch files being written to paths that include "system32." This activity is
consistent with some SamSam attacks and is, in general, suspicious.
entities:
- dest
how_to_implement: You must be ingesting data that records the file-system activity
from your hosts to populate the Endpoint file-system data-model node. If you are
using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which
you want to collect data.
id: 503d17cb-9eab-4cf8-a20e-01d5c6987ae3
investigations:
- id: bc91a8cf-35e7-4bb2-8140-e756cc06fd76
name: Get Authentication Logs For Endpoint
type: splunk
- id: bc91a8cf-35e7-4bb2-8140-e756cc06fd74
name: Get User Information from Identity Table
type: splunk
- id: fecf2918-670d-4f1c-872b-3d7317a41bf9
name: Get Parent Process Info
type: splunk
- id: fdcfb369-1725-4c24-824a-22972d7f0d55
name: Get Risk Modifiers For User
type: splunk
- id: bc91a8cf-35e7-4bb2-8140-e756cc06fd71
name: Get Process Info
type: splunk
- id: b6618e8e-be04-40a0-a0b9-f0bd4b6c81bc
name: Investigate Successful Remote Desktop Authentications
type: splunk
- id: 3d6c3213-5fff-4a1e-b57d-b24c262171e7
name: Get Notable History
type: splunk
- id: fdcfb369-1725-4c24-824a-22972d7f0d65
name: Get Risk Modifiers For Endpoint
type: splunk
known_false_positives: It is possible for this search to generate a notable event
for a batch file write to a path that includes the string "system32", but is not
the actual Windows system directory. As such, you should confirm the path of the
batch file identified by the search. In addition, a false positive may be generated
by an administrator copying a legitimate batch file in this directory tree. You
should confirm that the activity is legitimate and modify the search to add exclusions,
as necessary.
maintainers:
- company: Splunk
email: rvaldez@splunk.com
name: Rico Valdez
mappings:
cis20:
- CIS 8
kill_chain_phases:
- Delivery
mitre_attack: []
nist:
- PR.PT
- DE.CM
modification_date: '2018-12-14'
name: Batch File Write to System32
original_authors:
- company: Splunk
email: rvaldez@splunk.com
name: Rico Valdez
references: []
security_domain: endpoint
spec_version: 2
type: splunk
version: '1.0'