Cruiser Agent
Description
面向 CTF 竞赛评测平台(TSec Benchmark)的自动化 Web/逻辑漏洞挖掘与利用 Agent:分层调度 + 多会话并发 + 跨会话共享黑板 + 平台权威校验
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Cruiser
Cruiser 是一个面向 CTF 竞赛评测平台(TSec Benchmark)的自动化 Web/逻辑漏洞挖掘与利用 Agent。它对接跑分平台,自动完成「拉取题目 → 启动靶场容器 → 驱动 Agent 解题 → 提交 flag → 关闭容器」的完整闭环,并通过多进程并发、分层调度与跨会话共享黑板机制提升解题吞吐与成功率。
核心架构
Cruiser 的解题引擎基于 [`claude` CLI](https://docs.anthropic.com/en/docs/claude-code)(`--output-format stream-json` 流式模式)驱动一个自主 Agent,Anthropic 兼容端点默认接入 DeepSeek。系统分为三层进程,边界清晰、崩溃可恢复:
- 调度层(
main.py主进程) — 唯一与平台交互的进程。轮询未解题目、按难度分层调度、启动 worker、监控[COUNT]步数、回收容器与孤儿进程。 - 执行层(worker 子进程) —
main.py --sessions 1 --challenge-code的副本,带CRUISER_WORKER_ID。调用run_auto_scan(),进而拉起claudeCLI 进程。 - Agent 层(
claudeCLI 进程) — 真正的解题智能体,使用其内置的 Bash/Read/Write 等工具执行侦察与利用。
进程链:`main.py(调度器)→ main.py --sessions 1(worker)→ claude CLI → bash/python 工具子进程`。
跨进程协作通过**文件系统**完成(`reports/` 目录),全部以 `fcntl` 文件锁 + 临时文件 `os.replace` 原子重写保证并发安全:
- 共享黑板
reports/info_.txt— 各会话已发现的关键事实(口令、路径、端点、结论等)。 - 探索方向任务板
reports/tasks_.txt— 待认领的探索方向,认领即擦除,先到先得。 - 共享提示
reports/hint_.txt— 从平台拉取的题目提示(各会话共享)。
分层调度
新题在四个队列间逐级晋升,每级步数阈值递增;任一会话解出 flag 即整组停止:
| 层级 | 触发条件 | 步数阈值 | 是否带提示 |
|---|---|---|---|
| 预处理 | 新题 | 50 | 否 |
| 一级 | 预处理未解出 | 100 | 否 |
| 二级 | 一级未解出 | 150 | 否 |
| 三级 | 二级未解出 | 200 | 是(从三级起才拉取提示;解不出则放回队尾按 200 步循环重试) |
每一级对同一道题并发拉起 `--sessions` 个**黑盒** worker 会话(全程黑盒,无源码审计),各会话独立探索、以不同会话编号署名,通过共享黑板交换发现以减少重复探索。可用 `--worker-models` 为每个 worker 指定不同模型(如 2 个 `deepseek-v4-flash` + 1 个 `deepseek-v4-pro`)。平台活跃容器名额(默认 3,`CRUISER_MAX_ACTIVE`)会严格限流。
共享黑板机制
- 上下文硬注入(
blackboard_hook.py) — 在 worker 工作目录写入.claude/settings.json注册钩子:SessionStart开局注入一次黑板 + 任务板,PostToolUse每 10 次工具调用注入一次最新内容,通过additionalContext物理进入模型上下文,不依赖模型自觉读取。 - 黑板策展 Watcher — 每 6 步在后台由独立的 watcher LLM 审阅该会话最近活动,维护黑板质量(提取新关键信息、修正/删除失效条目)并向任务板推荐探索方向。应用变更时按内容模糊匹配定位条目,规避并发行号漂移。watcher 使用
deepseek-v4-pro模型(可经WATCHER_MODEL覆盖),策展与方向规划需要更强的推理能力。
项目结构
Cruiser/
├── main.py # CLI 入口:平台调度、多会话并发、分层调度、容器/进程治理
├── blackboar
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11