Giter VIP home page Giter VIP logo

aws-pen-test-form's Introduction

AWS Pen Test Form

This project is a tool to help automate filling in the AWS penetration testing form.

Before commencing penetration testing on assets in AWS, the form must be completed to request permission from Amazon. In the modern world of autoscaled instances the form appears, at first glance, to be fairly unhelpful. In these cases Amazon recommend listing all current instances as normal, btu adding a section in the comments that describes each autoscaling group and the instances current;y running therein. This helps them to apply the permission to the AS groups rather than to specific instances.

Filling in the form properly is tedious, especially when you need to exclude instance types that are not allowed to be pen tested. This tool uses the AWS SDK to generate that information for you.

Usage

In the releases section of this repo is a jar that can be executed directly.

java -jar pen-test-form.jar <AWS profile> [<aws region name>]

e.g.

java -jar pen-test-form.jar my-profile eu-west-1

The project uses the AWS credentials file so you should provide a profile to choose which account to use (just as you would when using the AWS CLI tool). More info is available in the AWS CLI documentation. Note that the credentials attached to this profile will need at least the following permissions:

  • autoscaling:DescribeAutoScalingGroups
  • ec2:DescribeInstances

The second argument is the AWS region to use when checking for AS groups and instances. This defaults to eu-west-1 for our (The Guardian's) convenience.

Output

The tool will output the details as text that you can copy into the pen test form. It will look a little like the following:

Instance IDs:
i-21fedcba
i-abcdef12

Instance IPs:
1.1.1.1
1.1.1.2

Comments:
Here are full details of the AS groups and current instances. The actual instances will change during routine scaling and deployments.

my-AutoscalingGroup-123456789
1.1.1.1	i-21fedcba (t2.medium)
1.1.1.2	i-abcdef12 (t2.medium)

These are the three form fields that are tedious to fill in. You'll still need to get the details for the other fields.

Invalid instances

AWS does not allow penetration testing to be performed on t1.small, t1.medium or t2.nano instance types. If you attempt to submit a request when these instance types are in use you'll be presented with a warning. This will describe which AutoScaling Groups are affected and which instances caused the problem. The affected instances will nto be included in the request and any AutoScaling Groups that have no valid instances will also be skipped.

Development / alternate usage

You can also check out the project and run it directly using sbt. Open a command line from within the project and execute the following:

./sbt "run <AWS profile> [<aws region name>]"

This will fetch all the dependencies, compile the project and execute it the same way as running the jar directly would.

Building

You can build your own jar by running the assembly command.

./sbt assembly

This will run the tests and then create a "fat jar" containing all the project's dependencies. You'll see the location the jar gets saved to near the bottom of that command's output.

[info] Packaging <path to jar>/pen-test-form.jar ...
[info] Done packaging.

aws-pen-test-form's People

Contributors

adamnfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.