/Eris

Python package to build and deploy AWS Offensive Infrastructure

Primary LanguagePythonMIT LicenseMIT

Eris Avatar

Eris

Status GitHub Issues


Automating resilient, reusable, and disposable offensive infrastructure utilizing packer and ansible to create Offensive AMIs that can be deployed to AWS EC2.

Table of Contents

About

Eris is a tool designed for creating Offensive Amazon Machine Images (AMIs) by utilizing packer, amazon-ebs, and ansible to create a offensive AMIs. Eris launches EC2 instance from a source AMI, provisioning the running machine, and then creates an AMI from that machine.

The builder will create temporary keypairs, security group rules, etc. that provide it temporary access to the instance while the image is being created. This simplifies configuration quite a bit.

Note: The builder does not manage AMIs. Once it creates an AMI and stores it in your account, it is up to you to use, delete, etc. the AMI. (Ex: Terraform)

Getting Started

These instructions will get you a copy of the project up and running for development and testing purposes.

Prerequisites

Setup

Instructions on how to get Eris configured locally.

Clone the repository

#Download Repo and Navigate to Directory
git clone https://github.com/hackedbyagirl/Eris.git
cd Eris

Before building the image, it is important that you have the correct environmental variables set. Setup required Environmental Variables

Linux or MacOS

# Packer Variables
export PKR_VAR_aws_access_key=<YOUR_ACCESSKEY>
export PKR_VAR_aws_secret_key=<YOUR_SECRETKEY>

# AWS CLI Integration
export AWS_ACCESS_KEY_ID=<YOUR_ACCESSKEY>
export AWS_SECRET_ACCESS_KEY=<YOUR_SECRETKEY>
export AWS_DEFAULT_REGION=<region>

Windows

# AWS CLI Integration
setx AWS_ACCESS_KEY_ID <AKIAIOSFODNN7EXAMPLE>
setx AWS_SECRET_ACCESS_KEY <wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY>
setx AWS_DEFAULT_REGION us-west-1

# Packer Variable
setx PKR_VAR_aws_access_key YOURKEY
setx PKR_VAR_aws_secret_key YOURKEY

Usage

sudo poetry install
sudo poetry run python3 eris.py

Sit back, relax, and enjoy because this can take awhile :-)

Important: Note down the AMI-ID as this will be used for provisioning and deployment using terraform

Bug: You may get an error the first time you run this and it says you need to accept terms and conditions. Navigate to the link it provides. I am still Trying to figure this out on the backend

Acknowledgements

Inspiration