Coder Social home page Coder Social logo

bishopfox / smogcloud Goto Github PK

View Code? Open in Web Editor NEW
326.0 27.0 38.0 26 KB

Find cloud assets that no one wants exposed ๐Ÿ”Ž โ˜๏ธ

Go 100.00%
security-tools amazonaws cloud-security api-documentation aws attack-surface penetration-testing cloud infosec blueteam

smogcloud's Introduction

โ˜๏ธ Smogcloud

Find exposed AWS cloud assets that you did not know you had. A comprehensive asset inventory is step one to any capable security program. We made smogcloud to enable security engineers, penetration testers, and AWS administrators to monitor the collective changes that create dynamic and ephemeral internet-facing assets on a more frequent basis. May be useful to identify:

  • Internet-facing FQDNs and IPs across one or hundreds of AWS accounts
  • Misconfigurations or vulnerabilities
  • Assets that are no longer in use
  • Services not currently monitored
  • Shadow IT

๐Ÿ›  Getting Started

  1. Install and setup golang

  2. Install smogcloud using the following command

        go get -u github.com/BishopFox/smogcloud
    
  3. Set up aws environment variable for the account you wish to query. We suggest utilizing a read-only Security Auditor role. The following commands can be used to set environment variables:

    export AWS_ACCOUNT_ID=''            # Describe account
    export AWS_ACCESS_KEY_ID=''         # Access key for aws account
    export AWS_SECRET_ACCESS_KEY=''     # Secret key for aws account
    
  4. Run the application

    smogcloud
    

    or

    go run main.go
    

๐Ÿ•ต๏ธ Current Services

Supported services for extracting internet exposures:

* API Gateway
* CloudFront
* EC2
* Elastic Kubernetes Service
* Elastic Beanstalk
* Elastic Search
* Elastic Load Balancing 
* IoT
* Lightsail
* MediaStore
* Relational Database Service
* Redshift
* Route53
* S3

๐Ÿ”Ž AWS Patterns

From studying Open API documentation on RESTful AWS endpoints we determined these are the patterns of exposure URIs that you may find in AWS accounts. It is important to understand how to interact with these native services to test them for vulnerabilities and other misconfigurations. Security engineers may want to monitor Cloudtrail logs or build DNS monitoring for requests to these services.

  • s3
    • https://{user_provided}.s3.amazonaws.com
  • cloudfront
    • https://{random_id}.cloudfront.net
  • ec2
    • ec2-{ip-seperated}.compute-1.amazonaws.com
  • es
    • https://{user_provided}-{random_id}.{region}.es.amazonaws.com
  • elb
    • http://{user_provided}-{random_id}.{region}.elb.amazonaws.com:80
    • https://{user_provided}-{random_id}.{region}.elb.amazonaws.com:443
  • elbv2
    • https://{user_provided}-{random_id}.{region}.elb.amazonaws.com
  • rds
    • mysql://{user_provided}.{random_id}.{region}.rds.amazonaws.com:3306
    • postgres://{user_provided}.{random_id}.{region}.rds.amazonaws.com:5432
  • route53
    • {user_provided}
  • execute-api
    • https://{random_id}.execute-api.{region}.amazonaws.com/{user_provided}
  • cloudsearch
  • transfer
    • sftp://s-{random_id}.server.transfer.{region}.amazonaws.com
  • iot
    • mqtt://{random_id}.iot.{region}.amazonaws.com:8883
    • https://{random_id}.iot.{region}.amazonaws.com:8443
    • https://{random_id}.iot.{region}.amazonaws.com:443
  • mq
  • kafka
    • b-{1,2,3,4}.{user_provided}.{random_id}.c{1,2}.kafka.{region}.amazonaws.com
    • {user_provided}.{random_id}.c{1,2}.kafka.{region}.amazonaws.com
  • cloud9
    • https://{random_id}.vfs.cloud9.{region}.amazonaws.com
  • mediastore
    • https://{random_id}.data.mediastore.{region}.amazonaws.com.
  • kinesisvideo
    • https://{random_id}.kinesisvideo.{region}.amazonaws.com
  • mediaconvert
    • https://{random_id}.mediaconvert.{region}.amazonaws.com
  • mediapackage
    • https://{random_id}.mediapackage.{region}.amazonaws.com/in/v1/{random_id}/channel
  • elasticbeanstalk
    • https://{random_id}.{user_provided}.elasticbeanstalk.com
  • cognito
    • https://{user_provided}.auth.{region}.amazoncognito.com

๐Ÿ“Œ References

๐Ÿ‘จโ€๐Ÿ’ป Authors

โœจ Contributions

We do our best to maintain our tools, but can't always keep them as up to date as we'd like. So, we always appreciate code contributions, feature requests, and bug reports.

๐Ÿ“ฃ Acknowledgments

Thank you for inspiration

๐Ÿ“„ License

Smogcloud is licensed under GPLv3, some subcomponents have seperate licenses.

smogcloud's People

Contributors

basicscandal avatar

Stargazers

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

smogcloud's Issues

Nill pointer exception

Description of Bug

Nil pointer exception occurs when the API is not available.

Steps to Reproduce

Run the tool and a nil pointer exception occurs when the API is not available.

Additional context

MacOS

Relevant screenshots

...omitted for brevity...
}UnauthorizedException: API is not available in eu-west-3
AccessDeniedException:
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "9fc00462-5b47-4418-b975-911898757a0a"
  }
}
AccessDeniedException:
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "94d14317-895d-4666-b9b1-950a365eb358"
  }
}
UnauthorizedException: API is not available in eu-north-1
{

}panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1450128]

goroutine 20 [running]:
github.com/BishopFox/smogcloud/service.GetRoute53(0xc00011e000, 0x1573312, 0x6, 0xc0000a9020)
        /Users/sh1n0b1/go/src/github.com/BishopFox/smogcloud/service/route53.go:48 +0x628
created by main.main
        /Users/sh1n0b1/go/src/github.com/BishopFox/smogcloud/main.go:19 +0x1de

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.