<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# Implementing Ransomware Resilience Testing — API Reference

## Atomic Red Team

```bash
# List available tests for a technique
Invoke-AtomicTest T1490 -ShowDetailsBrief

# Execute specific test
Invoke-AtomicTest T1490 -TestNumbers 1

# Execute and get results
Invoke-AtomicTest T1490 -TestNumbers 1 -GetPrereqs

# Cleanup after test
Invoke-AtomicTest T1490 -TestNumbers 1 -Cleanup
```

## Caldera Adversary Emulation

```bash
# Start Caldera server
docker run -p 8888:8888 mitre/caldera:latest

# API: Create adversary profile
curl -X POST http://localhost:8888/api/v2/adversaries \
  -H "KEY: ADMIN123" \
  -d '{"name": "ransomware_sim", "description": "Ransomware TTP chain"}'
```

## Backup Recovery Testing

```bash
# Restic: List snapshots
restic -r /backup/repo snapshots

# Restore latest to temp
restic -r /backup/repo restore latest --target /tmp/recovery_test

# Verify restored files
restic -r /backup/repo check
```

## Key Parameters

| Parameter | Description | Example |
|-----------|-------------|---------|
| `rule_dir` | Sigma rules directory | `/opt/sigma/rules` |
| `backup_path` | Backup repository path | `/backup/repo` |
| `technique_id` | MITRE ATT&CK technique | `T1490` |
| `test_number` | Atomic test number | `1` |
