All Projects → mitre → Aws Foundations Cis Baseline

mitre / Aws Foundations Cis Baseline

Licence: other
InSpec profile to validate your VPC to the standards of the CIS Amazon Web Services Foundations Benchmark v1.1.0

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Aws Foundations Cis Baseline

Manageiq
ManageIQ Open-Source Management Platform
Stars: ✭ 1,089 (+1810.53%)
Mutual labels:  aws, cloud
Tweetmap
A real time Tweet Trend Map and Sentiment Analysis web application with kafka, Angular, Spring Boot, Flink, Elasticsearch, Kibana, Docker and Kubernetes deployed on the cloud
Stars: ✭ 28 (-50.88%)
Mutual labels:  aws, cloud
Aws Xray Ts Decorator
Instrument your Typescript code with AWS X-Ray using elegant decorators
Stars: ✭ 17 (-70.18%)
Mutual labels:  aws, cloud
Cloudcomparer
Compare the various managed cloud services offered by the major public cloud providers in the market.
Stars: ✭ 678 (+1089.47%)
Mutual labels:  aws, cloud
Docker Swarm
🐳🐳🐳 This repository is part of a blog series on Docker Swarm example using VirtualBox, OVH Openstack, Azure and Amazon Web Services AWS
Stars: ✭ 43 (-24.56%)
Mutual labels:  aws, cloud
Aws Shell
An integrated shell for working with the AWS CLI.
Stars: ✭ 6,359 (+11056.14%)
Mutual labels:  aws, cloud
Touchdown
Cloud service orchestration framework for python
Stars: ✭ 10 (-82.46%)
Mutual labels:  aws, cloud
Abixen Platform
Abixen Platform
Stars: ✭ 530 (+829.82%)
Mutual labels:  aws, cloud
Chalice
Python Serverless Microframework for AWS
Stars: ✭ 8,513 (+14835.09%)
Mutual labels:  aws, cloud
Go Cloud
The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.
Stars: ✭ 8,124 (+14152.63%)
Mutual labels:  aws, cloud
Aiobotocore
asyncio support for botocore library using aiohttp
Stars: ✭ 630 (+1005.26%)
Mutual labels:  aws, cloud
Infra Personal
Terraform for setting up my personal infrastructure
Stars: ✭ 45 (-21.05%)
Mutual labels:  aws, cloud
Dev Setup
macOS development environment setup: Easy-to-understand instructions with automated setup scripts for developer tools like Vim, Sublime Text, Bash, iTerm, Python data analysis, Spark, Hadoop MapReduce, AWS, Heroku, JavaScript web development, Android development, common data stores, and dev-based OS X defaults.
Stars: ✭ 5,590 (+9707.02%)
Mutual labels:  aws, cloud
Boto3
AWS SDK for Python
Stars: ✭ 6,894 (+11994.74%)
Mutual labels:  aws, cloud
Finala
Finala is an open-source resource cloud scanner that analyzes, discloses, presents and notifies about wasteful and unused resources.
Stars: ✭ 605 (+961.4%)
Mutual labels:  aws, cloud
Nixops
NixOps is a tool for deploying to NixOS machines in a network or cloud.
Stars: ✭ 838 (+1370.18%)
Mutual labels:  aws, cloud
Awless
A Mighty CLI for AWS
Stars: ✭ 4,821 (+8357.89%)
Mutual labels:  aws, cloud
Skyark
SkyArk helps to discover, assess and secure the most privileged entities in Azure and AWS
Stars: ✭ 526 (+822.81%)
Mutual labels:  aws, cloud
Nagios Plugins
450+ AWS, Hadoop, Cloud, Kafka, Docker, Elasticsearch, RabbitMQ, Redis, HBase, Solr, Cassandra, ZooKeeper, HDFS, Yarn, Hive, Presto, Drill, Impala, Consul, Spark, Jenkins, Travis CI, Git, MySQL, Linux, DNS, Whois, SSL Certs, Yum Security Updates, Kubernetes, Cloudera etc...
Stars: ✭ 1,000 (+1654.39%)
Mutual labels:  aws, cloud
Pacbot
PacBot (Policy as Code Bot)
Stars: ✭ 1,017 (+1684.21%)
Mutual labels:  aws, cloud

aws-foundations-cis-baseline

InSpec profile to validate your VPC to the standards of the CIS Amazon Web Services Foundations Benchmark v1.2.0 - 05-23-2018

Description

This InSpec compliance profile implement the CIS AWS Foundations Benchmark in an automated way to provide security best-practice tests in an AWS environment.

InSpec is an open-source run-time framework and rule language used to specify compliance, security, and policy requirements for testing any node in your infrastructure.

Versioning and State of Development

This project uses the Semantic Versioning Policy.

Branches

The master branch contains the latest version of the software leading up to a new release.

Other branches contain feature-specific updates.

Tags

Tags indicate official releases of the project.

Please note 0.x releases are works in progress (WIP) and may change at any time.

Requirements

Tested Platforms

This profile is being developed and tested along side a hardening recipe implemented in Terraform. The cis-aws-foundations-hardening will help you configure and deploy your AWS environment to meet the requirements of the security baseline.

Get started

Installing InSpec

If needed - install inspec on your 'runner' system - i.e. your orchestration server, your workstation, your bastion host or your instance you wish to evlauate.

a. InSpec has prepackaged installers for all platforms here: https://www.inspec.io/downloads, or

b. If you already have a ruby environment (2.4.x) installed on your 'runner' system - you can just do a simple gem install inspec, or

c. You can use the AWS SSM suite to run InSpec on your AWS assets - see the InSpec + SSM documation here: https://aws.amazon.com/blogs/mt/using-aws-systems-manager-to-run-compliance-scans-using-inspec-by-chef/

Get the CIS AWS Foundations Baseline

You will need to download the InSpec Profile to your runner system. You can do this via git or the GitHub Web interface, etc.

a. git clone https://github.com/mitre/aws-foundations-cis-baseline, or

b. Save a Zip or tar.gz copy of the master branch from the Clone or Download button of this project

Minimum Permissions needed to Run this Profile

The IAM account used to run this profile against the AWS environment needs to attached through a group or role with at least AWS IAM "ReadOnlyAccess" Managed Policy

Getting MFA Aware AWS Access, Secret and Session Tokens

You will need to ensure your AWS CLI environment has the right system environment variables set with your AWS region and credentials and session token to use the AWS CLI and InSpec resources in the AWS environment. InSpec supports the following standard AWS variables:

  • AWS_REGION
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_SESSION_TOKEN (optional) - required if MFA is enabled

Notes on MFA

In any AWS MFA enabled environment - you need to use derived credentials to use the CLI. Your default AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY will not satisfy the MFA Policies in AWS environments.

To generate credentials using an AWS Profile you will need to use the following AWS CLI commands.

a. aws sts get-session-token --serial-number arn:aws:iam::<$YOUR-MFA-SERIAL> --token-code <$YOUR-CURRENT-MFA-TOKEN> --profile=<$YOUR-AWS-PROFILE>

b. Then export the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN that was generated by the above command.

Building your inputs.yml file

We use a yml inputs file to steer the configuration, the following options are available: The following inputs must be set to accepted/documented values which is then verified by the applicable controls.

These inputs are generated if the profile is used with the Terraform hardening receipe (https://github.com/mitre/cis-aws-foundations-hardening) with kitchen-terraform.

  • Primary aws region (2.5),
    default_aws_region: 'us-east-1'

  • Maximum aws key age (1.4),
    aws_key_age: 90

  • Password length (1.9),
    pwd_length: 14

  • Maximum IAM account age (1.11),
    aws_cred_age: 90

  • List of documented service accounts which are exempt from the MFA requirement' (1.2),
    service_account_mfa_exceptions:
    - user1
    - user2
    - ...

  • Config service list and settings in all relevant regions (2.5),

config_delivery_channels:
    us-east-1:
      s3_bucket_name: "s3_bucket_name_value"
      sns_topic_arn: "sns_topic_arn_value"
    us-east-2:
      s3_bucket_name:  "s3_bucket_name_value"
      sns_topic_arn: "sns_topic_arn_value"
    us-west-1:
      s3_bucket_name:  "s3_bucket_name_value"
      sns_topic_arn: "sns_topic_arn_value"
    us-west-2:
      s3_bucket_name:  "s3_bucket_name_value"
      sns_topic_arn: "sns_topic_arn_value"

Generate Inputs

The repo includes a script : generate_inputs.rb to generate part of the inputs required for the profile. The script will inspect aws regions: us-east-1, us-east-2, us-west-1, us-west-2 to generate the following input to STDOUT.

- config_delivery_channels

The generated inputs must be reviewed carefully. Only valid channels should be placed in the inputs.yml file.

Usage:

  ruby generate_inputs.rb

Additional optional inputs the user may add to their inputs file:

# description: 'list of buckets exempted from inspection' (2.3, 2.6),
exception_bucket_list: ["exception_bucket_name"]

# description: 'list of security groups exempted from inspection' (4.1, 4.2),
exception_security_group_list: ["exception_security_group_name"]

Usage

InSpec makes it easy to run your tests wherever you need. More options listed here: InSpec cli

# Clone Inspec Profile
$ git clone https://github.com/mitre/aws-foundations-cis-baseline

# Set required ENV variables
$ export AWS_ACCESS_KEY_ID=key-id
$ export AWS_SECRET_ACCESS_KEY=access-key
$ export AWS_SESSION_TOKEN=session_token
$ export AWS_REGION=us-west-1

# Run the `generate_inputs.rb` 
$ ruby generate_inputs.rb
# The generated inputs __must be reviewed carefully__. 
# Only __valid__ channels should be placed in the inputs.yml file.

# To run profile locally and directly from Github
$ inspec exec /path/to/profile -t aws:// --input-file=inputs.yml

# To run profile locally and directly from Github with cli & json output 
$ inspec exec /path/to/profile -t aws:// --input-file=inputs.yml --reporter cli json:aws-results.json

# To run profile locally and directly from Github with cli & json output, in a specific region with a specific AWS profile
$ inspec exec /path/to/profile -t aws://us-east-1/<mycreds-profile> --input-file=inputs.yml --reporter cli json:aws-results.json

Run individual controls

In order to verify individual controls, just provide the control ids to InSpec:

$ inspec exec /path/to/profile --input-file=inputs.yml --controls 1.10

Contributors + Kudos

License and Author

Authors

NOTICE

© 2018 The MITRE Corporation.

Approved for Public Release; Distribution Unlimited. Case Number 18-3678.

NOTICE

MITRE hereby grants express written permission to use, reproduce, distribute, modify, and otherwise leverage this software to the extent permitted by the licensed terms provided in the LICENSE.md file included with this project.

NOTICE

This software was produced for the U. S. Government under Contract Number HHSM-500-2012-00008I, and is subject to Federal Acquisition Regulation Clause 52.227-14, Rights in Data-General.

No other use other than that granted to the U. S. Government, or to those acting on behalf of the U. S. Government under that Clause is authorized without the express written permission of The MITRE Corporation.

For further information, please contact The MITRE Corporation, Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539, (703) 983-6000.

NOTICE

CIS Benchmarks are published by the Center for Internet Security (CIS), see: https://www.cisecurity.org/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].