
Cloud Security Suite - AWS/GCP/Azure 인프라의 보안 상태를 감사하는 원스톱 도구입니다.
usage: cs.py [-h] -env {aws,gcp,azure,digitalocean} -aip AUDIT_IP -u USER_NAME -pem
PEM_FILE [-p] [-pId PROJECT_ID] [-az_u AZURE_USER]
[-az_p AZURE_PASS] [-o OUTPUT] [-w] [-n NUMBER]
this is to get IP address for lynis audit only
optional arguments:
-h, --help show this help message and exit
-env {aws,gcp,azure,digitalocean}, --environment {aws,gcp,azure,digitalocean}
The cloud on which the test-suite is to be run
-aip AUDIT_IP, --audit_ip AUDIT_IP
The IP for which lynis Audit needs to be done .... by
default tries root/Administrator if username not
provided
-u USER_NAME, --user_name USER_NAME
The username of the user to be logged in,for a
specific user
-pem PEM_FILE, --pem_file PEM_FILE
The pem file to access to AWS instance
-p, --password hidden password prompt
-pId PROJECT_ID, --project_id PROJECT_ID
Project ID for which GCP Audit needs to be run. Can be
retrivied using `gcloud projects list`
-az_u AZURE_USER, --azure_user AZURE_USER
username of azure account, optionally used if you want
to run the azure audit with no user interaction.
-az_p AZURE_PASS, --azure_pass AZURE_PASS
username of azure password, optionally used if you
want to run the azure audit with no user interaction.
-o OUTPUT, --output OUTPUT
writes a log in JSON of an audit, ideal for
consumptions into SIEMS like ELK and Splunk. Defaults
to cs-audit.log
-w, --wipe rm -rf reports/ folder before executing an audit
-n, --number Retain number of report to store for a particular
environment and user/project.
(이미 설치된 Python 라이브러리와의 충돌을 피하기 위해)
git clone https://github.com/SecurityFTW/cs-suite.git && cd cs-suite/pip install virtualenvvirtualenv -p python2.7 venvsource venv/bin/activatepip install -r requirements.txtpython cs.py --helparn:aws:iam::aws:policy/ReadOnlyAccessbrew install awscli (OSX용)aws configurecs-suite/tools/G-Scout/keyfile.json에 배치gcloud initbrew install azaz login, 성공 시 아래와 유사한 응답으로 구독 유형이 표시되어야 함:[
{
"cloudName": "AzureCloud",
"id": "xxxxx-5595-4da5-bc27-xxxeeee",
"isDefault": true,
"name": "Free Trial",
"state": "Enabled",
"tenantId": "xxxxx-18e9-41a4-961b-xxxxx",
"user": {
"name": "[email protected]",
"type": "user"
}
}
]
export DO_KEY=*********************
export DO_ACCESS_KEY=*******************
export DO_SECRET_KEY=****************************
To run AWS Audit - python cs.py -env aws
To run GCP Audit - python cs.py -env gcp -pId <project_name>
To run Azure Audit - python cs.py -env azure
To run DigitalOcean Audit - python cs.py -env digitalocean
최종 보고서는 reports 디렉터리에서 확인할 수 있습니다.
최종 AWS 감사 보고서는 아래와 같습니다:


로컬 디렉터리 aws를 생성하고 그 안에 credentials와 config 파일을 넣으세요
config 파일은 아래와 같습니다:
$ cat aws/config
[default]
output = json
region = us-east-1
credentials 파일은 아래와 같습니다:$ cat aws/credentials
[default]
aws_access_key_id = XXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXX
참고: 이 도구는 arn:aws:iam::aws:policy/ReadOnlyAccess IAM 정책이 필요합니다
docker run -v `pwd`/aws:/root/.aws -v `pwd`/reports:/app/reports securityftw/cs-suite -env aws