riegan-ctf
暂无简介
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
02 资源文件 4
- 参考文档references/submission.md2.2 KB
- 参考文档references/writeup.md1.1 KB
- 参考文档SOURCE.md323 B
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
CTF router — event workflow, triage, dispatch, flags
Operates at /home/riegan/Projects/ctf (this repo). Mixed-team level: every path has a
beginner-safe triage step; category skills carry the expert playbooks.
Operating rules (always in force)
- Remote gate: never connect to a remote challenge service, scoreboard, or another team's box without explicit user go-ahead in the current session. The user may pre-authorize an event ("remote OK for <event>") — then remote work for that event's hosts is allowed, everything else still gated. Local analysis is always allowed.
- Untrusted artifacts: challenge files are hostile. Analyze statically first;
execute only under
podmanisolation or with user approval. Neversudoa challenge file, never run its installers on the host, never open challenge documents in desktop apps — usescripts/and parsers here. - Install policy: Python libs →
scripts/setup.shvenv oruv pip install --python .venv/bin/python <pkg>. System tools →sudo pacman -S(document first, ask before running sudo). Single binaries →cargo install/go install/uv tool install/ upstream tarball into~/.local/bin. - Workspace discipline: one dir per challenge;
notes.mdrecords hypothesis → evidence → next step, including failed approaches. Never scatter files. - Flag discipline: every flag found is logged to
work/<event>/flags.mdwith challenge name + timestamp before anything else happens.
Workflow
1. setup scripts/setup.sh (once per machine) — .venv with pwntools etc.
2. workspace mkdir -p work/<event>/<category>-<name>/{dist,solve} && cd there
cp challenge files into dist/ ; create notes.md (goal, remote info,
points, solves count, description verbatim)
3. triage universal first pass (below) → dispatch table → read category skill
4. solve loop: hypothesis → test → record in notes.md ; escalate depth via
the category skill's references/
5. flag validate format → grep for submission mistakes → log to flags.md
6. submit user gate → references/submission.md (CTFd/rCTF)
7. writeup references/writeup.md template into challenge dir
Universal triage (first 5 minutes, any category)
file dist/* # real type, arch, stripped, embedded
binwalk dist/<file> # after install; embedded blobs/squashfs
strings -n 8 dist/<file> | grep -aiE 'flag|ctf\{|key|passw|http' | head
exiftool dist/<file> # after install; metadata leaks
ls -la; sha256sum dist/* # inventory + hashes (compare vs teammates)
Then category-specific dispatch:
| Signal in triage | Skill to read |
|---|---|
ELF binary + remote nc host port |
ctf-pwn |
| Binary/bytecode, no remote, "find the input/key" | ctf-rev |
.py doing math, RSA params, ciphertext, n e c |
ctf-crypto |
| URL, web app, login form, source zip | ctf-web |
| pcap, disk/memory image, image/audio, "recover/investigate" | ctf-forensics |
| Text puzzle, sandbox/pyjail, esoteric language, OSINT | ctf-misc |
RPC URL, .sol, bytecode 0x..., wallet private key |
ctf-blockchain |
.apk, .ipa, mobile emulator mention |
ctf-mobile |
| Own service to defend, tick-based scoring, flags rotate | ctf-attack-defense |
| VM/IP range to root, HTB/THM box, scoreboard = root flags | ctf-boot2root |
| Unclear | run full triage on every file; ctf-forensics generics first |
Flag hunting
Search targets after each successful exploitation step — flags hide in cwd, /, env,
process memory, database dumps, HTTP responses, JWT claims, file metadata.
# generic: works on binaries, dumps, memory, strings of anything
grep -aohE '(flag|FLAG|ctf|CTF|picoCTF|HTB)\{[^}]{4,}\}' <target> | sort -u
grep -aohE '[a-zA-Z0-9_]{2,16}\{[^}]{4,}\}' <target> | sort -u # any XXX{...} wrapper
grep -arE 'flag' /proc/<pid>/environ 2>/dev/null; cat /flag* /home/*/flag* 2>/dev/null
find / -name '*flag*' -not -path '/proc/*' -not -path '/sys/*' 2>/dev/null
Event organizers publish the format in rules — record it in notes.md first.
Last resorts: 32-hex (grep -aohE '\b[0-9a-f]{32}\b'), base64 blobs that decode to
readable text, XOR-with-repeated-key of flag{ prefix.
work/<event>/flags.md format:
| time | challenge | flag | notes |
|---|---|---|---|
| 14:32 | pwn-ret2win | flag{n0_r3turn_n0_gl0ry} | ret2win, offset 44 |
Toolbox (router level)
| Tool | Install | Purpose |
|---|---|---|
.venv |
scripts/setup.sh |
pwntools, pycryptodome, gmpy2, sympy, requests... |
scripts/ctf |
included | run any command with .venv on PATH |
file, strings, xxd, openssl, 7z, nmap, gdb |
preinstalled | triage, hex, crypto, archives, scans, debugging |
podman |
preinstalled | isolation for untrusted binaries |
| binwalk / exiftool | sudo pacman -S binwalk perl-image-exiftool |
embedded blobs, metadata |
Deeper references in this skill
references/submission.md— CTFd and rCTF flag submission via curl, session handling.references/writeup.md— writeup template + event summary report.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.