Yamato-Security / hayabusa

Hayabusa (隼) is a sigma-based threat hunting and fast forensics timeline generator for Windows event logs.
GNU General Public License v3.0
2.17k stars 189 forks source link

Improving count rule's output #1342

Open fukusuket opened 4 months ago

fukusuket commented 4 months ago

https://github.com/Yamato-Security/hayabusa/pull/1341#issuecomment-2097170105

  1. Is it possible to put in the Channel and EventID info? When there are multiple values, we can separate them with ¦.
  2. ExtraFieldInfo is blank (··) but would nice to have it as - which we use for n/a. So ·· -> · - ·
  3. EvtxFile is also - but many users ask me how they can look up the evtx file from this alert so it would be nice to get this information as well. Again, separate by ¦ when there are multiple values.
  4. Is it possible to do the field key mapping? For example, change SubStatus: 0xc000006a to SubStatus: WRONG PW, etc...
fukusuket commented 4 months ago

https://github.com/Yamato-Security/hayabusa/issues/1339#issuecomment-2092704365

Or even better, if we could define in details: 'TgtUser: %TargetUserName% ¦ SrcIp: %IpAddress%' and get the following results: Count: 4 ¦ TgtUser: tanaka/Administrator/adsyncadmin/suzuki ¦ SrcIp: -

fukusuket commented 4 months ago

https://github.com/Yamato-Security/hayabusa/pull/1341#issuecomment-2099492290

  • If top level Channel has multiple values, should it be an array or string?
  • If top level EventID has multiple values, should it be an array or string?
  • If each field under Details has multiple values, should it be an array or string?
  • Should the aggregate results of Channel and EventID be placed under Details?
YamatoSecurity commented 4 months ago

@fukusuket I talked to someone who is more familiar with importing into elastic stack and he said that elastic will create multiple logs (documents) when arrays are used and it will make parsing more difficult so I think we should avoid arrays and keep everything as strings. We should probably keep the Channel and EventID information not in Details, but in the normal fields so that it makes searching for them easier.

fukusuket commented 4 months ago

@YamatoSecurity Thank you for checking :) Is the expected JSON output format like the following?

YamatoSecurity commented 3 months ago

@fukusuket LGTM!

fukusuket commented 2 months ago

https://github.com/Yamato-Security/hayabusa/issues/1373#issue-2369875686

Problems:

1. Top 5 computers with most unique detections shows only n/a but should include the correlation rule results

https://github.com/Yamato-Security/hayabusa/pull/1376#issue-2372922094

fukusuket commented 1 month ago

TODO