Skip to content

An AWS Lambda Port Scanner and SSL expiry checker

Notifications You must be signed in to change notification settings

Srendi/AWS-SCAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Notice

This script is obsolete. See Better AWS Scanner

Description

This is a script (and libraries python-nmap, slacker) to portscan the AWS assets and send the results to slack. It is intended to be run from AWS Lambda, but can be run from any python environment with the libraries installed. As such, it is neccessary to package the code and libraries for deploy to AWS Lambda.

Please note you will need to update the SLACK API KEY in NmapLAmbdaPortScan.py (Line 10)

Prepare a dev environment

If you choose to develop this script further you should prepare a python virtualenv. e.g.

#Get the source
cd /path/to/parentdir_of_repo
#get source
git clone https://github.com/Srendi/AWS-SCAN.git
#Prepare a virtual env for dev
pip install virtualenv
virtualenv ./AWS-SCAN
cd ./AWS-SCAN

#Activate the environment
# Linux
source /path/to/AWS-SCAN/bin/activate
#Windows CMD
C:\path\to\AWS-SCAN\Scripts\activate.bat
#Windows PowerShell
C:\path\to\AWS-SCAN\Scripts\activate.ps1
# Install requirements
pip install -r requirements.txt

Run the script locally with python ./nmapLambdaPortScan.py host2scan1 [host2scan2]...

You can leave the virtual environment with the command deactivate Dont check in to git any of the files created in the virtualenv. The only things that should be checked into git are the existing files (or relevant additions), and a complete Lambda package, ready to be uploaded to AWS Lambda.

Create an AWS Lambda Deployment

The short version Add the .py code to a zip file, then add the virtualenv/Libs/Sitepackages/* to the same zip . Directory contents, not directories See: Creating a Deployment Package (Python)

About

An AWS Lambda Port Scanner and SSL expiry checker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages