Skip to content

Commit

Permalink
initial commit of module-0
Browse files Browse the repository at this point in the history
  • Loading branch information
dnkcom authored and activeshadow committed Dec 4, 2024
1 parent 140107b commit 31dab09
Show file tree
Hide file tree
Showing 23 changed files with 44,092 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
configs/grafana/plugins/*
!configs/grafana/plugins/.gitkeep
28 changes: 28 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
tasks:
- init: |
git lfs pull
curl -L -o /tmp/opensearch.zip "https://grafana.com/api/plugins/grafana-opensearch-datasource/versions/2.13.0/download?os=linux&arch=amd64"
unzip -d configs/grafana/plugins /tmp/opensearch.zip
docker compose pull wireshark main-ctlr opensearch grafana
- command: |
docker compose up -d
ports:
- port: 1880
name: HMI
description: Turbine HMI (at /ui path)
- port: 3000
name: Grafana
description: Turbine Status Dashboard
- port: 8080
name: Wireshark
description: Wireshark GUI (at /vnc.html path)
- port: 8090
name: Adversary
description: Adversary Desktop (at /vnc.html path)

vscode:
extensions:
- ms-azuretools.vscode-docker
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# OT Security Lab: UIUC CS 460 / ECE 419 - Security Laboratory
# Modules

Welcome to the second OT Security Lab for UIUC course CS 460 / EC419 - Security
Laboratory in December 2024.
* [module-0](#previous-wind-turbine-module-0)

This lab has 4 separate modules, each building on the previous one, in separate
branches.
# Previous Wind Turbine (module-0)

To start, create a Gitpod account (if needed) and deploy the initial Gitpod
workspace using the following URL.
In this module:

https://gitpod.io/#https://github.com/patsec/uiuc-farm/tree/module-0
* You will re-familiarize yourself with the wind turbine from the last lab.
Recall, it has an adversary container and a Grafana container for ground truth.

Follow the README instructions in the workspace.
In the next module, you will set up this wind turbine in a larger wind farm.
Change the two `{{FIX_ME}}` entries in the URL below with the values provided
by your instructor. Then, start the next branch.

> There will be a Q&A session at the module’s end. Stop the current Gitpod
> workspace and deploy the next branch in Gitpod using this URL:
> https://gitpod.io/#HOSTNAME={{FIX_ME}},OTSIM_TAILSCALE_AUTHKEY={{FIX_ME}}/https://github.com/patsec/uiuc-farm/tree/module-1
8 changes: 8 additions & 0 deletions configs/docker/tigervnc-adversary.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[program:x11]
priority=0
command=/usr/bin/Xtigervnc -desktop "Adversary" -localhost -rfbport 5900 -SecurityTypes None -AlwaysShared -AcceptKeyEvents -AcceptPointerEvents -AcceptSetDesktopSize -SendCutText -AcceptCutText :1
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true

8 changes: 8 additions & 0 deletions configs/docker/tigervnc-wireshark.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[program:x11]
priority=0
command=/usr/bin/Xtigervnc -desktop "Wireshark" -localhost -rfbport 5900 -SecurityTypes None -AlwaysShared -AcceptKeyEvents -AcceptPointerEvents -AcceptSetDesktopSize -SendCutText -AcceptCutText :1
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true

9 changes: 9 additions & 0 deletions configs/docker/wireshark.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[program:wireshark]
priority=1
environment=DISPLAY=:1
command=/usr/bin/wireshark
autorestart=false
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true

6 changes: 6 additions & 0 deletions configs/grafana/dashboards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: 1
providers:
- name: default
type: file
options:
path: /var/lib/grafana/dashboards
4 changes: 4 additions & 0 deletions configs/grafana/grafana.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[auth.anonymous]
enabled = true
org_name = Main Org.
org_role = Admin
13 changes: 13 additions & 0 deletions configs/grafana/opensearch-data-source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: 1
datasources:
- name: WindTurbine
isDefault: true
type: grafana-opensearch-datasource
access: proxy
url: http://opensearch:9200
jsonData:
database: '[wind-turbine-]YYYY.MM.DD'
interval: 'Daily'
timeField: '@timestamp'
flavor: 'opensearch'
version: '2.10.0'
Empty file.
Loading

0 comments on commit 31dab09

Please sign in to comment.