This provides the baseline of a scoring engine which allows for management of instances and teams as well as their individual scores.
- Easy to set up in a production environment
- Capable of handling multiple competing teams at once
- Support for both Linux clients using systemd and Windows clients, and using Docker for the server
- Competition Integrity
- If someone is capable of reverse engineering this code in the middle of a competition, then they probably can pass the challenges given to them already. This is designed to teach people who haven't even heard of Linux yet
- ClientCommon/ClientCommonLibraries - libraries and services that are meant to be run in a platform independent way
- ClientData - data, interface, and configuration management
- ClientInstallerUtilities - common utilities for installing to both Linux and Windows
- ClientModels - data structures used in order to communicate with the controller and manage client services
- ClientService - a background event loop which will continuously run predefined scripts and check for whether or not points should be awarded
- ClientWebInterface - a web interface to show the current progress as well as the README and setup interfaces
- Clients (Windows/Linux) - provides concrete implementations for the different operating systems
- Constants - stores constants that are necessary for installation and execution, such as installation folder paths
- Client - the project that implements interfaces for ClientService, ClientWebInterface, and ClientData to allow for executing in platform dependent ways
- Installer - programs to generate binaries to install the entirety of the service and user interfaces as well as configuring the services
- Server - acts as the program which controls all of the clients as well as the admin control panel
- EngineController - the admin panel for the competition, which allows for setting the actual tasks and penalties as well as administering systems and teams
- EngineControllerData - provides models and database connections for the server
- TcpWorkerService - acts as a server for the individual clients above
The following programs are needed for development:
- Node.js 14
- .NET 5 SDK
- Either Visual Studio or Visual Studio Code
In the repository, run:
# Install dependencies
dotnet restore
# Install the dotnet-format utility to keep files formatted consistently
dotnet tool install -g dotnet-format
# Install the pre-commit hook
git config core.hooksPath hooks
Docker is also a useful utility for developing the server programs
To build and run a project and its dependencies, go into a project folder and run dotnet build
or dotnet run
to build or build and run respectively
To build a Docker image for the engine controller, from the project root run: docker build -t enginecontroller -f Server/EngineController/Dockerfile .
Note: Do not run this command using WSL 2 on an NTFS drive!
To run it, run docker run -d -p 80:80 -p 3050:3050 enginecontroller
Alternatively, you can use docker run -d -p 80:80 -p 3050:3050 ghcr.io/cap-md089/cyberdefense-scoring-engine/enginecontroller:latest
to run the latest build from the master branch
First, publish the WindowsClient project using dotnet publish -c Release
inside Windows/WindowsClient
Then, run dotnet publish -c Release
inside Windows/WindowsInstaller
The resulting WindowsInstaller
executable should be located in either Windows/WindowsInstaller/bin/Release/net5.0/windows-x64/publish
or Windows/WindowsInstaller/bin/Release/net5.0/publish
This file is automatically built using GitHub actions, and can be accessed by going to 'Actions' -> 'Build Windows Installer' workflow, and then clicking on the latest build.
First, publish the LinuxClient project using dotnet publish -c Release
inside Linux/LinuxClient
Then, run dotnet publish -c Release
inside Linux/LinuxInstaller
The resulting LinuxInstaller
executable should be located in either Linux/LinuxInstaller/bin/Release/net5.0/linux-x64/publish
or Linux/LinuxInstaller/bin/Release/net5.0/publish
This file is automatically built using GitHub actions, and can be accessed by going to 'Actions' -> 'Build Linux Installer' workflow, and then clicking on the latest build.