forked from airbnb/streamalert
-
Notifications
You must be signed in to change notification settings - Fork 1
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
0bb9ae2
commit 39ee39e
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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,25 @@ | ||
"""Alert on GuardDuty""" | ||
from helpers.base import in_set | ||
from stream_alert.rule_processor.rules_engine import StreamRules | ||
|
||
rule = StreamRules.rule | ||
disable = StreamRules.disable() | ||
|
||
|
||
@rule(logs=['cloudwatch:events'], | ||
matchers=[], | ||
outputs=['slack:sample-channel']) | ||
def guardduty(rec): | ||
""" | ||
author: spiper | ||
description: Alert on GuardDuty events | ||
playbook: (a) identify the AWS account in the log | ||
(b) identify what resource(s) are impacted | ||
(c) contact the point-of-contact for the account | ||
testing: From the GuardDuty AWS page (https://console.aws.amazon.com/guardduty/home) | ||
click the button to "Generate Sample Findings" | ||
""" | ||
|
||
if rec['detail-type'] == 'GuardDuty Finding': | ||
return True | ||
return False |
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,24 @@ | ||
{ | ||
"records": [ | ||
{ | ||
"data": { | ||
"version": "0", | ||
"id": "00000000-0000-0000-0000-000000000000", | ||
"detail-type": "GuardDuty Finding", | ||
"source": "aws.guardduty", | ||
"account": "111111111111", | ||
"time": "2018-02-13T18:25:01Z", | ||
"region": "us-east-1", | ||
"resources": [], | ||
"detail": {} | ||
}, | ||
"description": "GuardDuty", | ||
"log": "cloudwatch:events", | ||
"service": "kinesis", | ||
"source": "prefix_cluster1_stream_alert_kinesis", | ||
"trigger_rules": [ | ||
"guardduty" | ||
] | ||
} | ||
] | ||
} |