Git Product home page Git Product logo

secureaws's Introduction

secureaws

This package will scan your AWS account to identify whether basic security services are enabled. If not, will help you enable/setup the same.

Licence:

License: MIT

MIT Licence. See Licence for full details.

Covered Services:

  • CloudTrail
  • Config
  • Root MFA
  • VPC Flow Logs
  • Strong Password Policy
  • Macie
  • Guardy Duty
  • S3 SSE Encryption
  • EBS Encryption
  • More coming soon...

Installation (Any 1):

  • Run pip3 install secureaws
  • Download the latest release, extract it and run python3 setup.py install

Help:

  • secureaws --help
  • secureaws <command> --help

Examples:

  • Scan AWS account using AWS keys: secureaws check --access-key XXXXXX --secret-key XXXXXX --region us-west-2
  • Scan AWS account using profile: secureaws check --profile xxx --region eu-west-1
  • Setup all services in interactive mode: secureaws setup --profile XXXXXX --region ap-south-1
  • Setup all services in non-interactive mode (except ebs-sse): secureaws setup --access-key XXXXXX --secret-key XXXXXX -y
  • Setup specific service(s): secureaws setup --profile XXXXXX --region ap-south-1 -s config -s mfa
  • Generate RSA Key Pair: secureaws genrsa
  • Generate RSA Key Pair with custom filename and key size: secureaws genrsa --file-name xxx --key-size 2048

IAM Permissions required:

You can also find required IAM permission under help section of both check and setup.

For check command: This commands scans your AWS account to check if recommended security services/options are enabled

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
          "cloudtrail:DescribeTrails",
          "config:DescribeConfigurationRecorderStatus",
          "ec2:DescribeFlowLogs",
          "iam:GetAccountSummary",
          "iam:GetAccountPasswordPolicy",
          "macie:ListMemberAccounts",
          "guardduty:ListDetectors",
          "s3:ListAllMyBuckets",
          "s3:GetEncryptionConfiguration",
          "ec2:DescribeVolumes"
      ],
      "Resource": "*"
    }
  ]
}

For setup command: This command will help you enable recommended security services/options on your AWS account

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:CreateBucket",
        "s3:PutEncryptionConfiguration",
        "s3:ListAllMyBuckets",
        "s3:PutBucketPolicy",
        "s3:HeadBucket",
        "cloudtrail:StartLogging",
        "cloudtrail:CreateTrail",
        "iam:CreateRole",
        "iam:PassRole",
        "iam:AttachRolePolicy",
        "iam:CreatePolicy",
        "iam:UpdateAccountPasswordPolicy",
        "iam:CreateVirtualMFADevice",
        "iam:EnableMFADevice",
        "iam:GetUser",
        "iam:ListMFADevices",
        "config:StartConfigurationRecorder",
        "config:PutDeliveryChannel",
        "config:PutConfigurationRecorder",
        "logs:CreateLogGroup",
        "logs:DescribeLogGroups",
        "ec2:CreateFlowLogs",
        "ec2:DescribeVpcs",
        "ec2:StopInstances",
        "ec2:StartInstances",
        "ec2:CreateSnapshot",
        "ec2:CopySnapshot",
        "ec2:CreateVolume",
        "ec2:AttachVolume",
        "ec2:DeleteVolume",   # Required for deleting unencrypted volume
        "ec2:DeleteSnapshot"  # Required for deleting unencrypted snapshot
      ],
      "Resource": "*"
    }
  ]
}

secureaws's People

Contributors

paliwalvimal avatar

Stargazers

Krzysztof Wilczyński avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.