Skip to content

Commit

Permalink
more meta for sigma parser + add context for sysmon/sigma
Browse files Browse the repository at this point in the history
  • Loading branch information
blotus committed Dec 4, 2024
1 parent 4306a8a commit ee9bf24
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collections/sigmahq/windows_proc_creation.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
parsers:
- crowdsecurity/sysmon-logs
contexts:
- crowdsecurity/sysmon_base
scenarios:
- sigmahq/proc_creation_win_addinutil_suspicious_cmdline
- sigmahq/proc_creation_win_adplus_memory_dump
Expand Down
12 changes: 12 additions & 0 deletions contexts/crowdsecurity/sysmon_base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#Context for sysmon events, mainly intended to be used with the sigma collection
context:
command_line:
- evt.Meta.CommandLine
current_directory:
- evt.Meta.CurrentDirectory
user:
- evt.Meta.User
hashes:
- evt.Meta.Hashes
parent_image:
- evt.Meta.ParentImage
10 changes: 10 additions & 0 deletions parsers/s01-parse/crowdsecurity/sysmon-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ nodes:
expression: XMLGetNodeValue(evt.Line.Raw, "/Event/EventData[1]/Data[@Name='ParentUser']")
- meta: SysmonEventType
value: ProcessCreation
- meta: CommandLine
expression: evt.Parsed.CommandLine
- meta: CurrentDirectory
expression: evt.Parsed.CurrentDirectory
- meta: User
expression: evt.Parsed.User
- meta: Hashes
expression: evt.Parsed.Hashes
- meta: ParentImage
expression: evt.Parsed.ParentImage
- filter: evt.Parsed.EventID == '2'
statics:
- parsed: ProcessGuid
Expand Down

0 comments on commit ee9bf24

Please sign in to comment.