Add: sigma rules (#175)
This commit is contained in:
@@ -21,13 +21,15 @@ const DIRPATH_RULES: &str = "rules";
|
||||
pub struct EvtxRecordInfo {
|
||||
pub evtx_filepath: String, // イベントファイルのファイルパス ログで出力するときに使う
|
||||
pub record: Value, // 1レコード分のデータをJSON形式にシリアライズしたもの
|
||||
pub data_string: String,
|
||||
}
|
||||
|
||||
impl EvtxRecordInfo {
|
||||
pub fn new(evtx_filepath: String, record: Value) -> EvtxRecordInfo {
|
||||
pub fn new(evtx_filepath: String, record: Value, data_string: String) -> EvtxRecordInfo {
|
||||
return EvtxRecordInfo {
|
||||
evtx_filepath: evtx_filepath,
|
||||
record: record,
|
||||
data_string,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -144,7 +146,7 @@ impl Detection {
|
||||
let records = &*records;
|
||||
let agg_condition = rule.has_agg_condition();
|
||||
for record_info in records {
|
||||
let result = rule.select(&record_info.evtx_filepath, &record_info.record);
|
||||
let result = rule.select(&record_info.evtx_filepath, &record_info);
|
||||
if !result {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user