AWS GuardDuty - User Guide

In this article, you will understand step by step how to easily integrate with AWS GuardDuty

The integration with AWS GuardDuty allows you to track the configurations of detectors that monitor your AWS accounts and workloads for malicious activity. Detecting threats and handling them in a pre-emptive manner is an important key criteria in cloud security. 

Permissions: 

All the permissions required for the integration with AWS GuardDuty are read-only and do not allow Scytale to perform any actions within your AWS account.

You can assign permissions by creating a customer managed policy, which allows you to include the following permissions, as detailed below in Step 1:

  • guardduty:ListDetectors
  • guardduty:GetDetector
  • guardduty:ListFindings
  • guardduty:GetFindings
  • ec2:DescribeRegions

Alternatively, you can add an AWS managed policy, which might include more permissions than we requested:

  • AmazonGuardDutyReadOnlyAccess

How to connect AWS GuardDuty integration?

 

Log in to the Scytale web app

  • Click on the "Integrations" menu screen to the left
  • Click on the "Connect" button under the AWS GuardDuty icon

There are two methods to connect to AWS IAM:

💡The first method is recommended and as default, it will show up in the connection,
but if you prefer the second method, you can switch between them by clicking on the switch button. 

  1. Connect with IAM role - the main actions in AWS IAM:
    Create a policy with permissions for the integration, and then create the assumed role. 
  2. Connect with Access keys - the main actions in AWS IAM:
    Create a policy with permissions for the integration, and then create a user assigned to it. At the end of creating the user, you provide the access key and secret key.

💡In the connection screen, you can change the connection method by clicking on the switch button. 

  • Connection Name (relevant for both methods) - is used to differentiate between your connections. For instance, if you manage multiple AWS accounts or would like to connect multiple times to the integration. It's automatically titled (Connection 1,2,3 etc), but you can change it to a custom name to make it easier to identify.
    For example: scytale-production-env.

The First Method: Connect with IAM Role

Step 1: Create a policy in AWS IAM Console

  • Go to the AWS Console

  • In the top search, write IAM and select it in services


  • On the left sidebar, under the Access Management dropdown, select Policies

  • In the right corner, click on Create Policy

  • In the Create Policy screen follow the instructions:
    • Service - select GuardDuty
    • Actions - search and enable the following permissions:
      • guardduty:ListDetectors
      • guardduty:GetDetector
  • Resources - select the "All resources" option.
  • Request conditions - Leave as is

 

  • Go to "Add additional permissions" -  as part of this step, you will need to add permission from another AWS service - EC2. This step is required in order to collect evidence for AWS Config.
    • Service - select EC2
    • Actions - search and enable the following permission:
      • ec2:DescribeRegions
    • Resources - Leave as is
    • Request conditions - Leave as is
  • Click on Next once you have added all the permissions above. 

  • Tags do not need to be added, click on the Next: Review button. 

  • On the Review policy page please fill in the following fields:
    • Name the policy: for example - scytale-aws-guardduty
    • Description: you can write your description
    • Click on "Create policy"

Step 2: Create an IAM role 

  • On the left menu in the IAM service,  select Roles.

  • In the top right corner, click on create role.
  • In the trusted entity type - select AWS account. 
  • Then, enable "Another AWS account"
    • The Account ID should be copied from the connection in Scytale.
  • Under options, enable "Require external ID (Best practice when a third party will assume this role)"
    • The External ID should be copied from the connection in Scytale.
  • Please don't enable the require MFA.
  • Click on "Next"




  • In the Add permissions step, find the policy you created in the previous step.
  • Enable this policy. 
  • Click on "Next"
  • Then, add the role name and review the policy and role details. 
  • Click on "Create role" if all the details are correct. 
 
  • Click "View role" in the success notification at the top of the screen.
  • Copy the ARN from Summary and paste it into Scytale's Role ARN field. 

  • Click on Connect in Scytale after pasting the Role ARN. 

The second Method: Connect with Access keys

 
Step 1: Create a policy in AWS IAM Console

  • Access the AWS Console.
  • In the search bar at the top, type in "IAM" and select it from the search results.

  • On the left sidebar, under the Access Management dropdown, select Policies

  • In the right corner, click on Create Policy

  • In the Create Policy screen follow the instructions:
    • Service - select GuardDuty
    • Actions - search and enable the following permissions:
      • guardduty:ListDetectors
      • guardduty:GetDetector
  • Resources - select the "All resources" option.
  • Request conditions - Leave as is

 

  • Go to "Add additional permissions" -  as part of this step, you will need to add permission from another AWS service - EC2. This step is required in order to collect evidence for AWS Config.
    • Service - select EC2
    • Actions - search and enable the following permission:
      • ec2:DescribeRegions
    • Resources - Leave as is
    • Request conditions - Leave as is
  • Click on Next once you have added all the permissions above. 

  • Tags do not need to be added, click on the Next: Review button. 

  • On the Review policy page please fill in the following fields:
    • Name the policy: for example - scytale-aws-guardduty
    • Description: you can write your description
    • Click on "Create policy"

 

Step 2: Create a user and generate an Access key

  • On the left sidebar, go to Access Management and select Users

  • In the top right corner, click on Add users

     

  • In the user name field, please enter the following: scytale-guardduty

  • For the "Select AWS credential type" option - tick the "Access key - Programmatic access" box

  • Click on Next:Permissions button


  • In the Set permissions screen, select the option: Attach existing policies directly
  • Search and select the policy that you created - scytale-aws-guardduty
  • Click on Next:Tags 

 

  • Tags do not need to be added, click on the Next: Review button

  • Click on Create user button

  • Copy the Access key ID and the Secret access key (The values should be used to fill in the fields in AWS GuardDuty integration in Scytale)

 

 
  • In Scytale, click Connect on to AWS GuardDuty.
  • Click the button to switch to the Access keys method and then paste the keys.