-
Notifications
You must be signed in to change notification settings - Fork 210
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
[bug] aggregation condition rule count does not show up in Events with hits
#1375
Comments
Current impl memo:Related Structhayabusa/src/detections/detection.rs Lines 44 to 51 in 95ee553
hayabusa/src/detections/message.rs Lines 32 to 45 in efaca57
hayabusa/src/detections/rule/count.rs Lines 221 to 233 in efaca57
hayabusa/src/detections/rule/mod.rs Lines 30 to 35 in efaca57
hayabusa/src/detections/rule/mod.rs Lines 375 to 386 in 95ee553
Related Sequencecount uphayabusa/src/detections/rule/mod.rs Lines 85 to 110 in efaca57
hayabusa/src/detections/rule/count.rs Lines 20 to 74 in efaca57
Line 1576 in 95ee553
output rule counthayabusa/src/detections/detection.rs Lines 763 to 776 in efaca57
Lines 500 to 502 in efaca57
|
New impl memo #[derive(Debug, Clone, PartialEq, Eq, Default)]
/// countなどのaggregationの結果を出力する構造体
pub struct AggResult {
/// countなどの値
pub data: i64,
/// count byで指定された条件のレコード内での値
pub key: String,
/// countの括弧内指定された項目の検知されたレコード内での値の配列。括弧内で指定がなかった場合は長さ0の配列となる
pub field_values: Vec<String>,
///検知したブロックの最初のレコードの時間とEventID
pub id_time_pair : Vec<(String, DateTime<Utc>)>
} #[derive(Debug, Clone, PartialEq, Eq, Default)]
pub struct DetectInfo {
pub detected_time: DateTime<Utc>,
pub rulepath: CompactString,
pub ruleid: CompactString,
pub ruletitle: CompactString,
pub level: CompactString,
pub computername: CompactString,
pub eventid: CompactString,
pub detail: CompactString,
pub ext_field: Vec<(CompactString, Profile)>,
pub agg_result: Option<Aggresult>,
pub details_convert_map: HashMap<CompactString, Vec<CompactString>>,
} |
Describe the bug
aggregation condition
rule count does not show up inEvents with hits
(andTop 5 computers
)It's probably the similar cause as #1373, but I'll create a separate issue to make it easier to understand.
Step to Reproduce
./hayabusa-2.16.0-mac-aarch64 csv-timeline -d ../hayabusa-sample-evtx -r rules/hayabusa/builtin/Security/LogonLogoff/Logon/Sec_4625_Med_LogonFail_WrongPW_PW-Guessing_Cnt.yml -w
ref: Sec_4625_Med_LogonFail_WrongPW_PW-Guessing_Cnt.yml
Actuail behavior
Expected behavior
Environment
Additional context
This seems to be because the aggregation condition rule is not counted in the line below.
hayabusa/src/afterfact.rs
Lines 500 to 502 in efaca57
The text was updated successfully, but these errors were encountered: