Giter Club home page Giter Club logo

cac-tracking's Introduction

SUSE-CoC-Tracking

Tools for validating Hardening of SUSE cloud images.

Overview

The provided tools will validate that a newly instantiated image matches the results of the selected security profile for that image and that after applying remediation for that profile, the resulting system state matches the expected post remediation state. Only the Center for Internet Security (CIS) Level 1 is supported at this time.

The tool first runs the oscap tool with the CIS Level 1 profile and records the result in the ./results directory.

The tool then performs two remediation runs using the CIS Level 1 profile. Two runs are required, because some items that are corrected in the first run enable additional items to be corrected in the second run.

The tool then performs a final check using the CIS Level 1 profile and stores the result in the ./results directory.

The tool then compares the test results against the provided baselines and reports an error if there are any differences.

Requirements

Cloud VM instance on a Public Cloud Service Provider (currently only tested with Microsoft Azure) created from a hardened SUSE image (has only been tested with suse:sles-sap-15-sp4-hardened:gen2:2023.08.28).

Image must be set up for passwordless ssh access.

Steps to Perform Test

step 1: clone repository on a system that can ssh to VM to be tested.

$ git clone https://github.com/brett060102/SUSE-CoC-Tracking.git

step 2: cd to repository

$ cd SUSE-CoC-Tracking

step 3: invoke bin/test-system with image URN and user@ip to remote system

i.e. $ ./bin/test-system suse:sles-sap-15-sp4-hardened:gen2:2023.08.28 [email protected]

The list of available baselines are in ./baseline currently just suse:sles-sap-15-sp4-hardened:gen2:2023.08.28 Image URNs are specific to Microsoft Azure and can be found using "PINT - The Public Cloud Information Tracker" at https://pint.suse.com/?resource=images&csp=microsoft

Running Checks Locally on Test system

The hardening checks can be run on the system to be tested directly, First the software must be present on the test system.This can be done by using "git archive" to copy the software to the system to be tested.

Install git if needed
$ sudo zypper refresh
$ sudo zypper install git-core

Clone and copy to remote system
$ git clone https://github.com/brett060102/SUSE-CoC-Tracking.git
$ cd SUSE-CoC-Tracking
$ git archive --format=tar main | ssh azureuser@IP_ADDRESS "(mkdir -p ./SUSE-CoC-Tracking; cd ./SUSE-CoC-Tracking; tar -xvf-)"

Then ssh to remote system and run test
$ ssh azureuser@IP_ADDRESS
$ cd SUSE-CoC-Tracking
$ ./bin/test-system suse:sles-sap-15-sp4-hardened:gen2:2023.08.28

Or the git repository may be directly "cloned" to the remote system to be tested. This does require having git installed on the remote system. Installing git on the remote system, does not change the results of the initial system status check.

On system to be tested:

Install git if needed
$ sudo zypper refresh
$ sudo zypper install git-core

Clone repository
$ git clone https://github.com/brett060102/SUSE-CoC-Tracking.git

Run test
$ cd ./SUSE-CoC-Tracking
$ ./bin/test-system suse:sles-sap-15-sp4-hardened:gen2:2023.08.28

Checking Results Manually

The results of a run may also be checked manually.

$ cd ./SUSE-CoC-Tracking Run compare tool:
$ bin/compare-results suse:sles-sap-15-sp4-hardened:gen2:2023.08.28

There should be no differences reported.

cac-tracking's People

Contributors

brett060102 avatar

Watchers

Robert Schweikert 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.