fix(towercore): allow peer inventory checks
- keep peer context reads denied with native 0x0203 - preserve opcode 0x23 empty authorized response path
This commit is contained in:
1 parent
500ed28038
commit
6043bc346b
12 files changed
+450
-1
No files matched your search
@@ -0,0 +1,182 @@
|
||||
name: mctf-tulip
|
||||
|
||||
services:
|
||||
timescale:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.timescale
|
||||
image: mctf-tulip-timescale:523e517
|
||||
restart: unless-stopped
|
||||
shm_size: ${TIMESCALE_SHM_SIZE:-1gb}
|
||||
environment:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
POSTGRES_USER: tulip
|
||||
POSTGRES_DB: tulip
|
||||
volumes:
|
||||
- timescale-data:/var/lib/postgresql/data
|
||||
- ./upstream/services/schema/system.sql:/docker-entrypoint-initdb.d/100_system.sql:ro
|
||||
- ./upstream/services/schema/functions.sql:/docker-entrypoint-initdb.d/101_functions.sql:ro
|
||||
- ./upstream/services/schema/schema.sql:/docker-entrypoint-initdb.d/102_schema.sql:ro
|
||||
networks:
|
||||
- tulip-internal
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U tulip -d tulip"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 30s
|
||||
|
||||
api:
|
||||
build:
|
||||
context: ./upstream/services/api
|
||||
dockerfile: Dockerfile-api
|
||||
image: mctf-tulip-api:523e517
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
timescale:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
TIMESCALE: postgres://tulip@timescale:5432/tulip
|
||||
TULIP_TRAFFIC_DIR: /traffic
|
||||
TULIP_SERVICES: ${TULIP_SERVICES:?set TULIP_SERVICES in .env}
|
||||
FLAG_REGEX: ${FLAG_REGEX:?set FLAG_REGEX in .env}
|
||||
TICK_START: ${TICK_START:?set TICK_START in .env}
|
||||
TICK_LENGTH: ${TICK_LENGTH:?set TICK_LENGTH in .env}
|
||||
VM_IP: ${VM_IP:-127.0.0.1}
|
||||
volumes:
|
||||
- ${TRAFFIC_DIR_HOST:-./data/traffic}:/traffic:ro
|
||||
- ./configurations.py:/app/configurations.py:ro
|
||||
networks:
|
||||
- tulip-internal
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/', timeout=3).read()"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 20s
|
||||
|
||||
assembler:
|
||||
build:
|
||||
context: ./upstream/services/go-importer
|
||||
dockerfile: Dockerfile-assembler
|
||||
image: mctf-tulip-assembler:523e517
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
timescale:
|
||||
condition: service_healthy
|
||||
command:
|
||||
- ./assembler
|
||||
- -http-session-tracking
|
||||
- -skipchecksum
|
||||
- -disable-converters
|
||||
- -dir
|
||||
- /traffic
|
||||
environment:
|
||||
TIMESCALE: postgres://tulip@timescale:5432/tulip
|
||||
FLAG_REGEX: ${FLAG_REGEX:?set FLAG_REGEX in .env}
|
||||
TICK_START: ${TICK_START:?set TICK_START in .env}
|
||||
TICK_LENGTH: ${TICK_LENGTH:?set TICK_LENGTH in .env}
|
||||
FLAGID_SCAN: ""
|
||||
FLAG_LIFETIME: ${FLAG_LIFETIME:-5}
|
||||
FLAG_VALIDATOR_TYPE: ""
|
||||
FLAG_VALIDATOR_TEAM: ""
|
||||
PCAP_OVER_IP: ""
|
||||
DUMP_PCAPS: ""
|
||||
DUMP_PCAPS_INTERVAL: 1m
|
||||
DUMP_PCAPS_FILENAME: 2006-01-02_15-04-05.pcap
|
||||
BPF: ""
|
||||
volumes:
|
||||
- ${TRAFFIC_DIR_HOST:-./data/traffic}:/traffic:ro
|
||||
networks:
|
||||
- tulip-internal
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./upstream/frontend
|
||||
dockerfile: Dockerfile-frontend
|
||||
image: mctf-tulip-frontend:523e517
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
API_SERVER_ENDPOINT: http://api:5000/
|
||||
ports:
|
||||
- "${TULIP_BIND_ADDRESS:-127.0.0.1}:${TULIP_PORT:-3000}:3000"
|
||||
networks:
|
||||
- tulip-internal
|
||||
- tulip-edge
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- node
|
||||
- -e
|
||||
- "const r=require('http').get('http://127.0.0.1:3000/api/',x=>process.exit(x.statusCode===200?0:1));r.on('error',()=>process.exit(1));r.setTimeout(3000,()=>{r.destroy();process.exit(1)})"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 20s
|
||||
|
||||
capture:
|
||||
profiles:
|
||||
- capture
|
||||
platform: linux/amd64
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.capture
|
||||
image: mctf-tulip-capture:bookworm
|
||||
restart: unless-stopped
|
||||
# Host networking exposes the OpenVPN interface. tcpdump needs NET_RAW for
|
||||
# packet sockets and NET_ADMIN for TUN capture on this Docker host.
|
||||
network_mode: host
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:size=16m,mode=1777
|
||||
environment:
|
||||
CAPTURE_INTERFACE: ${CAPTURE_INTERFACE:-game}
|
||||
CAPTURE_ROTATE_SECONDS: ${CAPTURE_ROTATE_SECONDS:-60}
|
||||
volumes:
|
||||
- ${TRAFFIC_DIR_HOST:-./data/traffic}:/traffic
|
||||
- ./capture.bpf:/etc/tcpdump/filter:ro
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
- -ec
|
||||
command:
|
||||
- |
|
||||
umask 027
|
||||
mkdir -p /traffic/.spool
|
||||
set -- tcpdump -i "$${CAPTURE_INTERFACE}" -p -n -U -s 0 -Z root \
|
||||
-G "$${CAPTURE_ROTATE_SECONDS}" \
|
||||
-w "/traffic/.spool/$${CAPTURE_INTERFACE}-%Y%m%d-%H%M%S.pcap" \
|
||||
-z /usr/local/bin/finalize-capture
|
||||
if [ -s /etc/tcpdump/filter ]; then
|
||||
set -- "$$@" -F /etc/tcpdump/filter
|
||||
fi
|
||||
exec "$$@"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "test -e /sys/class/net/$${CAPTURE_INTERFACE}"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
volumes:
|
||||
timescale-data:
|
||||
|
||||
networks:
|
||||
tulip-internal:
|
||||
internal: true
|
||||
tulip-edge:
|
||||
Reference in new issue
Block a user