Coder Social home page Coder Social logo

rhinosecuritylabs / ccat Goto Github PK

View Code? Open in Web Editor NEW
572.0 23.0 100.0 22.16 MB

Cloud Container Attack Tool (CCAT) is a tool for testing security of container environments.

Home Page: https://rhinosecuritylabs.com/aws/cloud-container-attack-tool/

License: BSD 3-Clause "New" or "Revised" License

Python 99.60% Dockerfile 0.40%
cloud docker kubernetes k8s aws amazon google gcp ecr eks

ccat's Introduction

Cloud Container Attack Tool (CCAT โ˜๏ธ๐Ÿˆ)

Rhino PyPI GitHub license PRs Welcome

Cloud Container Attack Tool (CCAT) is a tool for testing security of container environments.

Quick reference

Requirements

  • Python 3.5+ is required.
  • Docker is required. Note: CCAT is tested with Docker Engine 19.03.1 version.
  • Named profile is required for using AWS functionality.
  • A service account or access token is required for using GCP functionality.

Installation

We recommend using the provided Docker image to run CCAT, so that you will not face any difficulty with the required dependencies on your own system.

Install CCAT from source

  $ git clone https://github.com/RhinoSecurityLabs/ccat.git
  $ cd ccat
  $ python3 setup.py install
  $ python3 ccat.py

Use CCAT's Docker Image

Warning: Running this command will mount your local AWS configuration files into the Docker container when it is launched. This means that any user with access to the container will have access to your host computer's AWS credentials.

Warning: Running this command will mount your local Unix socket that Docker daemon listens on by default into the Docker container when it is launched. This means that users with access to the container will have access to your Docker daemon, meaning they could escape to your host computer with ease.

  $ docker run -it -v ~/.aws:/root/.aws/ -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/app/ rhinosecuritylabs/ccat:latest

Getting Started

Example Usage

Below is an example scenario to demonstrate the usage of CCAT.

Starting with compromised AWS credentials, the attacker enumerates and explores ECR repositories. Then, the attacker found that they use NGINX Docker image and pulled that Docker image from ECR. Furthermore, the attacker creates a reverse shell backdoor into the target Docker image. Finally, the attacker pushes the backdoored Docker image to ECR.

Exploitation Route:

Roadmap

  • Container Escape Features
  • Amazon ECS Attack Features
  • Amazon EKS Attack Features
  • Azure Container Related Attack Features
  • GCP Container Related Attack Features
  • OpenShift Container Related Attack Features
  • IBM Cloud Container Related Attack Features
  • Alibaba Cloud Container Related Attack Features

Disclaimer

  • CCAT is tool that comes with absolutely no warranties whatsoever. By using CCAT, you take full responsibility for any and all outcomes that result.

ccat's People

Contributors

jack-ganbold avatar spengietz 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

ccat's Issues

Crash when clicking the menu with the mouse

In Ubuntu and Kali desktop environments, CCAT crashes when the menu is clicked. Haven't tested elsewhere though

Example after left clicking on the main menu in CCAT:
image

Already discussed internally, just creating an issue so it doesn't get lost

Repository enumeration

Hi, cool to see there's a tool for this now :)!

Just wondering on the repository enumeration: ECS containers would have the ecsInstanceRole attached to them if I'm not mistaken. Does this role actually allow enumerating image names too?

Previously, I've collected image names through the ECS introspection agent URL (running on port 51678). When querying http://privateip:51678/v1/tasks, you can obtain docker image names from the task list. The IP can be obtained from metadata. The cluster name can also be obtained from /v1/metadata.

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.