# Kali 112 整合狀態與更新紀錄 | 項目 | 內容 | |------|------| | 日期 | 2026-05-13;最新只讀快照 2026-06-04 08:55(台北) | | Host | `192.168.0.112` | | Asset key | `host:kali-112` | | 狀態 | `partial_runtime_health_integrated` | | 模式 | `observe_only` | | Snapshot | `docs/security/kali-integration-status.snapshot.json` | | Schema | `docs/schemas/kali_integration_status_v1.schema.json` | | Maintenance window draft | `docs/security/KALI-112-MAINTENANCE-WINDOW-DRAFT.md` | ## 0. 核心結論 Kali 主機不是只有文件預留;`192.168.0.112` 目前已經有 live runtime: - `kali-scanner.service` 已啟用並正在執行。 - `http://192.168.0.112:8080/health` 回傳 healthy。 - `node-exporter` container 正在運作。 - `192.168.0.120` 與 `192.168.0.121` 正持續打 `/health`。 - Kali crontab 已有 port monitor、code security scan、Harbor image scan。 但它還沒有完成「資安網閉環」整合:Kali scan result 尚未正式寫入 AWOOOI asset / compliance 表,也尚未 mirror 成 AwoooP Runtime State、Channel Event 或 Audit evidence。因此目前判定是「健康與基礎掃描已存在,治理閉環尚未接通」。 ## 0.1 2026-06-04 只讀實機快照 本輪用既有 SSH key 完成 read-only 連線檢查,沒有輸入或保存密碼,沒有啟動 scan、沒有呼叫 `/execute`、沒有執行 `apt update` / package update、沒有調整設定、沒有重啟。 | 項目 | 結果 | |------|------| | 觀測時間 | `2026-06-04T08:55:43+08:00` | | Collection mode | `ssh_batch_read_only_existing_key` | | Hostname | `kali` | | OS | `Kali GNU/Linux Rolling` | | Kernel | `Linux 6.16.8+kali-amd64` | | Uptime | `up 3 weeks, 5 days, 4 hours, 48 minutes` | | Load 1/5/15 | `0.15 0.20 0.18` | | Memory | `921Mi/7.8Gi` | | Root disk | `19G/79G 26%` | | Scanner service | `active / enabled` | | Scanner API health | `127.0.0.1:8080/health` 回 `200 healthy` | | Docker services | `node-exporter` up 4 weeks、`wg-easy` up 4 weeks healthy | | Failed systemd units | `1`(`networking.service`) | | Upgradable packages | `1994` | | Listening TCP / UDP | `7 / 2` | | Reboot required | `false` | | Scanner service hardening | `0 / 4`(`NoNewPrivileges`、`PrivateTmp`、`ProtectSystem`、`ProtectHome` 尚未啟用) | 結論:Kali `192.168.0.112` 今天仍可被 IwoooS 以只讀方式納入證據鏈,scanner runtime 健康也有實機證據;但 `networking.service` failed、`upgradable_package_count=1994` 與服務硬化缺口代表後續仍需要維護窗口、rollback / reboot gate、hardening dry-run 與人工批准,不能直接把「可連線」解讀為主機更新、掃描或調校已完成。 ## 0.1.1 2026-06-04 P1-7 維護窗口草案 已新增 `docs/security/KALI-112-MAINTENANCE-WINDOW-DRAFT.md` 與 `docs/security/kali-112-maintenance-window-draft.snapshot.json`,把 1994 個待更新套件、`networking.service` failed、scanner service hardening `0 / 4`、rollback owner、post-check owner 與維護後驗證指標整理成 owner / reviewer 可審的 handoff package。 這是 maintenance window readiness,不是 maintenance approval。`host_update_authorized=false`、`service_restart_authorized=false`、`hardening_authorized=false`、`reboot_authorized=false`、`active_scan_authorized=false`、`execute_endpoint_authorized=false` 全部維持不變。 ## 0.2 2026-05-31 只讀實機快照 本輪用既有 SSH key 完成 read-only 連線檢查,沒有輸入或保存密碼,沒有啟動 scan、沒有呼叫 `/execute`、沒有執行 package update、沒有調整設定、沒有重啟。 | 項目 | 結果 | |------|------| | 觀測時間 | `2026-05-31T17:22:20+08:00` | | Collection mode | `ssh_batch_read_only_existing_key` | | Hostname | `kali` | | OS | `Kali GNU/Linux Rolling` | | Kernel | `Linux 6.16.8+kali-amd64` | | Uptime | `up 3 weeks, 1 day, 21 hours, 58 minutes` | | Load 1/5/15 | `0.09 0.12 0.15` | | Memory | `885Mi/7.8Gi` | | Root disk | `19G/79G 26%` | | Failed systemd units | `1` | | Upgradable packages | `1994` | | Listening TCP / UDP | `7 / 2` | 結論:Kali `192.168.0.112` 已可被 IwoooS 以只讀方式納入證據鏈;但 `failed_systemd_unit_count=1` 與 `upgradable_package_count=1994` 代表後續仍需要維護窗口、rollback / reboot gate 與人工批准,不能直接把「可連線」解讀為已完成主機調校或安全更新。 ## 1. 已確認的 live 狀態 | 項目 | 結果 | |------|------| | SSH 授權登入 | 成功 | | OS | Kali GNU/Linux Rolling | | Hostname | `kali` | | IP | `192.168.0.112/24` | | Uptime | 約 6 天 | | Disk | `/` 79G,使用約 26% | | Memory | 7.8GiB,available 約 7.1GiB | | Scanner API | `0.0.0.0:8080` | | Scanner API health | `{"status":"healthy","version":"1.0.0","hostname":"kali"}` | | Scanner service | `kali-scanner.service` active / enabled | | Docker services | `node-exporter`、`wg-easy` active | | Node exporter | container up,port `9100` | | WireGuard UI | `wg-easy` healthy,ports `51820/udp`、`51821/tcp` | | Reboot required | 否 | ## 2. 已存在的 scanner 能力 Kali Scanner API 目前提供: | Endpoint | 用途 | 初期處理 | |----------|------|----------| | `/health` | health check | 可由 Prometheus / blackbox / AwoooP mirror | | `/scan` | 啟動 scan | 必須先有 scope approval | | `/scan/{scan_id}` | 讀取 scan result | 只能讀 redacted finding | | `/scans` | 列出 in-memory scans | 只能 read-only | | `/execute` | 直接執行 shell command | 高風險,AwoooP 不得直接呼叫 | 支援工具包含 `nmap`、`nikto`、`nuclei`、`trivy`、`sslyze`、`lynis`。本輪沒有啟動任何 scan。 ## 3. 本輪已做的更新與調校 | 類型 | 動作 | |------|------| | apt metadata | 已執行 `apt-get update` | | scanner 套件 | 更新 `nmap`、`nmap-common`、`nikto`、`nuclei` | | 基礎連線套件 | 更新 `ca-certificates`、`curl`、`openssl` | | 解析工具 | 安裝 `jq` | | 時區 | 從 `America/New_York` 調整為 `Asia/Taipei` | | 驗證 | 更新後 `/health` healthy,`ssh` / `cron` / `docker` / `kali-scanner` active | 更新後版本: | 工具 | 版本 | |------|------| | Nmap | `7.99` | | Nikto | `2.6.0` | | Nuclei | `v3.8.0` | | curl | `8.19.0` | | OpenSSL | `3.6.2` | | jq | `1.8.1` | ## 4. 仍未完成的整合 | 缺口 | 影響 | 下一步 | |------|------|--------| | 尚未確認 AWOOOI API 有正式 Kali result ingestion endpoint | scan result 不能成為資安飛輪 evidence | 建立 redacted `security_finding_v1` ingestion contract | | scan result 仍在 API in-memory 或本機 log | 重啟後可能失去 scan 查詢狀態 | 將 scan run metadata / finding summary 寫入 AWOOOI | | AwoooP runtime 尚未 mirror Kali findings | Operator Console 看不到完整資安 posture | 先 mirror health / gap evidence,再接 findings | | scan scope approval package 已完成草案但尚未批准 | scope 已可 review,但不能執行 scan | 依 `docs/security/KALI-SCAN-SCOPE-APPROVAL-PACKAGE.md` 逐 gate 批准 | | `/execute` endpoint 存在 | 若 runtime 直接接入會變成高風險 remote command path | 預設禁用或拆成 approval-only path | | API key fallback 存在於原始碼 | secret hygiene 風險 | 移除 fallback、確認 `.env` secret source、輪替;不得寫出 secret value | | `kali-scanner.service` 尚未套 systemd hardening | service blast radius 較大 | 先設計 dry-run hardening override,不直接套用 | | Harbor image scan 近期失敗 | 容器漏洞掃描 evidence 不可靠 | 修正 Harbor target/project/auth/cert chain | | full rolling upgrade 尚未執行 | 仍有大量套件可升級 | 需維護窗口、rollback、reboot gate | ## 5. 本輪刻意沒有做 1. 沒有啟動任何 active scan。 2. 沒有做 credentialed scan。 3. 沒有呼叫 `/execute`。 4. 沒有修改 firewall、NetworkPolicy、RBAC、route。 5. 沒有做 full-upgrade、autoremove 或 reboot。 6. 沒有記錄任何 API key、密碼或 secret value。 ## 6. AwoooP 消費方式 AwoooP 現階段只能 mirror `kali_integration_status_v1`: 1. 顯示 Kali health 與整合缺口。 2. 將 `/execute`、API key fallback、Harbor scan failure 標成 review item。 3. 針對 active scan、credentialed scan、full-upgrade、reboot 建立 approval candidate。 4. 不新增任何直接執行掃描或 command 的按鈕。 5. 讀取 `docs/security/SECURITY-APPROVAL-QUEUE.md` 的 review order,優先處理 redacted finding ingestion 與 safe web crawl。 ## 7. 下一個 gate 1. 取得 `KALI-SCAN-SCOPE-APPROVAL-PACKAGE.md` 中 safe crawl、credentialed scan、runtime ingestion、full-upgrade / reboot 等 gate 的人工批准。 2. 未來批准後,再建立 `security_finding_v1` ingestion endpoint 或 adapter,先只接 redacted finding。 3. 把 `/execute` endpoint 降級為預設停用或單獨 high-risk approval path。 4. 修正 Harbor image scan 的 target / project / auth / certificate chain。 5. 依 `KALI-112-MAINTENANCE-WINDOW-DRAFT.md` 收 owner response、rollback owner、validation owner 與維護窗口;未驗收前不做 full-upgrade、restart、hardening、autoremove、reboot 或健康複驗。