Code Monkey home page Code Monkey logo

eipfish's Introduction

EIP Fishing

This is an AWS Lambda that runs a small Go binary on a schedule. Each execution of the binary will allocate an Elastic IP (EIP) in the region you specify. It will then check for dangling name server records using a separately hosted RDNS library stored on S3. It also checks for historical records using the Shodan API.

If there are any matches, it retains the EIP for further use, otherwise it releases the allocation back to the pool.

Setup

Make sure you provide your own .env file with following keys:

WEBHOOK_URL="<your own incoming webhook URL for Slack>"
BUCKET_NAME="<name of bucket with rDNS data>"
BUCKET_REGION="<region of bucket with rDNS data>"
SHODAN_API_KEY="<paid subscription to Shodan>"

Install serverless:

npm install serverless -g

Deploy using your own AWS environment:

make deploy

Monitor via slack:

tl;dr

This is a simple lambda that I am using to help discover dangling NS records related to AWS EIPs for bug bounty programs.

Output

START RequestId: 56cf9c1c-551e-19db-3706-5a95a9480d75 Version: $LATEST
Checking 54.186.54.63 from allocation ID eipalloc-0be40fc401b82cfec
{"timestamp":"1609308060","name":"54.186.54.63","value":"ec2-54-186-54-63.us-west-2.compute.amazonaws.com","type":"ptr"}

Released 54.186.54.63 from allocation ID eipalloc-0be40fc401b82cfec
END RequestId: 56cf9c1c-551e-19db-3706-5a95a9480d75
REPORT RequestId: 56cf9c1c-551e-19db-3706-5a95a9480d75  Init Duration: 387.81 ms        Duration: 5264.54 ms    Billed Duration: 5300 ms        Memory Size: 128 MB     Max Memory Used: 35 MB

{"RESULT:":"no matches on 54.186.54.63"}

eipfish's People

Contributors

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