-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c39814b
commit e149e6e
Showing
17 changed files
with
101 additions
and
102 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
Empty 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Alert on destructive AWS API calls.""" | ||
from stream_alert.rule_processor.rules_engine import StreamRules | ||
|
||
rule = StreamRules.rule | ||
|
||
|
||
@rule(logs=['binaryalert'], | ||
outputs=['aws-sns:sample-topic']) | ||
def binaryalert_yara_match(rec): | ||
""" | ||
author: Austin Byers (Airbnb CSIRT) | ||
description: BinaryAlert found a binary matching a YARA rule | ||
reference: https://binaryalert.io | ||
""" | ||
return rec['NumMatchedRules'] > 0 |
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
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
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
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
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
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
50 changes: 50 additions & 0 deletions
50
tests/integration/rules/binaryalert/binaryalert_yara_match.json
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,50 @@ | ||
{ | ||
"records": [ | ||
{ | ||
"data": { | ||
"FileInfo": { | ||
"MD5": "...", | ||
"S3LastModified": "...", | ||
"S3Location": "...", | ||
"S3Metadata": {}, | ||
"SHA256": "..." | ||
}, | ||
"MatchedRules": { | ||
"Rule1": { | ||
"MatchedStrings": [ | ||
"$eicar_regex" | ||
], | ||
"Meta": { | ||
"author": "Austin Byers (Airbnb CSIRT)", | ||
"description": "This is a standard AV test, intended to check whether BinaryAlert is working correctly.", | ||
"reference": "http://www.eicar.org/86-0-Intended-use.html" | ||
}, | ||
"RuleFile": "eicar.yar", | ||
"RuleName": "eicar_av_test", | ||
"RuleTags": [] | ||
} | ||
}, | ||
"NumMatchedRules": "1" | ||
}, | ||
"description": "All YARA matches from BinaryAlert trigger an alert", | ||
"log": "binaryalert", | ||
"service": "sns", | ||
"source": "prefix_cluster_sample_topic", | ||
"trigger_rules": [ | ||
"binaryalert_yara_match" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"FileInfo": {}, | ||
"MatchedRules": {}, | ||
"NumMatchedRules": "0" | ||
}, | ||
"description": "No alerts triggered if no YARA rules were matched", | ||
"log": "binaryalert", | ||
"service": "sns", | ||
"source": "prefix_cluster_sample_topic", | ||
"trigger_rules": [] | ||
} | ||
] | ||
} |
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