From c8a5c81dd4e71aefeb8d55d61096c2741bce7cf5 Mon Sep 17 00:00:00 2001 From: Thorsten Sick Date: Tue, 8 Feb 2022 17:30:39 +0100 Subject: [PATCH] Adding structure doc --- doc/source/conf.py | 8 +++++ doc/source/extending/structure.rst | 56 ++++++++++++++++++++++++++++++ doc/source/index.rst | 2 ++ 3 files changed, 66 insertions(+) create mode 100644 doc/source/extending/structure.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index cafb273..58dc9fa 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -45,6 +45,14 @@ extensions += ['sphinx_pyreverse'] extensions += ['sphinxcontrib.autoyaml'] autoyaml_level = 5 +## Graphviz +extensions += [ + "sphinx.ext.graphviz" +] + +# -- GraphViz configuration ---------------------------------- +graphviz_output_format = 'svg' + # Pydantic plugin for sphinx. Another way to generate config documentation # extensions += ['sphinx-pydantic'] # This has bugs and is not properly maintained diff --git a/doc/source/extending/structure.rst b/doc/source/extending/structure.rst new file mode 100644 index 0000000..87e7125 --- /dev/null +++ b/doc/source/extending/structure.rst @@ -0,0 +1,56 @@ +********* +Structure +********* + +Structure of an experiment flow. Plugin calls have boxes with extra squares at the left. + +.. graphviz:: + :name: Experiment flow + :caption: Experiment flow + :alt: The way an experiment is conducted + :align: center + + digraph "sphinx-ext-graphviz" { + size="6, 30"; + + graph [fontname="Verdana", fontsize="12"]; + node [fontname="Verdana", fontsize="12"]; + edge [fontname="Sans", fontsize="9"]; + + start_attacker [label="start attacker", shape="box", fillcolor=green, style=filled] + start_targets [label="start targets", shape="box", fillcolor=green, style=filled] + start_caldera [label="start caldera", shape="box", fillcolor=green, style=filled] + prime_vulnerabilities [label="prime vulnerabilities", shape="component", fillcolor=green, style=filled] + prime_sensors [label="prime sensors", shape="component", fillcolor=green, style=filled] + install_vulnerabilities [label="install vulnerabilities", shape="component", fillcolor=green, style=filled] + install_sensors [label="install sensors", shape="component", fillcolor=green, style=filled] + start_caldera_implants [label="start caldera implants", shape="box", fillcolor=green, style=filled] + run_caldera_attacks [label="run caldera attacks", shape="box", fillcolor=red, style=filled] + run_plugin_attacks [label="run plugin attacks", shape="component", fillcolor=red, style=filled] + stop_sensors [label="stop sensors", shape="component", fillcolor=lightblue, style=filled] + collect_sensors [label="collect sensors", shape="component", fillcolor=yellow, style=filled] + stop_vulnerabilities [label="stop vulnerabilities", shape="component", fillcolor=lightblue, style=filled] + stop_targets [label="stop targets", shape="component", fillcolor=lightblue, style=filled] + stop_attacker [label="stop attacker", shape="component", fillcolor=lightblue, style=filled] + generate_documents [label="generate documents", shape="box", fillcolor=yellow, style=filled] + collect_loot [label="collect loot", shape="box", fillcolor=yellow, style=filled] + + + start_attacker -> start_targets + start_targets -> start_caldera + start_caldera->prime_vulnerabilities + prime_vulnerabilities->prime_sensors + prime_sensors->install_vulnerabilities + install_vulnerabilities->install_sensors + install_sensors->start_caldera_implants + start_caldera_implants->run_caldera_attacks + run_caldera_attacks->run_plugin_attacks + run_plugin_attacks->stop_sensors + stop_sensors->collect_sensors + collect_sensors->stop_vulnerabilities + stop_vulnerabilities->stop_targets + stop_targets->stop_attacker + stop_attacker->generate_documents + generate_documents->collect_loot + + } \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst index 1905d6c..67e9538 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -23,6 +23,8 @@ Welcome to the Purple Dome documentation basics/windows_targets + extending/structure + extending/vulnerability_plugins extending/sensor_plugins