-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Steady state for analysis & experimentation (#11)
* feat: basic development environment via `Makefile` & sample benchmark * feat: rendered Jupyter Notebook for logbook + creating diagrams * docs: section headings for risk matrix, TTP, & design * docs: add supporting footnote to NIST (CSRC) * feat: sample ASCCI line graph & rolling hash base * feat: external system configuration file * refactor: diode config from YAML file * fix: input, output, & broker connections * docs: update directory tree structure names
- Loading branch information
1 parent
4c9f505
commit 551e1cf
Showing
12 changed files
with
690 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
build: | ||
go build -o diode diode.go | ||
|
||
test: | ||
go test -v | ||
|
||
run: | ||
go run diode.go | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,74 @@ | ||
# Data Diode | ||
|
||
Scripts for verifying TCP passthrough functionality. | ||
|
||
## Development Environment | ||
## Development Instructions | ||
|
||
> [!NOTE] | ||
> This project utilizes [`go`](https://go.dev/) for module management. | ||
> You can find installation instructions for `1.21.6` via https://go.dev/doc/install. | ||
- Clone repository: `gh repo clone acep-uaf/data-diode` | ||
- Source navigation: `cd data-diode` | ||
- Build binary: `make` | ||
- CLI: `./diode [options...]` | ||
|
||
#### Architecture Diagram | ||
|
||
###### Energy Testbed | ||
|
||
## Architecture Diagram | ||
###### Device Configuration | ||
|
||
#### Directory Structure | ||
|
||
```zsh | ||
. | ||
├── benchmark | ||
├── config.yaml | ||
├── data | ||
├── diode.go | ||
├── diode_test.go | ||
├── go.mod | ||
├── go.sum | ||
├── Makefile | ||
├── mqtt | ||
├── Pipfile | ||
├── Pipfile.lock | ||
├── README.md | ||
└── sample | ||
|
||
4 directories, 9 files | ||
``` | ||
|
||
## User Stories | ||
|
||
#### Scenario Planning | ||
|
||
1. Power Plant Operator | ||
1. Information Security Auditor | ||
1. Energy Awareness Application Developer | ||
1. Community Member | ||
|
||
#### Threat Model[^1] | ||
|
||
- [ ] Tactics | ||
- [ ] Techniques | ||
- [ ] Procedures | ||
|
||
## System Benchmarking | ||
|
||
#### Risk Matrix ([5x5](https://safetyculture.com/topics/risk-assessment/5x5-risk-matrix/)) | ||
|
||
| ↔ Probability <br> Impact ↕ | **Insignificant** | **Minor** | **Significant** | **Major** | **Severe** | | ||
| --------------------------- | ----------------- | --------- | --------------- | --------- | ---------- | | ||
| **Almost Certain** | R01 | R02 | R03 | R04 | R05 | | ||
| **Likely** | R06 | R07 | R08 | R09 | R10 | | ||
| **Moderate** | R11 | R12 | R13 | R14 | R15 | | ||
| **Unlikely** | R16 | R17 | R18 | R19 | R20 | | ||
| **Rare** | R21 | R22 | R23 | R24 | R25 | | ||
|
||
#### Experimental Design | ||
|
||
- [data/logbook.ipynb](data/logbook.ipynb) | ||
|
||
[^1]: https://csrc.nist.gov/glossary/term/tactics_techniques_and_procedures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package main | ||
|
||
import ( | ||
"crypto/sha256" | ||
"fmt" | ||
|
||
"github.com/guptarohit/asciigraph" | ||
) | ||
|
||
func checksum() { | ||
// https://en.wikipedia.org/wiki/Rolling_hash | ||
|
||
passthrough := []string{ | ||
"hello", | ||
"world", | ||
} | ||
|
||
fmt.Println(">> Words: ", passthrough) | ||
|
||
for _, word := range passthrough { | ||
sum := sha256.Sum256([]byte(word)) | ||
fmt.Printf("%x\n", sum) | ||
} | ||
} | ||
|
||
func example() { | ||
definition := []float64{0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144} | ||
graph := asciigraph.Plot(definition) | ||
|
||
fmt.Println(graph) | ||
} | ||
|
||
func main() { | ||
checksum() | ||
example() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
input: | ||
ip: "192.168.1.99" | ||
port: 50000 | ||
output: | ||
ip: "192.168.1.20" | ||
port: 503 | ||
broker: | ||
server: "test.mosquitto.org" | ||
port: 1883 | ||
topic: "test/message" | ||
message: "Hello, world." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## 📶 Data Diode\n", | ||
"#### Solomon Himelbloom (2024-01-24)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"1\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"print(1)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "data-diode-iul9FwkF", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.12" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.