项目作者: jmfuchs

项目描述 :
A collection of CloudWatch Event Rules.
高级语言:
项目地址: git://github.com/jmfuchs/aws-cwe-quick-reference.git
创建时间: 2018-09-05T15:16:59Z
项目社区:https://github.com/jmfuchs/aws-cwe-quick-reference

开源协议:Apache License 2.0

下载


AWS CloudWatch Event Rule - Quick Reference

This is a quick reference for security related AWS CloudWatch Event Rule patterns.

Root User Activity

All IAM (including Root) events go to the us-east-1 region, so these CloudWatch Event Rules must be created in us-east-1 (N. Virginia).

All Activity

Event Pattern

  1. {
  2. "detail-type": [
  3. "AWS Console Sign In via CloudTrail",
  4. "AWS API Call via CloudTrail"
  5. ],
  6. "detail": {
  7. "userIdentity": {
  8. "type": [
  9. "Root"
  10. ]
  11. }
  12. }
  13. }

AWS CloudFormation Resource (YAML)

  1. CWERuleAllRootActivity:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-root-activity
  5. Description: "All Root Activity"
  6. EventPattern:
  7. detail-type:
  8. - "AWS Console Sign In via CloudTrail"
  9. - "AWS API Call via CloudTrail"
  10. detail:
  11. userIdentity:
  12. type:
  13. - Root
  14. State: "ENABLED"

Root Login

Event Pattern

  1. {
  2. "detail": {
  3. "eventName": [
  4. "ConsoleLogin"
  5. ],
  6. "userIdentity": {
  7. "type": [
  8. "Root"
  9. ]
  10. }
  11. }
  12. }

AWS CloudFormation Resource (YAML)

  1. CWERuleRootLogin:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-root-activity-login
  5. Description: "Root Password Change"
  6. EventPattern:
  7. detail:
  8. userIdentity:
  9. type:
  10. - Root
  11. eventName:
  12. - ConsoleLogin
  13. State: "ENABLED"

Password Modification

Event Pattern

  1. {
  2. "detail": {
  3. "eventName": [
  4. "PasswordUpdated",
  5. "PasswordRecoveryRequested",
  6. "PasswordRecoveryCompleted"
  7. ],
  8. "userIdentity": {
  9. "type": [
  10. "Root"
  11. ]
  12. }
  13. }
  14. }

AWS CloudFormation Resource (YAML)

  1. CWERuleRootChangePassword:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-root-activity-password
  5. Description: "Root Password Change"
  6. EventPattern:
  7. detail:
  8. userIdentity:
  9. type:
  10. - Root
  11. eventName:
  12. - PasswordUpdated
  13. - PasswordRecoveryRequested
  14. - PasswordRecoveryCompleted
  15. State: "ENABLED"

Email Update

Event Pattern

  1. {
  2. "detail": {
  3. "eventName": [
  4. "EmailUpdated"
  5. ],
  6. "userIdentity": {
  7. "type": [
  8. "Root"
  9. ]
  10. }
  11. }
  12. }

AWS CloudFormation Resource (YAML)

  1. CWERuleRootEmailUpdate:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-root-activity-email-update
  5. Description: "Root Email Update"
  6. EventPattern:
  7. detail:
  8. userIdentity:
  9. type:
  10. - Root
  11. eventName:
  12. - EmailUpdated
  13. State: "ENABLED"

Security Questions or Contacts Modification

Event Pattern

  1. {
  2. "detail": {
  3. "eventName": [
  4. "SetAdditionalContacts",
  5. "SetSecurityQuestions"
  6. ],
  7. "userIdentity": {
  8. "type": [
  9. "Root"
  10. ]
  11. }
  12. }
  13. }

AWS CloudFormation Resource (YAML)

  1. CWERuleAccountSettingsUpdate:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-root-activity-question-contacts-update
  5. Description: "Root Account settings update"
  6. EventPattern:
  7. detail:
  8. userIdentity:
  9. type:
  10. - Root
  11. eventName:
  12. - SetAdditionalContacts
  13. -SetSecurityQuestions
  14. State: "ENABLED"

MFA Modification

Event Pattern

  1. {
  2. "detail": {
  3. "eventName": [
  4. "CreateVirtualMFADevice",
  5. "EnableMFADevice",
  6. "DeactivateMFADevice",
  7. "DeleteVirtualMFADevice"
  8. ],
  9. "userIdentity": {
  10. "type": [
  11. "Root"
  12. ]
  13. }
  14. }
  15. }

AWS CloudFormation Resource (YAML)

  1. CWERuleRootMFA:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-root-activity-mfa-update
  5. Description: "Root MFA Update"
  6. EventPattern:
  7. detail:
  8. userIdentity:
  9. type:
  10. - Root
  11. eventName:
  12. - CreateVirtualMFADevice
  13. - EnableMFADevice
  14. - DeactivateMFADevice
  15. - DeleteVirtualMFADevice
  16. State: "ENABLED"

Amazon GuardDuty

All Findings

  1. CWERuleGuardDutyFindingAll:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-guardduty-findings-all
  5. Description: "All GuardDuty Findings"
  6. EventPattern:
  7. source:
  8. - aws.guardduty
  9. detail-type:
  10. - "GuardDuty Finding"
  11. State: "ENABLED"

All IAM Findings

  1. CWERuleGuardDutyIAMFindingAll:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-guardduty-iam-findings
  5. Description: "GuardDuty: AWS IAM Findings"
  6. EventPattern:
  7. source:
  8. - aws.guardduty
  9. detail-type:
  10. - "GuardDuty Finding"
  11. detail:
  12. resource:
  13. resourceType:
  14. - AccessKey
  15. State: "ENABLED"

Specific Finding

  1. CWERuleGuardDutyFindingSSHBruteForce:
  2. Type: "AWS::Events::Rule"
  3. Properties:
  4. Name: example-guardduty-finding-sshbruteforce
  5. Description: "GuardDuty Finding: UnauthorizedAccess:EC2/SSHBruteForce"
  6. EventPattern:
  7. source:
  8. - aws.guardduty
  9. detail:
  10. type:
  11. - "UnauthorizedAccess:EC2/SSHBruteForce"
  12. State: "ENABLED"