Skip to content

Commit

Permalink
pre-release updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Limmen committed Jan 4, 2023
1 parent 2809733 commit f77f0dd
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 92 deletions.
24 changes: 12 additions & 12 deletions docs/_docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ An example command and the resulting output is shown below.
```bash
kim@gpu2 ~> csle ls emulations --all
CSLE emulations:
csle-level9-003 [running]
csle-level1-003 [stopped]
csle-level2-003 [stopped]
csle-level3-003 [stopped]
csle-level4-003 [stopped]
csle-level5-003 [stopped]
csle-level6-003 [stopped]
csle-level7-003 [stopped]
csle-level8-003 [stopped]
csle-level10-003 [stopped]
csle-level11-003 [stopped]
csle-level12-003 [stopped]
csle-level9-010 [running]
csle-level1-010 [stopped]
csle-level2-010 [stopped]
csle-level3-010 [stopped]
csle-level4-010 [stopped]
csle-level5-010 [stopped]
csle-level6-010 [stopped]
csle-level7-010 [stopped]
csle-level8-010 [stopped]
csle-level10-010 [stopped]
csle-level11-010 [stopped]
csle-level12-010 [stopped]
```

<p class="captionFig">
Expand Down
30 changes: 15 additions & 15 deletions docs/_docs/emulation_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,24 @@ Table 2: Properties of an emulation configuration.

Users of CSLE can create new emulation configurations and insert them into the metastore. CSLE also includes a set of
pre-installed configurations
(see Table 3). One of these pre-installed configurations is `csle-level9-003` (as an example), whose topology is shown
(see Table 3). One of these pre-installed configurations is `csle-level9-010` (as an example), whose topology is shown
in Fig. 6 and whose configuration is listed in Table 4.


| *Emulation configuration* | *Description* |
|---------------------------|-------------------------------------------------------------------------------|
| `csle-level1-003` | Emulation with 7 components, 3 flags, password vulnerabilities, no IDS. |
| `csle-level2-003` | Emulation with 13 components, 6 flags, password vulnerabilities, no IDS. |
| `csle-level3-003` | Emulation with 34 components, 6 flags, password vulnerabilities, no IDS. |
| `csle-level4-003` | Emulation with 7 components, 3 flags, password vulnerabilities, IDS. |
| `csle-level5-003` | Emulation with 13 components, 6 flags, password vulnerabilities, IDS. |
| `csle-level6-003` | Emulation with 34 components, 6 flags, password vulnerabilities, IDS. |
| `csle-level7-003` | Emulation with 7 components, 3 flags, password & RCE vulnerabilities, IDS. |
| `csle-level8-003` | Emulation with 13 components, 6 flags, password & RCE vulnerabilities, IDS. |
| `csle-level9-003` | Emulation with 34 components, 6 flags, password & RCE vulnerabilities, IDS. |
| `csle-level10-003` | Emulation with 16 components, 12 flags, password & RCE vulnerabilities, IDS. |
| `csle-level11-003` | Emulation with 36 components, 6 flags, password & RCE vulnerabilities, IDS. |
| `csle-level12-003` | Emulation with 7 components, 3 flags, password RCE vulnerabilities, IDS, SDN. |
| `csle-level1-010` | Emulation with 7 components, 3 flags, password vulnerabilities, no IDS. |
| `csle-level2-010` | Emulation with 13 components, 6 flags, password vulnerabilities, no IDS. |
| `csle-level3-010` | Emulation with 34 components, 6 flags, password vulnerabilities, no IDS. |
| `csle-level4-010` | Emulation with 7 components, 3 flags, password vulnerabilities, IDS. |
| `csle-level5-010` | Emulation with 13 components, 6 flags, password vulnerabilities, IDS. |
| `csle-level6-010` | Emulation with 34 components, 6 flags, password vulnerabilities, IDS. |
| `csle-level7-010` | Emulation with 7 components, 3 flags, password & RCE vulnerabilities, IDS. |
| `csle-level8-010` | Emulation with 13 components, 6 flags, password & RCE vulnerabilities, IDS. |
| `csle-level9-010` | Emulation with 34 components, 6 flags, password & RCE vulnerabilities, IDS. |
| `csle-level10-010` | Emulation with 16 components, 12 flags, password & RCE vulnerabilities, IDS. |
| `csle-level11-010` | Emulation with 36 components, 6 flags, password & RCE vulnerabilities, IDS. |
| `csle-level12-010` | Emulation with 7 components, 3 flags, password RCE vulnerabilities, IDS, SDN. |


<p class="captionFig">
Expand All @@ -78,7 +78,7 @@ Table 3: Pre-installed emulation configurations.
<p align="center">
<img src="./../../img/example_topology.png" width="30%">
<p class="captionFig">
Figure 6: Topology of the emulation configuration `csle-level9-003`
Figure 6: Topology of the emulation configuration `csle-level9-010`
</p>
</p>

Expand All @@ -101,7 +101,7 @@ Figure 6: Topology of the emulation configuration `csle-level9-003`

<p class="captionFig">
Table 4: Configuration of the emulation configuration
`csle-level9-003`, whose topology is shown in Fig. 6.
`csle-level9-010`, whose topology is shown in Fig. 6.
</p>

An *emulation execution* consists of a set of running containers and virtual networks,
Expand Down
4 changes: 2 additions & 2 deletions docs/_docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ permalink: /docs/faq/

**A:** New management users can be added by administrators through the web interface.

**Q: Why does my machine crash when I try to run the emulation environment `csle-level9-003`?**
**Q: Why does my machine crash when I try to run the emulation environment `csle-level9-010`?**

**A:** Most likely because the machine is running out of memory. The emulation environment `csle-level9-003` includes $34$ containers, each of which requires at least 1GB of RAM, meaning that the machine needs at least 34GB of RAM to run this emulation environment.
**A:** Most likely because the machine is running out of memory. The emulation environment `csle-level9-010` includes $34$ containers, each of which requires at least 1GB of RAM, meaning that the machine needs at least 34GB of RAM to run this emulation environment.

**Q: Why does my reinforcement learning algorithm not converge?**

Expand Down
18 changes: 9 additions & 9 deletions docs/_docs/how_to_emulation_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@ permalink: /docs/how-to-emulation-config/
---

## How-to: Add Emulation Configurations
To add a new emulation configuration with the name "`level_13`" and version 0.0.3, perform the following steps:
To add a new emulation configuration with the name "`level_13`" and version 0.1.0, perform the following steps:

1. Create a sub-directory called `level_13` in the folder:
```bash
csle/emulation-system/envs/003/
csle/emulation-system/envs/010/
```
<p class="captionFig">
Listing 126: Directory with emulation configurations with version 0.0.3.
Listing 126: Directory with emulation configurations with version 0.1.0.
</p>
2. Add the emulation configuration file `config.py` to the directory:
```bash
csle/emulation-system/envs/003/level_13/
csle/emulation-system/envs/010/level_13/
```
<p class="captionFig">
Listing 127: Directory with emulation configuration file for the emulation with the name `level_13` and version 0.0.3.
Listing 127: Directory with emulation configuration file for the emulation with the name `level_13` and version 0.1.0.
</p>
3. Update the following README file:
```bash
csle/emulation-system/envs/003/README.md
csle/emulation-system/envs/010/README.md
```
<p class="captionFig">
Listing 128: README file for emulation configurations with version 0.0.3.
Listing 128: README file for emulation configurations with version 0.1.0.
</p>
4. Update the following Makefile with installation instructions:
```bash
csle/emulation-system/envs/003/README.md
csle/emulation-system/envs/010/README.md
```
<p class="captionFig">
Listing 129: Makefile for emulation configurations with version 0.0.3.
Listing 129: Makefile for emulation configurations with version 0.1.0.
</p>
5. Insert the emulation configuration into the metastore by running the command:
```bash
Expand Down
16 changes: 8 additions & 8 deletions docs/_docs/operating_csle.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,25 +127,25 @@ Listing 74: Commands to stop monitoring systems.

### Starting and Stopping Emulation Executions
To start an execution of an emulation configuration
with the name `csle-level9-003`, execute the following command:
with the name `csle-level9-010`, execute the following command:

```bash
csle start csle-level9-003
csle start csle-level9-010
```

<p class="captionFig">
Listing 75: Command to start an execution of the emulation with configuration `csle-level9-003`.
Listing 75: Command to start an execution of the emulation with configuration `csle-level9-010`.
</p>

Similarly, to stop an execution of an emulation configuration
with the name `csle-level9-003`, execute the following command:
with the name `csle-level9-010`, execute the following command:

```bash
csle stop csle-level9-003
csle stop csle-level9-010
```

<p class="captionFig">
Listing 76: Command to stop an execution of the emulation with configuration `csle-level9-003`.
Listing 76: Command to stop an execution of the emulation with configuration `csle-level9-010`.
</p>

The above command will stop all containers but will not remove them,
Expand All @@ -155,11 +155,11 @@ by running the command in Listing 75.
To stop an emulation execution and remove all of its containers and virtual networks, run the command:

```bash
csle clean csle-level9-003
csle clean csle-level9-010
```

<p class="captionFig">
Listing 77: Command to stop and clean an execution of the emulation with configuration `csle-level9-003`.
Listing 77: Command to stop and clean an execution of the emulation with configuration `csle-level9-010`.
</p>

### Access a Terminal in an Emulated Container
Expand Down
6 changes: 3 additions & 3 deletions docs/_docs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Listing 61: Command to list all information about CSLE.

The above command lists information about the CSLE installation,
including the emulation configurations that are installed in the metastore.
Select one emulation configuration to start an execution, e.g. `csle-level9-003`,
Select one emulation configuration to start an execution, e.g. `csle-level9-010`,
and then run the command:

```bash
csle start csle-level9-003
csle start csle-level9-010
```

<p class="captionFig">
Listing 62: Command to start an execution of the emulation configuration csle-level9-003.
Listing 62: Command to start an execution of the emulation configuration csle-level9-010.
</p>

The above command will start all containers of the emulation and apply the configuration.
Expand Down
24 changes: 12 additions & 12 deletions docs/_docs/web_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,18 @@ The endpoints of the REST API are listed in Tables 20-23. An example HTTP reques

```bash
curl https://csle.dev/emulations?ids=true\&token=<my_token>
[{"emulation":"csle-level1-003","id":1,"running":false`,
{"emulation":"csle-level2-003","id":2,"running":false`,
{"emulation":"csle-level3-003","id":3,"running":false`,
{"emulation":"csle-level4-003","id":4,"running":false`,
{"emulation":"csle-level5-003","id":5,"running":false`,
{"emulation":"csle-level6-003","id":6,"running":false`,
{"emulation":"csle-level7-003","id":7,"running":false`,
{"emulation":"csle-level8-003","id":8,"running":false`,
{"emulation":"csle-level9-003","id":9,"running":true`,
{"emulation":"csle-level10-003","id":10,"running":false`,
{"emulation":"csle-level11-003","id":11,"running":false`,
{"emulation":"csle-level12-003","id":12,"running":false`]
[{"emulation":"csle-level1-010","id":1,"running":false`,
{"emulation":"csle-level2-010","id":2,"running":false`,
{"emulation":"csle-level3-010","id":3,"running":false`,
{"emulation":"csle-level4-010","id":4,"running":false`,
{"emulation":"csle-level5-010","id":5,"running":false`,
{"emulation":"csle-level6-010","id":6,"running":false`,
{"emulation":"csle-level7-010","id":7,"running":false`,
{"emulation":"csle-level8-010","id":8,"running":false`,
{"emulation":"csle-level9-010","id":9,"running":true`,
{"emulation":"csle-level10-010","id":10,"running":false`,
{"emulation":"csle-level11-010","id":11,"running":false`,
{"emulation":"csle-level12-010","id":12,"running":false`]
```

<p class="captionFig">
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ <h2 class="display text-left">Installation & Usage</h2>
from csle_common.dao.training.tabular_policy import TabularPolicy

# Select emulation configuration from the metastore
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-003")
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-010")

# Select simulation configuration from the metastore
simulation_env_config = MetastoreFacade.get_simulation_by_name(
"csle-stopping-pomdp-defender-003")
"csle-stopping-pomdp-defender-010")

# Setup the reinforcement learning experiment
experiment_config = ExperimentConfig(
Expand Down
24 changes: 12 additions & 12 deletions emulation-system/envs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

This folder contains emulation environments.

- Version: **003** [./003](003):
- *Level 1* [level_1](003/level_1): A simple infrastructure with 6 nodes and weak-password-vulnerabilities
- *Level 2* [level_2](003/level_2): An infrastructure with 12 nodes and weak-password-vulnerabilities
- *Level 3* [level_3](003/level_3): A complex infrastructure with 33 nodes and weak-password-vulnerabilities
- *Level 4* [level_4](003/level_4): A simple infrastructure with 6 nodes and weak-password-vulnerabilities and IDS monitoring
- *Level 5* [level_5](003/level_5): An infrastructure with 12 nodes and weak-password-vulnerabilities and IDS monitoring
- *Level 6* [level_6](003/level_6): A complex infrastructure with 33 nodes and weak-password-vulnerabilities and IDS monitoring
- *Level 7* [level_7](003/level_7): An infrastructure with 15 nodes and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1,and SQL injection., as well as SSH, FTP, Telnet servers that can be compromised using dictionary attacks
- *Level 8* [level_8](003/level_8): An infrastructure with 26 nodes and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1,and SQL injection., as well as SSH, FTP, Telnet servers that can be compromised using dictionary attacks
- *Level 9* [./level_9](003/level_9): A complex infrastructure with 36 nodes and and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1, SQL injection, and brute-force vulnerabilities. Further, the infrastructure has IDS monitoring
- *Level 10* [./level_10](003/level_10): An infrastructure with 16 nodes and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1,and SQL injection., Pengine Server RCE Exploit, as well as SSH, FTP, Telnet servers that can be compromised using dictionary attacks
- *Level 11* [./level_11](003/level_11): A complex infrastructure with 36 nodes and and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1, SQL injection, and brute-force vulnerabilities. Further, the infrastructure has IDS monitoring
- Version: **010** [./010](010):
- *Level 1* [level_1](010/level_1): A simple infrastructure with 6 nodes and weak-password-vulnerabilities
- *Level 2* [level_2](010/level_2): An infrastructure with 12 nodes and weak-password-vulnerabilities
- *Level 3* [level_3](010/level_3): A complex infrastructure with 33 nodes and weak-password-vulnerabilities
- *Level 4* [level_4](010/level_4): A simple infrastructure with 6 nodes and weak-password-vulnerabilities and IDS monitoring
- *Level 5* [level_5](010/level_5): An infrastructure with 12 nodes and weak-password-vulnerabilities and IDS monitoring
- *Level 6* [level_6](010/level_6): A complex infrastructure with 33 nodes and weak-password-vulnerabilities and IDS monitoring
- *Level 7* [level_7](010/level_7): An infrastructure with 15 nodes and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1,and SQL injection., as well as SSH, FTP, Telnet servers that can be compromised using dictionary attacks
- *Level 8* [level_8](010/level_8): An infrastructure with 26 nodes and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1,and SQL injection., as well as SSH, FTP, Telnet servers that can be compromised using dictionary attacks
- *Level 9* [./level_9](010/level_9): A complex infrastructure with 36 nodes and and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1, SQL injection, and brute-force vulnerabilities. Further, the infrastructure has IDS monitoring
- *Level 10* [./level_10](010/level_10): An infrastructure with 16 nodes and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1,and SQL injection., Pengine Server RCE Exploit, as well as SSH, FTP, Telnet servers that can be compromised using dictionary attacks
- *Level 11* [./level_11](010/level_11): A complex infrastructure with 36 nodes and and several vulnerabilities: SambaCry, Shellshock, CVE-2015-1427, CVE-2015-3306, CVE-2016-100033_1, SQL injection, and brute-force vulnerabilities. Further, the infrastructure has IDS monitoring

## Useful commands:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
if __name__ == '__main__':
ImportUtil.import_emulation_statistics_from_disk_json(
input_file="/media/lagring/statistics_dataset_14_nov_22_json/statistics.json",
emulation_name="csle-level9-003")
emulation_name="csle-level9-010")
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# ImportUtil.import_emulation_traces_from_disk_json(input_file="/media/lagring/traces_31_oct/1.json")
for i in range(2, 60):
ImportUtil.import_emulation_traces_from_disk_json(
input_file=f"/media/lagring/traces_31_oct/{i}.json", emulation_name="csle-level9-003")
input_file=f"/media/lagring/traces_31_oct/{i}.json", emulation_name="csle-level9-010")
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from csle_common.dao.training.tabular_policy import TabularPolicy

if __name__ == '__main__':
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-003")
simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-pomdp-defender-003")
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-010")
simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-pomdp-defender-010")
experiment_config = ExperimentConfig(
output_dir=f"{constants.LOGGING.DEFAULT_LOG_DIR}ppo_test",
title="PPO test", random_seeds=[399, 98912, 999], agent_type=AgentType.PPO,
Expand Down
4 changes: 2 additions & 2 deletions examples/training/t_fp/stopping_game/run_v003.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def get_obs_tensor():

if __name__ == '__main__':
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-002")
defender_simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-pomdp-defender-003")
attacker_simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-mdp-attacker-003")
defender_simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-pomdp-defender-010")
attacker_simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-mdp-attacker-010")
experiment_config = ExperimentConfig(
output_dir=f"{constants.LOGGING.DEFAULT_LOG_DIR}tfp_test",
title="T-FP training attacker and defender through self-play to approximate a Nash equilibrium",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_obs_tensor():

if __name__ == '__main__':
emulation_env_config = MetastoreFacade.get_emulation_by_name("csle-level9-002")
simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-mdp-attacker-003")
simulation_env_config = MetastoreFacade.get_simulation_by_name("csle-stopping-mdp-attacker-010")
experiment_config = ExperimentConfig(
output_dir=f"{constants.LOGGING.DEFAULT_LOG_DIR}tspsa_test",
title="T-SPSA training attacker to learn 2L thresholds",
Expand Down
Loading

0 comments on commit f77f0dd

Please sign in to comment.