Add: sigma rules (#175)

This commit is contained in:
itiB
2021-11-22 08:45:44 +09:00
committed by GitHub
parent b53342218c
commit 034f9c0957
1086 changed files with 40715 additions and 192 deletions

View File

@@ -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;
}