Skip to content

Module 2 - Example 2

Latest

Choose a tag to compare

@johnathanhuutri johnathanhuutri released this 18 Oct 08:34
· 1 commit to master since this release

Tested on Ubuntu 22.04

Checker

Done!

Service

Done! All services don't require SSH public key to put flag

  • pwn1 (port 50001)
  • web1 (port 1337)
  • web2 (port 8080)

ForcAD config

Below is a tested config of file config.yml for ForcAD

admin:
  username: forcad
  password: forcad
game:
  checkers_path: /checkers/
  default_score: 2500.0
  env_path: ''
  flag_lifetime: 5
  game_hardness: 10.0
  inflation: true
  mode: classic
  round_time: 60
  start_time: 2024-07-04 19:00:00
  timezone: Asia/Ho_Chi_Minh
tasks:
- checker: pwn01/checker.py
  checker_timeout: 10
  checker_type: pfr
  gets: 2
  name: pwn01
  places: 3
  puts: 2
- checker: web01/checker.py
  checker_timeout: 10
  checker_type: pfr
  gets: 2
  name: web01
  places: 3
  puts: 2
- checker: web02/checker.py
  checker_timeout: 10
  checker_type: pfr
  gets: 2
  name: web02
  places: 3
  puts: 2
teams:
- highlighted: false
  ip: 10.254.1.1
  name: Team 1
- highlighted: false
  ip: 10.254.2.1
  name: Team 2

Nginx for routing

worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
}

stream {
    # Team 1
    server {
        listen 40101;
        proxy_pass 10.254.1.1:50001;
    }
    server {
        listen 40102;
        proxy_pass 10.254.1.1:1337;
    }
    server {
        listen 40103;
        proxy_pass 10.254.1.1:8080;
    }

    # Team 2
    server {
        listen 40201;
        proxy_pass 10.254.2.1:50001;
    }
    server {
        listen 40202;
        proxy_pass 10.254.2.1:1337;
    }
    server {
        listen 40203;
        proxy_pass 10.254.2.1:8080;
    }
}