Submission server/infrastructure for the SRS challenge at FIC https://fic.srs.epita.fr/
Go to file
nemunaire 12a6fcf461 fickit: Limit to amd64 arch 2021-09-08 02:07:37 +02:00
admin fic: Add team's external_id to allow team and score synchronisation 2021-09-08 02:07:37 +02:00
backend fic: Add Order, Help and Type values in struct 2021-08-30 18:33:14 +02:00
configs ui: Fix base url mess 2021-09-08 02:07:37 +02:00
dashboard admin: Use relative path to call API 2021-07-22 16:17:03 +02:00
fickit-pkg fickit: Limit to amd64 arch 2021-09-08 02:07:37 +02:00
frontend ui: Improve CardTheme colors 2021-09-08 02:07:37 +02:00
libfic fic: Replace accentuated letters by non-accentuated ones 2021-09-08 02:07:37 +02:00
password_paper ui: Add theme from bootswatch 2021-09-01 01:49:28 +02:00
qa qa: Use relative path to real website from QA 2021-07-23 11:51:44 +02:00
repochecker repochecker: new option avoiding failure if resolution.mp4 missing 2021-05-14 01:14:30 +02:00
settings Settings: avoid transmitting false variables 2020-11-13 14:29:23 +01:00
udev udev: ready to FIC2019 2019-01-22 08:49:44 +01:00
.drone-manifest-fic-admin.yml CI: create Docker manifest image 2021-02-23 09:11:47 +01:00
.drone-manifest-fic-backend.yml CD: Fix deployment of fic-backend image 2021-07-21 11:23:06 +02:00
.drone-manifest-fic-dashboard.yml CI: create Docker manifest image 2021-02-23 09:11:47 +01:00
.drone-manifest-fic-frontend.yml CI: create Docker manifest image 2021-02-23 09:11:47 +01:00
.drone-manifest-fic-nginx.yml Introduce fic-nginx 2021-07-21 03:03:25 +02:00
.drone-manifest-fic-qa.yml CI: create Docker manifest image 2021-02-23 09:11:47 +01:00
.drone-manifest-fic-repochecker.yml CI: add Dockerfile for repochecker (used for student's CI) 2021-05-14 00:44:55 +02:00
.drone.yml CI: Fix compilation problems 2021-09-01 01:49:28 +02:00
.gitignore frontend: copy settings.json on settings reload (to handle delayed settings propagation) 2020-01-30 18:55:56 +01:00
Dockerfile-admin admin: Embed static assets into binary 2021-06-09 23:26:40 +02:00
Dockerfile-backend Use go modules 2021-05-14 00:42:40 +02:00
Dockerfile-dashboard New env variable FIC_BASEURL to change the base URL 2021-07-22 16:17:03 +02:00
Dockerfile-frontend configs: Update scripts and config for new ui 2021-08-30 19:43:35 +02:00
Dockerfile-nginx CI: Fix compilation problems 2021-09-01 01:49:28 +02:00
Dockerfile-qa New env variable FIC_BASEURL to change the base URL 2021-07-22 16:17:03 +02:00
Dockerfile-repochecker CI: add Dockerfile for repochecker (used for student's CI) 2021-05-14 00:44:55 +02:00
LICENSE Add LICENSE: chose MIT 2018-05-11 15:03:11 +02:00
README.md admin: Embed static assets into binary 2021-06-09 23:26:40 +02:00
docker-compose.yml configs: Update scripts and config for new ui 2021-08-30 19:43:35 +02:00
entrypoint-frontend.sh configs: Update scripts and config for new ui 2021-08-30 19:43:35 +02:00
fickit-backend.yml fickit: update kernels 2020-01-30 19:07:11 +01:00
fickit-boot.yml fickit: update kernels 2020-01-23 18:26:30 +01:00
fickit-frontend.yml fickit: fix VLAN and do NAT to Internet 2020-01-30 19:08:28 +01:00
fickit-prepare.yml Refactor fickit-update and fickit-prepare 2020-01-30 19:00:46 +01:00
fickit-update.yml Refactor fickit-update and fickit-prepare 2020-01-30 19:00:46 +01:00
go.mod chore(deps): update golang.org/x/crypto commit hash to 32db794 2021-08-17 18:49:31 +00:00
go.sum Clean go.sum 2021-09-08 02:07:37 +02:00
htdocs-admin admin: Embed static assets into binary 2021-06-09 23:26:40 +02:00
htdocs-dashboard dashboard: came back online 2018-12-08 20:35:36 +01:00
htdocs-frontend frontend: add link to frontend htdocs, like admin static pages 2017-11-25 15:01:01 +01:00
htdocs-qa qa: New service to handle QA testing by students 2020-09-08 12:50:41 +02:00
qa-fill-todo.sh QA: Add new script to migrate QA content from a DB to another 2021-02-05 16:56:27 +01:00
qa-fill-view.sh QA: Add new script to migrate QA content from a DB to another 2021-02-05 16:56:27 +01:00
qa-merge-db.sh QA: Add new script to migrate QA content from a DB to another 2021-02-05 16:56:27 +01:00
renovate.json Add renovate.json 2021-08-01 21:01:22 +00:00

README.md

FIC Forensic CTF Platform

This is a CTF server for distributing and validating challenges. It is design to be robust, so it uses some uncommon technics like client certificate for authentication, lots of state of the art cryptographic methods and aims to be deployed in a DMZ network architecture.

Local developer setup

The importance of clone location

This is a monorepo, primarly intended for Go programming. If you want to be able to do programming stuff, you should take care of the path where you clone this repository, as it should be located inside your GOPATH:

git clone https://git.nemunai.re/fic/server.git $GOPATH/src/srs.epita.fr/fic-server

Using Docker

Use docker-compose build, then docker-compose up to launch the infrastructure.

After booting, you'll be able to reach the main interface at: http://localhost:8042/ and the admin one at: http://localhost:8081/.

Import folder

Local import folder

The following changes is only required if your are trying to change the local import folder ~/fic location.

Make the following changes inside this file docker-compose.yml:

23    volumes:
24 -     - ~/fic:/mnt/fic:ro
24 +     - <custom-path-to-import-folder>/fic:/mnt/fic:ro
Owncloud import folder

If your are trying to use the folder available with the Owncloud service, make the following changes inside this file docker-compose.yml:

29 -    command: --baseurl /admin/ -localimport /mnt/fic -localimportsymlink
29 +    command: --baseurl /admin/ -clouddav=https://owncloud.srs.epita.fr/remote.php/webdav/FIC%202019/ -clouduser <login_x> -cloudpass '<passwd>'

Manual builds

Running this project requires a web server (configuration is given for nginx), a database (currently supporting only MySQL/MariaDB), a Go compiler for the revision 1.16 at least and a inotify-aware system.

  1. First, you'll need to retrieve the dependencies:

     go get -d srs.epita.fr/fic-server/admin
     go get -d srs.epita.fr/fic-server/backend
     go get -d srs.epita.fr/fic-server/dashboard
     go get -d srs.epita.fr/fic-server/frontend
    
  2. Then, build the three Go projects:

     go build -o $GOPATH/src/srs.epita.fr/fic-server/fic-admin srs.epita.fr/fic-server/admin
     go build -o $GOPATH/src/srs.epita.fr/fic-server/fic-backend srs.epita.fr/fic-server/backend
     go build -o $GOPATH/src/srs.epita.fr/fic-server/fic-dashboard srs.epita.fr/fic-server/dashboard
     go build -o $GOPATH/src/srs.epita.fr/fic-server/fic-frontend srs.epita.fr/fic-server/frontend
    
  3. Before launching anything, you need to create a database:

     mysql -u root -p <<EOF
     CREATE DATABASE fic;
     CREATE USER fic@localhost IDENTIFIED BY 'fic';
     GRANT ALL ON fic.* TO fic@localhost;
     EOF
    

    By default, expected credentials for development purpose is fic, for both username, password and database name. If you want to use other credentials, define the corresponding environment variable: MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE. Those variables are the one used by the mysql docker image, so just link them together if you use containers.

  4. Launch it!

     ./fic-admin &
    

    After initializing the database, the server will listen on http://localhost:8081/: this is the administration part.

     ./fic-backend &
    

    This daemon generates static and team related files and then waits for new submissions (expected in submissions directory). It only watchs modifications on the file system, it has no web interface.

     ./fic-frontend &
    

    This one exposes an API that gives time synchronization to clients and handle submission reception (but without treating them).

     ./fic-dashboard &
    

    This last server runs the public dashboard. It serves all file, without the need of a webserver. It listens on port 8082 by default.

For the moment, a web server is mandatory to serve static files, look at the samples given in the configs/ directory.