Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[guardduty] set dedup, title, and dedup period #45

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions aws_rules_guardduty/aws_guardduty_high_sev_findings.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
def rule(event):
return 7.0 <= float(event.get('severity', 0)) <= 8.9


def dedup(event):
return event.get('id')


def title(event):
return event.get('title')
4 changes: 3 additions & 1 deletion aws_rules_guardduty/aws_guardduty_high_sev_findings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ LogTypes:
Tags:
- AWS
Severity: High
DedupPeriodMinutes: 60
Description: >
A high-severity GuardDuty finding has been identified, which could indicate a host-compromise.
A high-severity GuardDuty finding has been identified.
Runbook: >
Search related logs to understand the root cause of the activity.
Reference:
Expand Down Expand Up @@ -53,6 +54,7 @@ Tests:
"count": 1
},
"severity": 8,
"id": "eeb88ab56556eb7771b266670dddee5a",
"createdAt": "2020-02-14T18:12:22.316Z",
"updatedAt": "2020-02-14T18:12:22.316Z",
"title": "Principal AssumedRole:IAMRole attempted to add a policy to themselves that is highly permissive.",
Expand Down
8 changes: 8 additions & 0 deletions aws_rules_guardduty/aws_guardduty_low_sev_findings.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
def rule(event):
return 0.1 <= float(event.get('severity', 0)) <= 3.9


def dedup(event):
return event.get('id')


def title(event):
return event.get('title')
4 changes: 3 additions & 1 deletion aws_rules_guardduty/aws_guardduty_low_sev_findings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ LogTypes:
Tags:
- AWS
Severity: Low
DedupPeriodMinutes: 480 # 8 hours
Description: >
A low-severity GuardDuty finding has been identified, which could indicate a host-compromise.
A low-severity GuardDuty finding has been identified.
Runbook: >
Search related logs to understand the root cause of the activity.
Reference:
Expand Down Expand Up @@ -53,6 +54,7 @@ Tests:
"count": 1
},
"severity": 1,
"id": "eeb88ab56556eb7771b266670dddee5a",
"createdAt": "2020-02-14T18:12:22.316Z",
"updatedAt": "2020-02-14T18:12:22.316Z",
"title": "Principal AssumedRole:IAMRole attempted to add a policy to themselves that is highly permissive.",
Expand Down
8 changes: 8 additions & 0 deletions aws_rules_guardduty/aws_guardduty_med_sev_findings.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
def rule(event):
return 4.0 <= float(event.get('severity', 0)) <= 6.9


def dedup(event):
return event.get('id')


def title(event):
return event.get('title')
4 changes: 3 additions & 1 deletion aws_rules_guardduty/aws_guardduty_med_sev_findings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ LogTypes:
Tags:
- AWS
Severity: Medium
DedupPeriodMinutes: 60
Description: >
A medium-severity GuardDuty finding has been identified, which could indicate a host-compromise.
A medium-severity GuardDuty finding has been identified.
jacknagz marked this conversation as resolved.
Show resolved Hide resolved
Runbook: >
Search related logs to understand the root cause of the activity.
Reference:
Expand All @@ -24,6 +25,7 @@ Tests:
"schemaVersion": "2.0",
"accountId": "123456789012",
"region": "us-east-1",
"id": "eeb88ab56556eb7771b266670dddee5a",
"partition": "aws",
"arn": "arn:aws:guardduty:us-west-2:123456789012:detector/111111bbbbbbbbbb5555555551111111/finding/90b82273685661b9318f078d0851fe9a",
"type": "PrivilegeEscalation:IAMUser/AdministrativePermissions",
Expand Down