-
Notifications
You must be signed in to change notification settings - Fork 886
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from draios/append-macros-rules
Add ability to append to rules/macros
- Loading branch information
Showing
8 changed files
with
144 additions
and
15 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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- macro: my_macro | ||
condition: proc.name=not-cat | ||
|
||
- macro: my_macro | ||
append: true | ||
condition: or proc.name=cat | ||
|
||
- rule: Open From Cat | ||
desc: A process named cat does an open | ||
condition: evt.type=open and my_macro | ||
output: "An open was seen (command=%proc.cmdline)" | ||
priority: WARNING |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- macro: my_macro | ||
condition: proc.name=not-cat | ||
append: true |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- macro: my_macro | ||
condition: proc.name=cat | ||
|
||
- macro: my_macro | ||
append: false | ||
condition: proc.name=not-cat | ||
|
||
- rule: Open From Cat | ||
desc: A process named cat does an open | ||
condition: evt.type=open and my_macro | ||
output: "An open was seen (command=%proc.cmdline)" | ||
priority: WARNING |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- rule: my_rule | ||
desc: A process named cat does an open | ||
condition: evt.type=open and fd.name=not-a-real-file | ||
output: "An open of /dev/null was seen (command=%proc.cmdline)" | ||
priority: WARNING | ||
|
||
- rule: my_rule | ||
append: true | ||
condition: or fd.name=/dev/null |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- rule: my_rule | ||
condition: evt.type=open | ||
append: true |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- rule: my_rule | ||
desc: A process named cat does an open | ||
condition: evt.type=open and fd.name=/dev/null | ||
output: "An open of /dev/null was seen (command=%proc.cmdline)" | ||
priority: WARNING | ||
|
||
- rule: my_rule | ||
append: true | ||
condition: and fd.name=not-a-real-file |
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