ctf ai ml

Data Community

Skill notes

Prerequisites

Python packages (all platforms): Linux (apt): macOS (Homebrew):

Additional Resources

model-attacks.md - Model weight perturbation negation, model inversion via gradient descent, neural network encoder collision, LoRA adapter weight merging, model extraction via query API, membership inference attack adversarial-ml.md - Adversarial example generation (FGSM, PGD, C&W), adversarial patch generation, evasion attacks on ML classifiers, data poisoning, backdoor detection in neural networks

When to Pivot

If the challenge becomes pure math, lattice reduction, or number theory with no ML component, switch to /ctf-crypto. If the task is reverse engineering a compiled ML model binary (ONNX loader, TensorRT engine, custom inference binary), switch to /ctf-reverse. If the challenge is a game or puzzle that merely uses ML as a wrapper (e.g., Python jail inside a chatbot), switch to /ctf-misc.

Model Weight Analysis

Weight perturbation negation: Fine-tuned model suppresses behavior; recover by computing 2*W_orig - W_chal to negate the fine-tuning delta. See model-attacks.md. LoRA adapter merging: Merge LoRA adapter W_base + alpha * (B @ A) and inspect activations or generate output with merged weights. See model-attacks.md. Model inversion: Optimize random input tensor to minimize distance between model output and known target via gradient descent. See model-attacks.md.

Adversarial Examples

FGSM: Single-step attack: x_adv = x + eps * sign(grad_x(loss)). Fast but less effective than iterative methods. See adversarial-ml.md. PGD: Iterative FGSM with projection back to epsilon-ball each step. Standard benchmark attack. See adversarial-ml.md. C&W: Optimization-based attack that minimizes perturbation norm while achieving misclassification. See adversarial-ml.md. Adversarial patches: Physical-world patches that cause misclassification when placed in a scene. See adversarial-ml.md.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Data
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
94 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@ljagiello · MIT
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux
Runtime requirements
Python
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview ctf-ai-ml.preview
# Adversarial Examples

- **FGSM:** Single-step attack: `x_adv = x + eps * sign(grad_x(loss))`. Fast but less effective than iterative methods. See [adversarial-ml.md](adversarial-ml.md#adversarial-example-generation-fgsm-pgd-cw).
- **PGD:** Iterative FGSM with projection back to epsilon-ball each step. Standard benchmark attack. See [adversarial-ml.md](adversarial-ml.md#adversarial-example-generation-fgsm-pgd-cw).
- **C&W:** Optimization-based attack that minimizes perturbation norm while achieving misclassification. See [adversarial-ml.md](adversarial-ml.md#adversarial-example-generation-fgsm-pgd-cw).
- **Adversarial patches:** Physical-world patches that cause misclassification when placed in a scene. See [adversarial-ml.md](adversarial-ml.md#adversarial-patch-generation).
- **Data poisoning:** Injecting backdoor triggers into training data so model learns attacker-chosen behavior. See [adversarial-ml.md](adversarial-ml.md#data-poisoning-foundational).

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.