From e901e374a8e600f06ee75b8c32674087cb2b75a3 Mon Sep 17 00:00:00 2001 From: Pin Date: Sun, 18 Dec 2022 22:08:58 -0500 Subject: [PATCH] docs and name changes --- README.md | 35 +++++++++++++++++++++++++----- run.sh => kybus | 21 +++++++++++++++++- roles/CVE-2011-2523/tasks/main.yml | 4 ++++ setup.sh => setup | 0 4 files changed, 54 insertions(+), 6 deletions(-) rename run.sh => kybus (84%) rename setup.sh => setup (100%) diff --git a/README.md b/README.md index 9b447aa..8c55ca1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Kybus -Kybus is a repository +Kybus is a repository which aims to provide a vulnerable environment for blue team members to safely experiment with a selected CVE. ## Requirements @@ -21,14 +21,39 @@ All versions mentioned above are only what was used during testing, other versio ## Getting Started -Running `setup.sh` will ensure requisites are installed and download needed VM images. -The Kybus container image will also be generated during this process +Running `setup.sh` will ensure prerequisites are installed, and download needed VM images. +The Kybus container image will also be generated during this process. + +## Initial Run + +When running Kybus for the first time a VM will be created with the name `kybus_kybus`. +Since all setup and tear down is conducted within a temporary container, this will be the only indication left on the system once Kybus is run. + +If you run `docker ps` during the run of Kybus, you will see a `kybus:latest` image running; running `docker ps -a` post run will not show anything since the `--rm` flag is passed when creating the container. ## Writing a Plugin Initial plugin structure can be generated using `ansible-galaxy role init {plugin name}`. Plugin names are suggested to be the relavent CVE record; however, certain plugins exist as helpers and may deviate. -Once the plugin is created +Once the plugin is created everything follows a standard [ansible role](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html) structure. +The only additional information which needs to be added into the structure is a `meta/kybus.yml` configuration file. +This file defines the appropriate image to be used with the role. +The image name should be exactly as it appears once downloaded in the `download` folder. +An example can be seen below: + +```yaml +--- +image: {image name with extension} +... + +``` + +If this is still unclean please reference a role which is already complete. + +## Completed Roles + +Below is a list of completed roles along with there current state of testing: + +- CVE-2011-2523 -## diff --git a/run.sh b/kybus similarity index 84% rename from run.sh rename to kybus index 8a97adb..4840557 100755 --- a/run.sh +++ b/kybus @@ -10,6 +10,25 @@ source ./_libs/libbase.sh # shellcheck disable=SC1091 source ./kybus.conf +function helpKybus { + cat </dev/null @@ -69,7 +88,7 @@ function ArgParse { ;; --help | -h) shift - WarningEcho "Not implemented" + helpKybus exit 0 ;; --list-roles) diff --git a/roles/CVE-2011-2523/tasks/main.yml b/roles/CVE-2011-2523/tasks/main.yml index e418052..4fd8d9f 100644 --- a/roles/CVE-2011-2523/tasks/main.yml +++ b/roles/CVE-2011-2523/tasks/main.yml @@ -1,4 +1,8 @@ --- +- name: Update package cache + apt: + update_cache: yes + - name: Install build deps ansible.builtin.package: name: diff --git a/setup.sh b/setup similarity index 100% rename from setup.sh rename to setup