-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
112 lines (97 loc) · 6.97 KB
/
Copy path.env.example
File metadata and controls
112 lines (97 loc) · 6.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# ════════════════════════════════════════════════
# Athena — 環境變數範本
# ════════════════════════════════════════════════
# 複製此檔為 .env 並填入實際值:
# cp .env.example .env
#
# 注意:.env 已被 .gitignore 排除,不會提交至 Git
# ════════════════════════════════════════════════
# LLM 後端模式
# ════════════════════════════════════════════════
# api_key — 使用 ANTHROPIC_API_KEY(標準 API Key)
# oauth — 使用 Claude Code OAuth(reuse `claude login`,需先執行 `claude login`)
# auto — 有 API Key 用 api_key,否則嘗試 OAuth,都沒有用 mock(預設)
LLM_BACKEND=auto
# ════════════════════════════════════════════════
# LLM API(至少需要一個,或使用 OAuth 模式)
# ════════════════════════════════════════════════
ANTHROPIC_API_KEY= # 主要(Claude)— 推薦
ANTHROPIC_AUTH_TOKEN= # Bearer token 認證(替代 API key,用於企業閘道/Vertex AI)
OPENAI_API_KEY= # 備用(GPT-4)
# ════════════════════════════════════════════════
# 執行引擎 — C2 Engine
# ════════════════════════════════════════════════
# Docker 網路注意事項:
# Docker Desktop (macOS/Windows): host.docker.internal
# WSL2 (Docker CE): 172.17.0.1 或 ip route | grep default | awk '{print $3}'
# 原生 Linux (Docker CE): 172.17.0.1
# 本機開發(無 Docker): localhost
C2_ENGINE_URL=http://localhost:8888
# 靶機 (agent) 用來 beacon 回 C2 engine 的外部 URL;留空時使用 C2_ENGINE_URL
# 例:WSL2 + VMware Bridged 環境下填 Windows 主機在靶機網段的 IP
# C2_AGENT_CALLBACK_URL=http://192.168.0.18:58888
C2_ENGINE_API_KEY= # C2 engine API key (change from default!)
MOCK_C2_ENGINE=true # true=使用 mock 資料, false=連接真實 C2 engine
# Execution engine: "ssh" (default) | "persistent_ssh" | "c2" | "mock"
# persistent_ssh = SSH session pool for multi-step post-exploitation (Phase D)
EXECUTION_ENGINE=ssh
PERSISTENT_SSH_SESSION_TIMEOUT_SEC=300
# Set to True to skip 30s C2 agent beacon wait (only relevant when EXECUTION_ENGINE=c2)
C2_MOCK_BEACON=False
# ════════════════════════════════════════════════
# 資料庫
# ════════════════════════════════════════════════
DATABASE_URL=sqlite:///backend/data/athena.db
# ════════════════════════════════════════════════
# 自動化模式
# ════════════════════════════════════════════════
AUTOMATION_MODE=semi_auto # manual | semi_auto
RISK_THRESHOLD=medium # low | medium | high | critical
# ════════════════════════════════════════════════
# 前端
# ════════════════════════════════════════════════
NEXT_PUBLIC_API_URL=http://localhost:58000/api
NEXT_PUBLIC_WS_URL=ws://localhost:58000/ws
# ════════════════════════════════════════════════
# 日誌
# ════════════════════════════════════════════════
LOG_LEVEL=INFO
# ════════════════════════════════════════════════
# Mock 模式(開發/測試用)
# ════════════════════════════════════════════════
MOCK_LLM=true # true=使用預錄回應, false=呼叫真實 LLM API
# MOCK_C2_ENGINE 見上方「執行引擎」區塊
# ════════════════════════════════════════════════
# Metasploit RPC (ADR-019)
# ════════════════════════════════════════════════
MSF_RPC_HOST=127.0.0.1
MSF_RPC_PORT=55553
MSF_RPC_USER=msf
MSF_RPC_PASSWORD=change_me
MSF_RPC_SSL=false
MOCK_METASPLOIT=true
# ════════════════════════════════════════════════
# 持久化探測(Persistence)
# ════════════════════════════════════════════════
# PERSISTENCE_ENABLED=false # Set to true to probe cron/systemd persistence vectors after SSH success
# ════════════════════════════════════════════════
# WinRM(Windows Remote Management)
# ════════════════════════════════════════════════
# WINRM_ENABLED=false # Set to true to enable real WinRM connections (requires pywinrm)
# WINRM_TIMEOUT_SEC=30 # WinRM connection timeout in seconds
# ════════════════════════════════════════════════
# 真實攻擊模式(打靶機時使用)
# ════════════════════════════════════════════════
# 取消以下註解並填入真實值:
#
# MOCK_LLM=false
# MOCK_C2_ENGINE=false
# ANTHROPIC_API_KEY=sk-ant-... # 真實 Claude API Key
# C2_ENGINE_URL=http://c2-engine:8888 # Docker 內部(docker compose 自動解析)
# C2_ENGINE_API_KEY=<your-c2-api-key>
#
# 流程:
# 1. docker compose up -d
# 2. SSH 憑證取得後 DirectSSHEngine 自動執行 MITRE techniques(預設)
# 3. POST /api/operations/{op_id}/targets — 新增靶機
# 4. POST /api/operations/{op_id}/ooda/trigger — 啟動 OODA 循環