pa-wills / perimeter-scanner

1 stars 0 forks source link

perimeter-scanner

A schedulable OSINT scanner using recon-ng which allows for the analysis of an attack surface over time.

Background

This project comes from a desire to learn how to build applications on AWS, and a practical need to understand the attack surface of an organisation as a function of time. This initial, very basic release does domain enumeration periodically with effectively indefinite persistence of results. This will hopefully serves as a helpful baseline for dcata analysis.

Overall Architecture and CICD

AWS helpfully explains how we should segment large Organisations into multiple Accounts, and I have used a similar architecture for this project. Specifically:

The pipeline itself comprises a source stage in Github, a build step followed by a deployment to a non-production (I refer to it herein as devtest) environment, and finally: deployment to production.

The App

Fundamentally: recon-ng with a custom workflow run from the shell of a EC2 Instance created for the task. I could not figure out how to make recon-ng serverless, and so I've done what I hope is the next best thing:

Instructions

  1. Deploy the crossAccountRoles stack to the Accounts you intend to use for production and devtest.
  2. Deploy the pipeline stack to the Account you intend to use for CICD.
  3. The CodePipeline object will run automatically once the pipeline stack reaches CREATE_COMPLETE. This will result in a built application.

Assumptions / Parameters

OK, so despite my best efforts the application is not perfectly self-contained. I.e. there are some items that need to be set up prior to deploying the pipeline stack.