GithubHelp home page GithubHelp logo

anthrax3 / csf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from armourbird/csf

0.0 1.0 0.0 98 KB

ArmourBird CSF - Container Security Framework

Home Page: https://twitter.com/ArmourBird

License: GNU General Public License v3.0

Dockerfile 0.59% Shell 76.58% Python 12.77% CSS 0.94% HTML 9.12%

csf's Introduction

ArmourBird CSF - Container Security Framework Follow ArmourBird on Twitter

Table of Contents

  1. About
  2. Architecture Diagram
  3. APIs-CSF Server
  4. Installation/Usage
  5. Building Docker Images
  6. Sneak Peak
  7. To Do
  8. Website
  9. Twitter
  10. References

About

ArmourBird CSF - Container Security Framework is an extensible, modular, API-first framework build for regular security monitoring of docker installations and containers against CIS and other custom security checks.

ArmourBird CSF has a client-server architecture and is thus divided into two components:

a) CSF Client

  • This component is responsible for monitoring the docker installations, containers, and images on target machines
  • In the initial release, it will be checking against Docker CIS benchmark
  • The checks in the CSF client will be configurable and thus will be expanded in future releases and updates
  • It has been build on top of Docker bench for security

b) CSF Server

  • This will be the receiver agent for the security logs generated by the various distributed CSF clients (installed on multiple physical/virtual machines)
  • This will also have a UI sub-component for unified management and dashboard-ing of the various vulnerabilities/issues logged by the CSF Clients
  • This server will also expose APIs that can be used for integrating with other systems

Important Note: The tool is currently in beta mode. Hence the debug flag of django (CSF Server) is enabled and the SQLite is used as DB in the same docker container. Hence, spinning up a new docker container will reset the database.

Architecture Diagram

 ArmourBird CSF Architecture Diagram

APIs CSF Server

Issue APIs

POST /issues

  • For reporting issues from CSF clients

GET /issues/{issueId}

  • For listing specific issue with {id}

GET /issues

  • For listing all issues reported by all CSF clients

PUT /issues/{issueId}

  • For updating a specific issue (like for severity, comments, etc.)

DELETE /issues/{issueId}

  • For deleting specific issue

Client APIs

POST /clients

  • For adding a CSF client

GET /clients/{clientId}

  • For listing specific CSF client

GET /clients/

  • For listing all the CSF clients

PUT /clients/{clientId}

  • For updating the CSF client (for e.g. IP addr, etc.)

DELETE /clients/{clientId}

  • For deleting a CSF client from the network

Client Group APIs

POST /clientGroup

  • Adding client to a specific group (for e.g. product1, HRNetwork, product2, etc.)

GET /clientGroup/{groupID}

  • For listing client group details

GET /clientGroup/

  • For listing all client groups

PUT /clientGroup/{groupID}

  • For updating client group

DELETE /clientGroup/{groupId}

  • For deleting client group

Installation/Usage

CSF client run as a docker container on the compute instances running docker installation. It can be executed using the following command using the docker image hosted on hub.docker.com:

docker run -it --net host --pid host --userns host --cap-add audit_control \
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \
-e CSF_CDN='<TO-UPDATE>' \
-v /etc:/etc \
-v /usr/bin/docker-containerd:/usr/bin/docker-containerd \
-v /usr/bin/docker-runc:/usr/bin/docker-runc \
-v /usr/lib/systemd:/usr/lib/systemd \
-v /var/lib:/var/lib \
-v /var/run/docker.sock:/var/run/docker.sock \
--label csf_client \
-d armourbird/csf_client

Make sure to update CSF_CDN environment variable in the above command with the CSF server URL. Once the container is executed, it will start sending issue logs to the CSF server on constant intervals.

CSF server can run as a docker container or natively on a web server on which various CSF clients will be sending data. You can run it on your server using the following command using the docker image hosted on hub.docker.com

docker run -p 80:8000 -d armourbird/csf_server

Browse the CSF server via the following links

  • Dashboard: http://< your-domain >/dashboard/
  • APIs: http://< your-domain >/api/

Building Docker Images

Building docker image for CSF Client

git clone [email protected]:armourbird/csf.git
cd csf_client
docker build . -t csf_client

Building docker image for CSF Server

git clone [email protected]:armourbird/csf.git
cd csf_server
docker build . -t csf_server

Sneak Peak

Dashboard

API View

To Do

  • Integrate non-development web server and database
  • Add API key support to CSF Server
  • Add further checks in CSF Client
  • Add create/update/delete functionality for Client Groups
  • Add update/delete functionality for Clients
  • Improve dashboard UI

Website

https://www.armourbird.com/

Twitter

http://twitter.com/ArmourBird

References

https://www.cisecurity.org/cis-benchmarks https://github.com/docker/docker-bench-security

csf's People

Contributors

dependabot[bot] avatar r3ver53r avatar

Watchers

 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.