Giter Club home page Giter Club logo

ntc-soteria's Introduction

ntc-soteria

ntc-soteria is an ACL auditing tool based on Batfish. The goal of this tool is to help you automate the process of validating and maintaining your firewall ACLs.

Audits

This tool provides the ability to perform 2 types of audits against an ACL rule base.

  • ACL Differential - This audit takes 3 pieces of information, a single YAML file containing a set of reference flows, the configuration of your firewall, and also the ACL name in question. It then calculates the difference between your reference flows and implemented flows, to provide you with the differences. Some use cases for this include:
    • Prevent human error, during firewall changes. For example incorrect addition of ip any any.
    • Allows you to run routine scripted checks against your ACL base to ensure no ACLs are opened by bad actors.
    • As this can function as a CLI script you can add this to part of your ACL CI pipelines.
  • Unreachable ACL Entries - This check takes a firewall configuration containing your ACL rule sets. It then reports on any lines in the specified filters that will not match any packet, either because of being shadowed by prior lines or because of its match condition being empty. The key use cases for this are:
    • Prevent human error, during firewall changes. For example, incorrect placement of an encompassing deny rule.
    • Assist in keeping your ACL rule sets minimal and free of unnecessary lines.
    • As this can function as a CLI script you can add this to part of your ACL CI pipelines.

Supported Devices

The following platforms have been tested:

  • Cisco ASA
  • IOS-XE

Docker Compose

To create the required environment in order to run this tool, along with deploy the Batfish service dependancy, a docker-compose file is provided.

Before running install Docker and Docker Compose. Once installed run the following commands:

git clone [email protected]:networktocode/ntc-soteria.git

cd ntc-soteria

docker-compose build
docker-compose up -d
docker-compose exec ntc-soteria <command>

Note:

  • As part of docker-compose the ./data folder is created as a volume. This allows you to easily add configs or pull reports.
  • You will only need to run docker-compose build once. Once the containers are built you can just bring your Docker Compose stack up via docker-compose up -d

Usage

Below shows the various options for this tool.

Note: Sample files are provided within the ./data directory for initial testing.

ACL Reference Comparision

The reference comparision option takes the following inputs:

  • device configuration (-d)
  • acl name to validate from within your device configuration (-a)
  • reference flows (-r)

The reference flow file strucutre is shown below:

---
- source_ip: <network>/<cidr>
  dest_ip: <network>/<cidr>
  proto: <protocol>
  action: <permit/deny>
  name: <description of flow>

Example:

./acl_auditor/auditor.py -c compare -d data/asa.cfg -r data/flows.yml -a acl-webfarm 

Unreachable ACL Entries

The unreachable acl entry option takes the following inputs:

  • device configuration (-d)

Example:

./acl_auditor/auditor.py -c unreachable -d data/asa.cfg

HTML Report

An HTML report can be generated with the results. However, this option can only be run when running the -c all (check all) option.

./acl_auditor/auditor.py -c all -d data/asa.cfg -r data/flows.yml -a acl-webfarm -o html

Once complete a HTML report will be saved within ./data. Below shows an example: alt text Note: The HTML report generated uses the following Material/Bootstrap framework: https://fezvrasta.github.io/bootstrap-material-design/.

ntc-soteria's People

Contributors

rickdonato avatar ratulm 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.