-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev autoruletester refactoring (#594)
* Refactored: custom tests, presentation overview and dry vios * Small fix in init * Optimized refactoring to delete rule count bug and neglect on wrong rule filter * fixed bug: wrong handling if not the end test for group of tests for certain multirule index fails * tests are now successfull and partially adapted to new logic * Review ppcad done (Part 1) * Processed ppcads review * Added additional example tests for new target_rule_idx enforcing * Changed doc strings where still default * Solved last naming issues stated in review * Rewritten lass color prints, fixed error message to simple print when no target_rule_idx and deleted unused imports * Fixed diff print for each rule * Fixed index out of bounds when printing out problems * Fixed the last fix causing out of bounds and added colored diff * Add missing requirement * Refactor auto rule tester * refactored to linter score 9.81/10 * fixed black * fixed black * fixed black * fixed black * fixed black * fixed black * Improve code quality in auto rule tester --------- Co-authored-by: Piotr Pauksztelo <[email protected]>
- Loading branch information
1 parent
53d702f
commit 431ab54
Showing
12 changed files
with
652 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
filter: "test_label: execute" | ||
filter: 'winlog.event_data.param2: "stop"' | ||
labeler: | ||
id: labeler-1352bc0a-53ae-4740-bb9e-1e865f63375f | ||
label: | ||
action: | ||
- execute | ||
- terminate | ||
description: "..." |
7 changes: 3 additions & 4 deletions
7
examples/exampledata/rules/pre_detector/generic/example_rule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
filter: "test_pre_detector" | ||
filter: 'tags: "1" AND inp.message: "1"' | ||
pre_detector: | ||
id: RULE_ONE_ID | ||
id: RULE_ONE_ID_1 | ||
title: RULE_ONE | ||
severity: critical | ||
mitre: | ||
- attack.test1 | ||
- attack.test2 | ||
case_condition: directly | ||
description: "..." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.