Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for correlation name lookup #1363

Merged
merged 3 commits into from
Jun 15, 2024

Conversation

fukusuket
Copy link
Collaborator

@fukusuket fukusuket commented Jun 14, 2024

What Changed

I would appreciate it if you could check it out when you have time🙏

@fukusuket fukusuket added the enhancement New feature or request label Jun 14, 2024
@fukusuket fukusuket added this to the v2.17.0 milestone Jun 14, 2024
@fukusuket fukusuket self-assigned this Jun 14, 2024
@fukusuket
Copy link
Collaborator Author

fukusuket commented Jun 14, 2024

Test

I confirmed following rule works.

title: Value Count TEST
id: 0e95725d-7320-415d-80f7-004da920fc11
level: informational
correlation:
  type: value_count
  rules:
    - rule-a
    - rule-b
  group-by:
    - Computer
  timespan: 5m
  condition:
    gte: 2
    field: SubStatus
---
title: Logon Failure (User Does Not Exist)
name: rule-a

logsource:
  product: windows
  service: security
detection:
  selection_basic:
    Channel: Security
    EventID: 4625
  selection_user_not_exist:
    SubStatus: "0xc0000064" #Username does not exist error
  condition: selection_basic and selection_user_not_exist
---
title: Logon Failure (Wrong Password)
name: rule-b

logsource:
  product: windows
  service: security
detection:
  selection_basic:
    Channel: Security
    EventID: 4625
  selection_wrong_password:
    SubStatus: "0xc000006a" #Wrong password
  condition: selection_basic and selection_wrong_password

% ./hayabusa csv-timeline -d ../hayabusa-sample-evtx -w -r test/test-value-count.yml

% cat timeline.csv | grep Value
"2016-09-20 01:50:06.477 +09:00","Value Count TEST","info","-","-","-","-","Count:2 ¦ SubStatus:0xc000006a/0xc0000064 ¦ Computer:DESKTOP-M5SN04R","-"
"2021-05-20 21:49:53.378 +09:00","Value Count TEST","info","-","-","-","-","Count:2 ¦ SubStatus:0xc000006a/0xc0000064 ¦ Computer:fs01.offsec.lan","-"

@fukusuket
Copy link
Collaborator Author

fukusuket commented Jun 14, 2024

@YamatoSecurity @hitenkoku
When using correlation, it seems better not to output the detection results of the rules's field.(in the above example, It is better not to output the result of rule-a/rule-b?) 🤔

I would like to think about the specifications a little more, so I would like to create a separate issue to deal with this.

@fukusuket fukusuket marked this pull request as ready for review June 14, 2024 23:26
Copy link
Collaborator

@YamatoSecurity YamatoSecurity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fukusuket LGTM! Thank you!

@YamatoSecurity YamatoSecurity merged commit 9da5db7 into main Jun 15, 2024
5 checks passed
@YamatoSecurity YamatoSecurity deleted the add-support-correlation-rule-name-lookup branch June 15, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants