Contents

Account Summary

Accounts reviewed

Account nameAccount IDCollection date
NCCGroup-BascWorkshopXXXXXXXXXXXX2019-11-27

Resources

Resource counts

S3 buckets
EC2 instances
ELBs
ELBv2s
RDS instances
Redshift clusters
ElasticSearch domains
Elasticache clusters
SNS topics
SQS queues
CloudFronts
Autoscaling groups
ElasticBeanstalks
Firehose streams
Glacier vaults
KMS keys
Lambda functions
NCCGroup-BascWorkshop 8 2 1 1 1 1 1 0 1 1 0 0 0 0 1 11 0

Region usage

This table shows whether a region contains the resources being counted. Currently all S3 buckets, no matter their location, and CloudFronts, are identified as being in us-east-1.

eu-north-1
ap-south-1
eu-west-3
eu-west-2
eu-west-1
ap-northeast-2
ap-northeast-1
sa-east-1
ca-central-1
ap-southeast-1
ap-southeast-2
eu-central-1
us-east-1
us-east-2
us-west-1
us-west-2
NCCGroup-BascWorkshop
YS3 buckets:8
EC2 instances:2
ELBs:1
ELBv2s:1
RDS instances:1
Redshift clusters:1
ElasticSearch domains:1
SNS topics:1
SQS queues:1
Glacier vaults:1
KMS keys:11

IAM

Public network resources

Counts of public resources by type

ec2
elb
elbv2
rds
redshift
ecs
autoscaling
cloudfront
apigateway
NCCGroup-BascWorkshop 1 1 0 0 0 0 0 0 0

Counts of public resources by port ranges


Findings Summary

Counts of finding types by account

Links to findings

High Medium Low Info

Counts of findings by account


Findings

GuardDuty

GuardDuty is not enabled

Severity: Medium
Issue ID: GUARDDUTY_OFF

GuardDuty is an AWS threat detection service that detects compromised access keys, EC2 instances, and more. It should be enabled in all regions.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • eu-north-1
    • ap-south-1
    • eu-west-3
    • eu-west-2
    • eu-west-1
    • ap-northeast-2
    • ap-northeast-1
    • sa-east-1
    • ca-central-1
    • ap-southeast-1
    • ap-southeast-2
    • eu-central-1
    • us-east-2
    • us-west-1
    • us-west-2

S3

Public grant to S3 bucket via ACL

Severity: High
Issue ID: S3_PUBLIC_ACL

Access to S3 buckets should be controlled by policies, not ACL. ACLs result in overly permissive privileges to list the contents of the bucket.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. sadcloud-s3-stack-s3bucket-1o9nhbfprv2wb
        {
            "Grantee": {
                "Type": "Group",
                "URI": "http://acs.amazonaws.com/groups/global/AllUsers"
            },
            "Permission": "READ"
        }

Internet accessible S3 bucket via policy (only GetObject)

Severity: Info
Issue ID: S3_PUBLIC_POLICY_GETOBJECT_ONLY

This is the right way to make an S3 bucket public when you don't want to put CloudFront in front of it. This may be done when a third-party caching service is being used and you don't care about direct access to the S3 bucket.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. sadcloudhetonlys320191127153142068600000001

Internet accessible S3 bucket via policy

Severity: High
Issue ID: S3_PUBLIC_POLICY

This S3 bucket allows more public access than simply GetObject. These public privileges should be reduced.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. sadcloudhetonlys320191127153143116700000003
        "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"*\"},\"Action\":\"s3:*\",\"Resource\":[\"arn:aws:s3:::sadcloudhetonlys320191127153143116700000003/*\",\"arn:aws:s3:::sadcloudhetonlys320191127153143116700000003\"]}]}"

S3 Control Access Block is not on

Severity: Low
Issue ID: S3_ACCESS_BLOCK_OFF

This control prevents S3 buckets from being made public. If there are no public S3 buckets in the account this should be turned on.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)

IAM

Custom policy allows admin

Severity: Low
Issue ID: IAM_CUSTOM_POLICY_ALLOWS_ADMIN

Instead of using the AdministratorAccess policy, a custom policy was created that does the same thing, or allows escalation to the same thing.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. arn:aws:iam::XXXXXXXXXXXX:policy/sadcloud_superuser_policy
        {
            "policy": {
                "Statement": [
                    {
                        "Action": [
                            "*"
                        ],
                        "Effect": "Allow",
                        "Resource": "*"
                    }
                ],
                "Version": "2012-10-17"
            }
        }
      2. arn:aws:iam::XXXXXXXXXXXX:policy/wildcard_IAM_policy20191127153143207000000004
        {
            "policy": {
                "Statement": [
                    {
                        "Action": [
                            "*"
                        ],
                        "Effect": "Allow",
                        "Resource": "*"
                    }
                ],
                "Version": "2012-10-17"
            }
        }
      3. arn:aws:iam::XXXXXXXXXXXX:role/terraform-20191127153143717500000005
        {
            "comment": "Role has custom policy allowing admin",
            "policy": {
                "Statement": [
                    {
                        "Effect": "Allow",
                        "NotAction": [
                            "ec2:Describe*"
                        ],
                        "Resource": "*"
                    }
                ],
                "Version": "2012-10-17"
            }
        }
      4. arn:aws:iam::XXXXXXXXXXXX:group/sadcloudInlineGroup
        {
            "comment": "Group has custom policy allowing admin",
            "policy": {
                "Statement": [
                    {
                        "Effect": "Allow",
                        "NotAction": [
                            "ec2:*"
                        ],
                        "Resource": "*"
                    }
                ],
                "Version": "2012-10-17"
            }
        }
      5. sadcloudInlineUser
        {
            "comment": "User has custom policy allowing admin",
            "policy": {
                "Statement": [
                    {
                        "Effect": "Allow",
                        "NotAction": "s3:DeleteBucket",
                        "Resource": "*"
                    }
                ],
                "Version": "2012-10-17"
            }
        }

Use of NotAction in an Allow statement

Severity: Medium
Issue ID: IAM_NOTACTION_ALLOW

Using NotAction in an Allow policy almost always results in unwanted actions being allowed and should be avoided.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. {'account': 'NCCGroup-BascWorkshop'}
        {
            "Statement": {
                "Effect": "Allow",
                "NotAction": [
                    "ec2:Describe*"
                ],
                "Resource": "*"
            }
        }
      2. {'account': 'NCCGroup-BascWorkshop'}
        {
            "Statement": {
                "Effect": "Allow",
                "NotAction": [
                    "ec2:*"
                ],
                "Resource": "*"
            }
        }
      3. {'account': 'NCCGroup-BascWorkshop'}
        {
            "Statement": {
                "Effect": "Allow",
                "NotAction": "s3:DeleteBucket",
                "Resource": "*"
            }
        }

IAM role with admin privileges can be assumed by unexpected principals

Severity: High
Issue ID: IAM_UNEXPECTED_ADMIN_PRINCIPAL

Admins in an account should be assumed by people. This rule detects IAM Roles that can be granted to EC2s and other services, that has admin privileges.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. arn:aws:iam::XXXXXXXXXXXX:role/terraform-20191127153143717500000005
        {
            "comment": "Unexpected Principal in AssumeRolePolicyDocument for an admin",
            "Principal": {
                "Service": "ec2.amazonaws.com"
            }
        }

IAM role allows assumption from anywhere

Severity: High
Issue ID: IAM_ROLE_ALLOWS_ASSUMPTION_FROM_ANYWHERE

The IAM role's trust policy allows any other account to assume it.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. arn:aws:iam::XXXXXXXXXXXX:role/terraform-20191127153146229300000008
        {
            "statement": {
                "Statement": [
                    {
                        "Action": "sts:AssumeRole",
                        "Condition": {
                            "BoolIfExists": {
                                "aws:MultiFactorAuthPresent": "false"
                            }
                        },
                        "Effect": "Allow",
                        "Principal": {
                            "AWS": "*"
                        },
                        "Sid": ""
                    }
                ],
                "Version": "2012-10-17"
            }
        }

Name does not indicate admin

Severity: Low
Issue ID: IAM_NAME_DOES_NOT_INDICATE_ADMIN

This IAM Group grants admin privileges, but the name does not indicate it is for admins.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. arn:aws:iam::XXXXXXXXXXXX:group/sadcloud_superuser

IAM role with s3 listing and get privileges can be assumed by unexpected principals

Severity: High
Issue ID: IAM_UNEXPECTED_S3_EXFIL_PRINCIPAL

The ability to list s3 buckets, and get objects from them, should be restricted largely to people as compromising an EC2 with this privilege could lead to exfiltration of data.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. arn:aws:iam::XXXXXXXXXXXX:role/sadcloud-s3-stack
        {
            "comment": "Unexpected Principal in AssumeRolePolicyDocument for an admin",
            "Principal": {
                "Service": "cloudformation.amazonaws.com"
            }
        }

Password policy does not meet minimum character requirement

Severity: Low
Issue ID: PASSWORD_POLICY_CHARACTER_MINIMUM

A password length requirement helps ensure strong passwords are used by IAM Users. Setting a password policy does not impact existing users, so after setting this, you should ensure users reset their passwords so that they are in compliance.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
        {
            "MinimumPasswordLength": 6
        }

Password policy does not require all character sets

Severity: Low
Issue ID: PASSWORD_POLICY_CHARACTER_SET_REQUIREMENTS

A password character set requirement help ensure strong passwords are used by IAM Users. Setting a password policy does not impact existing users, so after setting this, you should ensure users reset their passwords so that they are in compliance.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
        {
            "Policy lacks": [
                "RequireNumbers",
                "RequireSymbols",
                "RequireLowercaseCharacters",
                "RequireUppercaseCharacters"
            ]
        }

User has password login, but not MFA

Severity: Medium
Issue ID: USER_WITH_PASSWORD_LOGIN_BUT_NO_MFA

MFA (multi-factor authentication) helps mitigate user account take-over.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. jdow
        {
            "Number of days since user was created": 47
        }
      2. student-10
        {
            "Number of days since user was created": 53
        }
      3. student-11
        {
            "Number of days since user was created": 53
        }
      4. student-12
        {
            "Number of days since user was created": 53
        }
      5. student-13
        {
            "Number of days since user was created": 53
        }
      6. student-14
        {
            "Number of days since user was created": 53
        }
      7. student-15
        {
            "Number of days since user was created": 53
        }
      8. student-16
        {
            "Number of days since user was created": 53
        }
      9. student-17
        {
            "Number of days since user was created": 53
        }
      10. student-18
        {
            "Number of days since user was created": 53
        }
      11. student-19
        {
            "Number of days since user was created": 53
        }
      12. student-2
        {
            "Number of days since user was created": 53
        }
      13. student-20
        {
            "Number of days since user was created": 53
        }
      14. student-21
        {
            "Number of days since user was created": 53
        }
      15. student-3
        {
            "Number of days since user was created": 53
        }
      16. student-4
        {
            "Number of days since user was created": 53
        }
      17. student-5
        {
            "Number of days since user was created": 53
        }
      18. student-6
        {
            "Number of days since user was created": 53
        }
      19. student-7
        {
            "Number of days since user was created": 53
        }
      20. student-8
        {
            "Number of days since user was created": 53
        }
      21. student-9
        {
            "Number of days since user was created": 53
        }

User has two access keys

Severity: Low
Issue ID: USER_HAS_TWO_ACCESS_KEYS

A user should only have one access key. The ability to have multiple access keys is only for when an access key is being rolled, and the old one should be removed. The user should identify one access key to use and the other should be removed.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. rami
        {
            "Number of days since key1 was rotated": 38,
            "Number of days since key2 was rotated": 39
        }

User has never logged in

Severity: Medium
Issue ID: USER_HAS_NEVER_LOGGED_IN

The password for these users should be removed. If the user has no access keys, the user should be removed. The password may be a default password or may have been transmitted to the user insecurely, such that the user account may be compromised.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
      1. student-11
        {
            "Number of days since user was created": 53
        }
      2. student-12
        {
            "Number of days since user was created": 53
        }
      3. student-13
        {
            "Number of days since user was created": 53
        }
      4. student-14
        {
            "Number of days since user was created": 53
        }
      5. student-15
        {
            "Number of days since user was created": 53
        }
      6. student-19
        {
            "Number of days since user was created": 53
        }
      7. student-2
        {
            "Number of days since user was created": 53
        }
      8. student-21
        {
            "Number of days since user was created": 53
        }
      9. student-3
        {
            "Number of days since user was created": 53
        }
      10. student-4
        {
            "Number of days since user was created": 53
        }
      11. student-7
        {
            "Number of days since user was created": 53
        }

RDS

RDS has a public IP address

Severity: Low
Issue ID: RDS_PUBLIC_IP

Check whether this RDS instance is publicly accessible. Best practice is to put RDS instances in private subnets and not give them public IPs.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. terraform-2019112715315400040000000f

ECR

ECR is public

Severity: Medium
Issue ID: ECR_PUBLIC

The Amazon Elastic Container Registry (ECR) stores docker images. These may contain sensitive information. These are somewhat hard for an attacker to find, but should not be made public.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sadcloud
        "{\n  \"Version\" : \"2008-10-17\",\n  \"Statement\" : [ {\n    \"Sid\" : \"AllowPull\",\n    \"Effect\" : \"Allow\",\n    \"Principal\" : \"*\",\n    \"Action\" : [ \"ecr:GetDownloadUrlForLayer\", \"ecr:BatchGetImage\", \"ecr:BatchCheckLayerAvailability\", \"ecr:PutImage\", \"ecr:InitiateLayerUpload\", \"ecr:UploadLayerPart\", \"ecr:CompleteLayerUpload\", \"ecr:DescribeRepositories\", \"ecr:GetRepositoryPolicy\", \"ecr:ListImages\", \"ecr:DeleteRepository\", \"ecr:BatchDeleteImage\", \"ecr:SetRepositoryPolicy\", \"ecr:DeleteRepositoryPolicy\" ]\n  } ]\n}"

Redshift

Redshift has public IP

Severity: Medium
Issue ID: REDSHIFT_PUBLIC_IP

Redshift databases should be in private subnets. Databases should not have public IPs. You should additionally check if the Security Groups associated with this are allowing it to be publicly accessible.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sadcloud

ElasticSearch

ElasticSearch cluster is publicly accessible

Severity: High
Issue ID: ES_PUBLIC

ElasticSearch databases should be public. Change the resource policy to fix this.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sadcloud
        "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"es:*\",\"Resource\":\"arn:aws:es:us-east-1:XXXXXXXXXXXX:domain/sadcloud/*\"}]}"

SecurityGroup

Security Group overlaps

Severity: Low
Issue ID: SG_CIDR_OVERLAPS

This often happens when one attempts to restrict access, then opens up the access further.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sg-01dd978939ff79a94
        {
            "cidr1": "162.168.2.0/24",
            "cidr2": "162.168.2.0/25"
        }

Security Group CIDR unneeded

Severity: Info
Issue ID: SG_CIDR_UNNEEDED

The CIDR in the Security Group cannot be blocked, so including it is not necessary.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sg-09be13d229d0655c1
        {
            "cidr": "127.0.0.0/8"
        }

Security Group CIDR unexpected

Severity: Info
Issue ID: SG_CIDR_UNEXPECTED

The CIDR in the Security Group is formatted oddly.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sg-0a74dde934a3634f9
        {
            "cidr": "0.0.0.0/8"
        }

Security Group CIDR contains large IP range

Severity: Info
Issue ID: SG_LARGE_CIDR

The CIDR in a Security Group in the account contains a large IP range, defeating the purpose of restricting access with a Security Group


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. 52.14.0.0/16
        {
            "size": 65536,
            "security_groups": [
                "sg-05f97c10c069b9be0"
            ]
        }
      2. 52.28.0.0/16
        {
            "size": 65536,
            "security_groups": [
                "sg-0e8eb6c1dd1623af7"
            ]
        }

Glacier

Glacier vault is publicly accesible

Severity: Medium
Issue ID: GLACIER_PUBLIC

Glacier is a storage service like S3. These vaults are harder to find, but may still contain sensitive information. The resource policy should be locked down to allow access only by certain accounts.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sadcloud_public_vault
        "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"public\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"glacier:*\",\"Resource\":\"arn:aws:glacier:us-east-1:XXXXXXXXXXXX:vaults/sadcloud_public_vault\"}]}"

KMS

KMS is publicly accesible

Severity: Medium
Issue ID: KMS_PUBLIC

This may allow an attacker to decrypt data using the KMS key.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. 16f29c79-2b2a-4b95-bc67-26d4b800ba39
        "{\n  \"Version\" : \"2012-10-17\",\n  \"Id\" : \"key-insecure-1\",\n  \"Statement\" : [ {\n    \"Sid\" : \"Default IAM policy for KMS keys\",\n    \"Effect\" : \"Allow\",\n    \"Principal\" : {\n      \"AWS\" : \"*\"\n    },\n    \"Action\" : \"kms:*\",\n    \"Resource\" : \"*\"\n  } ]\n}"
      2. 6528c278-b7e8-4649-8d46-b339fed6367d
        "{\n  \"Version\" : \"2012-10-17\",\n  \"Id\" : \"key-insecure-1\",\n  \"Statement\" : [ {\n    \"Sid\" : \"Default IAM policy for KMS keys\",\n    \"Effect\" : \"Allow\",\n    \"Principal\" : {\n      \"AWS\" : \"*\"\n    },\n    \"Action\" : \"kms:*\",\n    \"Resource\" : \"*\"\n  } ]\n}"
      3. 8ac6e207-e518-4523-9c2c-a9ee0e26145b
        "{\n  \"Version\" : \"2012-10-17\",\n  \"Id\" : \"key-insecure-1\",\n  \"Statement\" : [ {\n    \"Sid\" : \"Default IAM policy for KMS keys\",\n    \"Effect\" : \"Allow\",\n    \"Principal\" : {\n      \"AWS\" : \"*\"\n    },\n    \"Action\" : \"kms:*\",\n    \"Resource\" : \"*\"\n  } ]\n}"
      4. fb166b67-87dd-4aa6-b009-01341dfebbc4
        "{\n  \"Version\" : \"2012-10-17\",\n  \"Id\" : \"key-insecure-1\",\n  \"Statement\" : [ {\n    \"Sid\" : \"Default IAM policy for KMS keys\",\n    \"Effect\" : \"Allow\",\n    \"Principal\" : {\n      \"AWS\" : \"*\"\n    },\n    \"Action\" : \"kms:*\",\n    \"Resource\" : \"*\"\n  } ]\n}"

SQS

SQS is publicly accesible

Severity: Medium
Issue ID: SQS_PUBLIC

This may allow an attacker to read or write messages to this queue.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. sadcloud
        "{\"Version\":\"2012-10-17\",\"Id\":\"sqspolicy\",\"Statement\":[{\"Sid\":\"First\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"sqs:*\",\"Resource\":\"arn:aws:sqs:us-east-1:XXXXXXXXXXXX:sadcloud\"}]}"

SNS

SNS is publicly accesible

Severity: Medium
Issue ID: SNS_PUBLIC

This may allow an attacker to read or write messages to this queue.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
      1. arn:aws:sns:us-east-1:XXXXXXXXXXXX:sadcloud
        "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"*\"},\"Action\":[\"SNS:Subscribe\",\"SNS:SetTopicAttributes\",\"SNS:RemovePermission\",\"SNS:Receive\",\"SNS:Publish\",\"SNS:ListSubscriptionsByTopic\",\"SNS:GetTopicAttributes\",\"SNS:DeleteTopic\",\"SNS:AddPermission\"],\"Resource\":\"arn:aws:sns:us-east-1:XXXXXXXXXXXX:sadcloud\"}]}"

Lightsail

Lightsail in use

Severity: Info
Issue ID: LIGHTSAIL_IN_USE

There is nothing wrong with Lightsail, but it does not tend to be used in enterprises. The instances often were created while testing something and forgotten about.


  • NCCGroup-BascWorkshop (XXXXXXXXXXXX)
    • us-east-1
        {
            "instance count": 1
        }