changed output format #152 (#176)

- Title->Alert
- Message->Details
- add Computername and EventID
This commit is contained in:
DustInDark
2021-11-10 19:33:25 +09:00
committed by GitHub
parent 15a28e5602
commit 0c7ad547bf
3 changed files with 45 additions and 9 deletions

View File

@@ -159,6 +159,10 @@ impl Detection {
rule.rulepath.to_string(),
&record_info.record,
rule.yaml["level"].as_str().unwrap_or("").to_string(),
record_info.record["Event"]["System"]["Computer"]
.to_string()
.replace("\"", ""),
record_info.record["Event"]["System"]["EventID"].to_string(),
rule.yaml["title"].as_str().unwrap_or("").to_string(),
rule.yaml["output"].as_str().unwrap_or("").to_string(),
);
@@ -172,6 +176,8 @@ impl Detection {
rule.rulepath.to_string(),
agg_result.start_timedate,
rule.yaml["level"].as_str().unwrap_or("").to_string(),
"-".to_string(),
"-".to_string(),
rule.yaml["title"].as_str().unwrap_or("").to_string(),
output.to_string(),
)