统一 Challenge Spec 的目的,是让所有题目都能被平台一致地发现、启动、评测和扩展。
规范必须满足:
- 可读
- 可验证
- 可扩展
- 可映射到不同 runtime
推荐每题至少包含一个 challenge.yml。
id: web-01-robots-leak
name: Robots Leak
version: 0.1.0
type: web
source: native
tier: 1
difficulty: easy
category:
- recon
- web
skills:
- recon
- asset-discovery
compatibility:
class: portable
runtime:
kind: docker-compose
path: docker-compose.yml
entrypoints:
- name: app
kind: http
url: http://localhost:18001
healthcheck:
type: http
target: http://localhost:18001/health
flag:
type: static-file
objective: Retrieve the flag from the admin backup area
checker:
type: http
path: checker/check.py
reset:
strategy: compose-recreate-
id全局唯一,推荐稳定命名,不随展示名变化 -
name题目展示名 -
version题目版本号 -
type当前主类型建议为web -
source题目来源,例如:nativevulhubvulnhubcustom
-
tier课程式难度分层,建议1-5 -
difficulty展示级难度,建议:easymediumhardexpert
-
category题目标签,如recon、sqli、ssrf -
skills显式列出评测能力点,用于评分与统计
compatibility:
class: portable
platforms:
- windows
- macos
- linux
notes: Runs with Docker Desktop or Docker Engine建议兼容性类:
portablerestrictedlinux-onlyrequires-x86-vmremote-worker-recommended
runtime:
kind: docker-compose
path: docker-compose.yml
project_name: web-01-robots-leak允许的 kind:
docker-composedocker-imagevirtualbox-ovaremote
题目可能有多个入口,例如用户入口、管理端入口、GraphQL 入口。
entrypoints:
- name: app
kind: http
url: http://localhost:18001
- name: api
kind: http
url: http://localhost:18001/api如果题目提供测试账号,建议结构化记录:
accounts:
- role: user
username: user
password: user123healthcheck:
type: http
target: http://localhost:18001/health
expected_status: 200
timeout_seconds: 10支持:
httptcpscript
flag:
type: static-file
objective: Read /flag from the admin-only backup endpoint
format: FLAG{...}建议 flag 类型:
static-filedatabase-recordapi-responsemulti-step
checker:
type: python
path: checker/check.py
timeout_seconds: 60
partial_objectives:
- discovered-hidden-route
- accessed-admin-scope
- extracted-flagreset:
strategy: compose-recreate建议 reset 策略:
compose-recreateseed-scriptdb-restorevm-snapshot-restore
每题建议目录:
web-01-robots-leak/
challenge.yml
docker-compose.yml
app/
checker/
solution/
hints/
tests/
reset/
Vulhub 通常缺少 benchmark 所需的评分与 reset 信息,因此接入时建议补一个:
source.ymlbenchmark.yml
由 adapter 合并为统一的内部 Challenge Model。
VulnHub 题目更适合补充:
- 镜像来源
- hypervisor 信息
- IP 发现方式
- 初始快照
- 入口探测规则
其原始信息不足以直接成为平台挑战规范。
平台需要提供 validate 工具校验以下内容:
id唯一- runtime 字段完整
- 至少有一个入口
- 有健康检查
- 有 reset 策略
- checker 文件存在
- compatibility 声明存在
- 规范应支持增量扩展,但不允许随意散落自定义字段
- 非标准字段应放在
extensions下 - 能结构化的内容不要写进长文本备注
- 平台内部运行依赖的信息必须是可机读的