在區域網路中部署的專用感測器節點「RoamSwitch Sensor」
RoamSwitch Sensor 是放置在區域網路中的專用節點。它從裝置外部稽核同一區域網路內的 RoamSwitch 裝置(Mac / Linux Client / Server Edition)。它確認主機自我診斷原理上看不到的「從同一區域網路的其他裝置看是什麼樣子」(開放的連接埠、未經驗證而暴露的服務、橫向移動的立足點)。還具備區域網路裝置清冊與 ARP 欺騙偵測。
🛡️ 主動漏洞稽核(僅針對已配對端點)
分 4 個階段進行稽核。依序為全連接埠掃描、已知特徵診斷(Redis/dockerd/Memcached/MongoDB/Elasticsearch/CouchDB/Jenkins/VNC 的未驗證暴露、SMBv1 與未簽署、RDP 未強制 NLA、SMTP 開放中繼等)、通用 banner 取得,以及透過 nmap NSE 進行的補充診斷。完全不進行破壞性操作。執行在非標準連接埠上的服務(如 6380 連接埠的 Redis),也會根據連接埠最先傳送的內容或回應加以辨識,並用同樣的唯讀檢查進行檢查。
📋 掌握網路組成(主動 ARP 掃描)
透過 ARP 掃描找出區域網路上的裝置,將 IP、MAC、主機名稱、廠商、線上狀態、首次/最後偵測以及 IP 歷程彙整成清冊。可以為每台裝置自由填寫名稱、用途等。沒有備註的裝置會以「需確認」顯眼標出,可用於與裝置清冊核對。沒有 nmap 時,會退回只顯示與 Sensor 有過通訊的裝置的被動模式。
👁️ ARP 事件與「下一步操作」
提示新裝置的出現,以及已知 IP 的 MAC 變化(ARP 欺騙的跡象)。附帶發生時間、嚴重程度(致命~資訊)、判斷依據、相關裝置的身分,以及具體的確認步驟。閘道 IP 的 MAC 變化按「致命」處理。啟用選擇加入的被動擷取後,還能偵測從一台裝置發往多個 IP 的 ARP 請求(區域網路內偵察)。
🔎 掌握區域網路內其他裝置與可疑行為(僅偵測)
作為參考資訊,顯示 MAC 廠商與裝置分類、透過 mDNS/SSDP/DHCP/LLDP/WS-Discovery 自我宣告得出的機型辨識、對已知惡意 IP 和管理用連接埠的連線、殭屍網路化/參與 DDoS 的跡象(向大量目的地的連線)以及 DNS 通道/C2 的跡象。多數需要鏡像連接埠等被動擷取設定(選擇加入)。Sensor 不會阻斷通訊。擷取失敗與封包遺失會透過狀態顯示與通知告知。還會讀取帶 VLAN 標籤的訊框與 IPv6 通訊,並把看到的 VLAN ID 記入裝置清冊。
🔑 配對碼方式(Ed25519、固定 IP、憑證固定)
初始狀態下不信任任何對象。在裝置端輸入由 Sensor 操作員簽發的一次性配對碼(有效期 10 分鐘),並同時輸入 Sensor 的固定 IP 位址和 Sensor 畫面上顯示的憑證指紋。僅這一步操作就能建立雙向信任。公開金鑰會自動交換,因此無需事先知道。無需雲端註冊或建立帳號。
🔐 控制 API 防護(TLS 1.3、憑證固定、防重放)
與裝置之間的控制通訊(TCP 50543)使用 TLS 1.3(control.tls:off / optional(預設)/ required)。憑證為自我簽署,在裝置上固定畫面上顯示的指紋,不會自動取得。簽章為帶時間與 nonce 的 v2,會拒絕重放。暴力破解或簽章失敗會依 IP 鎖定。
🖥️ 可操作全部功能的 10 語言 TUI
在互動式 TUI 中,可以用 10 種語言操作 CLI 的所有子命令、常駐程式 IPC、所有設定鍵(設定編輯器、TLS 狀態與憑證重新產生、手動配對、通知測試)、收集器維運,以及所有事件畫面(包括被動監控、IoT 行為、可疑通訊、漏洞資訊)。CLI 提供日文和英文。稽核報告和匯出也可以用 10 種語言輸出。
📅 定期稽核與差異比對(可選擇啟用)
定期稽核已配對的終端,並顯示與上次的差異(新偵測、已解決、新開啟的連接埠)。預設停用。如果所有連接埠都看不到,則判定為「疑似無法連線」。會在稽核前後核對 MAC 位址,如果 IP 已轉移到其他裝置,則不進行稽核。其他子網路的終端,只有透過 schedule.allow_routed_endpoints 啟用後,才會在確認後進行稽核。
📣 通知與稽核證據(可選擇啟用)
可以將回歸、新裝置、ARP 欺騙等透過 Webhook 和 syslog(RFC 5424)發出通知。操作記錄在可偵測竄改的日誌(雜湊鏈)中,結果可匯出為 CSV、JSON、HTML。通知只會發往你設定的目的地,預設不傳送任何內容。偵測用資料每天取得,不包含裝置和稽核資料,可透過 updates.fetch_cve_map 停止。
🗂️ 彙總多個 Sensor(中央收集器,可選擇啟用)
針對多據點,內建了收集 Sensor 簽章摘要的中央收集器(預設停用)。提供各據點的儀表板和 CSV 輸出,還能偵測稽核日誌的截斷和回溯。只接受已註冊 Sensor 的簽章請求,沒有 TLS 就無法對區域網路外公開。
未納管的裝置也可以納入摘要(collector.send_unmanaged_devices,不包含通訊內容)。collector.send_unmanaged_audits(預設關閉)還會收集輕量稽核的結果(不包含橫幅和請求)。學習摘要只有數量,不傳送裝置名稱。
🚨 非法 DHCP 伺服器與 IPv6 路由器偵測(僅偵測)
每小時從隨機 MAC 傳送一個 DHCP(IPv6 為 DHCPv6)探測封包,並統計所有回應的伺服器(不會領取 IP 位址租約)。通知的內容包括:後來新增的伺服器、發放與正常不同的閘道或 DNS 的伺服器、由 IPv4 閘道以外發出的 IPv6 路由器通告、IPv6 位址持有者的更替(NDP 欺騙),以及在 IPv4 中看不到、只在 IPv6 中可見的裝置。裝置台帳也支援 IPv6 位址。Sensor 不會阻斷通訊。
🔎 未部署 RoamSwitch 裝置的輕量稽核(可選擇啟用,僅連線檢查)
只在你允許的範圍內檢查未配對的印表機、攝影機、NAS 等。只做連線確認和讀取服務自行傳送的識別資訊,不登入,也不利用漏洞。需要核准者記錄和範圍設定,每次執行都會記入稽核日誌。透過另一個選擇啟用的選項(預設關閉),還可以選擇確認是否為 KEV 收錄產品,以及向 Redis 等傳送一個讀取請求的免認證確認。不會寫入、傳送密碼或猜測密碼。
🔒 遺失、被竊或報廢時的撤銷與鎖定
在收集器中撤銷後,該 Sensor 會在下次上傳時自行停止,停止配對、稽核、上傳和通知(重新啟動後仍保持停止)。還可以設定為清除金鑰和儲存的資料、在長期無法連線至收集器時自動停止,也提供用於報廢的指令。同時會顯示曾與其配對的裝置清單和解除配對的方法。
🔌 供其他工具讀取的唯讀區域網路全景檢視
以 JSON 回傳整個區域網路的狀態(裝置數、VLAN、威脅數量等)和威脅清單(roamswitch-sensor lan-overview --json / network-threats --json)。只讀取,不阻斷,也不變更設定。供 Linux 的 MCP 工具(get_lan_sensor_overview / get_lan_network_threats)和 PersonalSOC 使用。如果有看不到的範圍,即使結果為 0 筆,也會附上說明。
如果還要防範針對 Sensor 本身的攻擊,建議在同一台機器上另外安裝 RoamSwitch for Linux 的 Server Edition。兩者可以作為獨立的處理程序共存。
稽核報告輸出範例
這是透過 roamswitch-sensor export all --format html(TUI 中為 e 鍵)匯出的報告範例。它是單一 HTML 檔案,以瀏覽器開啟後選擇「另存為 PDF」即可得到可提交給稽核人員的 PDF。
RoamSwitch Sensor 稽核報告
| 建立時間 | 2026年9月20日(日) 11:30:12 (UTC+9) |
|---|---|
| 據點 | 總部 3 樓伺服器機房 |
| Sensor 公開金鑰 | +kbYCoN5jJSykTAr8zDv/VCs2SdBcrwYbkCrzCRgsLM= |
| 稽核日誌 | 完整性驗證:正常(未遭竄改),18 筆,head #18 771a265c58fa2f0a8990bc6be79ff5259d96a76a0a3fea472f308df02eaa087f |
各裝置最新稽核結果
| 裝置 | 位址 | 執行時間 | 偵測 | 開放連接埠 |
|---|---|---|---|---|
| web-prod-01 | 192.168.20.21 | 2026年9月20日(日) 11:00:43 (UTC+9) | 1 項 | 2 |
| db-prod-01 | 192.168.20.22 | 2026年9月20日(日) 11:01:14 (UTC+9) | 2 項 | 3 |
| dev-laptop-07 | 192.168.20.35 | 2026年9月20日(日) 11:02:07 (UTC+9) | 無問題 | 1 |
偵測事項
| 時間 | 裝置 | 連接埠 | 描述 | 建議處置 |
|---|---|---|---|---|
| 2026年9月20日(日) 11:01:14 (UTC+9) | db-prod-01 | 22 | SSH 版本橫幅公開 此 SSH 伺服器在連線時會公開版本橫幅。橫幅本身屬正常行為,但會成為攻擊者縮小已知弱點範圍的線索。 | 請將 SSH 更新至最新版本,並視需要精簡橫幅內容。 |
| 2026年9月20日(日) 11:01:14 (UTC+9) | db-prod-01 | 6379 | 已知弱點:CVE-2021-32626 (Redis) NVD 說明(英文原文):Redis is an open source, in-memory database that persists on disk. In affected versions specially crafted Lua scripts executing in Redis can cause the heap-based Lua stack to be overflowed, due to incomplete checks for this condition. This can result with heap corruption and potentially remote code execution. This problem exists in all versions of Redis with Lua scripting support, starting from 2.6. The problem is fixed in versions 6.2.6, 6.0.16 and 5.0.14. | 請盡快將 Redis 升級至不受 CVE-2021-32626 影響的版本,在此之前請限制未經驗證的網路存取。 |
| 2026年9月20日(日) 11:00:43 (UTC+9) | web-prod-01 | 22 | SSH 版本橫幅公開 此 SSH 伺服器在連線時會公開版本橫幅。橫幅本身屬正常行為,但會成為攻擊者縮小已知弱點範圍的線索。 | 請將 SSH 更新至最新版本,並視需要精簡橫幅內容。 |
| 2026年9月19日(土) 17:33:18 (UTC+9) | db-prod-01 | 22 | SSH 版本橫幅公開 此 SSH 伺服器在連線時會公開版本橫幅。橫幅本身屬正常行為,但會成為攻擊者縮小已知弱點範圍的線索。 | 請將 SSH 更新至最新版本,並視需要精簡橫幅內容。 |
裝置清冊(在區域網路中觀測到的所有裝置)
| MAC | IP | 主機名稱 | 廠商 | RoamSwitch 管理 | 備註 |
|---|---|---|---|---|---|
| 00:1b:8b:3c:9a:07 | 192.168.20.1 | _gateway | NEC Platforms | 未管理 | 總部閘道路由器 |
| 7c:8b:ca:61:d2:4e | 192.168.20.2 | TP-Link Technologies | 未管理 | 3 樓 Wi-Fi 存取點 | |
| e4:e7:49:2b:70:c1 | 192.168.20.3 | Hewlett Packard | 未管理 | 2 樓多功能事務機 | |
| 90:61:ae:17:4d:e2 | 192.168.20.21 | Intel Corporate | 已管理 | 正式環境 Web 伺服器 | |
| 90:61:ae:17:4d:f9 | 192.168.20.22 | Intel Corporate | 已管理 | 正式環境資料庫伺服器 | |
| 04:20:9a:cc:31:8f | 192.168.20.31 | sensor-hq-01 | Panasonic AVC Networks Company | 未管理 | RoamSwitch-Sensor |
| a0:c9:a0:5e:83:2b | 192.168.20.35 | Murata Manufacturing | 已管理 | 開發用筆記型電腦 | |
| 8e:0f:95:a2:64:5d | 192.168.20.44 | 未管理 | |||
| 5e:e2:59:1d:c8:03 | 192.168.20.45 | 未管理 | |||
| a8:3b:76:9c:20:e4 | 192.168.20.52 | Cloud Network Technology Singapore PTE. | 未管理 |
操作與核准日誌
| # | 時間 | 執行者 | 操作 | 適用對象 | 詳細資料 |
|---|---|---|---|---|---|
| 18 | 2026年9月20日(日) 11:02:07 (UTC+9) | scheduler | audit_completed | dev-laptop-07 (Q9mW3sLp0xVc) | trigger=scheduled host=192.168.20.35 findings=0 open_ports=1 new_findings=0 resolved_findings=0 |
| 17 | 2026年9月20日(日) 11:02:05 (UTC+9) | scheduler | audit_started | dev-laptop-07 (Q9mW3sLp0xVc) | host=192.168.20.35 |
| 16 | 2026年9月20日(日) 11:01:14 (UTC+9) | scheduler | audit_completed | db-prod-01 (Zt4Kb8NwY1eR) | trigger=scheduled host=192.168.20.22 findings=2 open_ports=3 new_findings=1 resolved_findings=0 |
| 15 | 2026年9月20日(日) 11:01:12 (UTC+9) | scheduler | audit_started | db-prod-01 (Zt4Kb8NwY1eR) | host=192.168.20.22 |
| 14 | 2026年9月20日(日) 11:00:43 (UTC+9) | scheduler | audit_completed | web-prod-01 (Xk3F9aLm2QzB) | trigger=scheduled host=192.168.20.21 findings=1 open_ports=2 new_findings=1 resolved_findings=0 |
| 13 | 2026年9月20日(日) 11:00:41 (UTC+9) | scheduler | audit_started | web-prod-01 (Xk3F9aLm2QzB) | host=192.168.20.21 |
| 12 | 2026年9月19日(土) 18:11:40 (UTC+9) | cli:uid=1000 | config_changed | schedule.window_end_hour | value=5 |
| 11 | 2026年9月19日(土) 18:11:32 (UTC+9) | cli:uid=1000 | config_changed | schedule.window_start_hour | value=1 |
| 10 | 2026年9月19日(土) 18:10:02 (UTC+9) | cli:uid=1000 | config_changed | schedule.enabled | value=true |
| 9 | 2026年9月19日(土) 17:47:19 (UTC+9) | control_api: | pair | dev-laptop-07 (Q9mW3sLp0xVc) | endpoint redeemed an operator-issued pairing code and was added to the audit scope |
| 8 | 2026年9月19日(土) 17:46:52 (UTC+9) | cli:uid=1000 | pairing_code_issued | single-use, valid 10 minutes | |
| 7 | 2026年9月19日(土) 17:33:18 (UTC+9) | cli:uid=1000 | audit_completed | db-prod-01 (Zt4Kb8NwY1eR) | trigger=manual host=192.168.20.22 findings=1 open_ports=2 new_findings=1 resolved_findings=0 |
| 6 | 2026年9月19日(土) 17:33:15 (UTC+9) | cli:uid=1000 | audit_started | db-prod-01 (Zt4Kb8NwY1eR) | manual audit; host=192.168.20.22 |
| 5 | 2026年9月19日(土) 17:31:07 (UTC+9) | control_api: | pair | db-prod-01 (Zt4Kb8NwY1eR) | endpoint redeemed an operator-issued pairing code and was added to the audit scope |
| 4 | 2026年9月19日(土) 17:30:41 (UTC+9) | cli:uid=1000 | pairing_code_issued | single-use, valid 10 minutes | |
| 3 | 2026年9月19日(土) 17:12:26 (UTC+9) | control_api: | pair | web-prod-01 (Xk3F9aLm2QzB) | endpoint redeemed an operator-issued pairing code and was added to the audit scope |
| 2 | 2026年9月19日(土) 17:11:58 (UTC+9) | cli:uid=1000 | pairing_code_issued | single-use, valid 10 minutes | |
| 1 | 2026年9月19日(土) 17:00:03 (UTC+9) | daemon | daemon_started | version 0.3.4 |
RoamSwitch Sensor Audit Report
| Generated | Sun, 2026-09-20 02:30:12 (UTC) |
|---|---|
| Site | HQ – 3F server room |
| Sensor public key | +kbYCoN5jJSykTAr8zDv/VCs2SdBcrwYbkCrzCRgsLM= |
| Audit log | Integrity check: OK (no tampering detected) — 18 entries, head #18 771a265c58fa2f0a8990bc6be79ff5259d96a76a0a3fea472f308df02eaa087f |
Latest audit per endpoint
| Endpoint | Address | Timestamp | Findings | Open ports |
|---|---|---|---|---|
| web-prod-01 | 192.168.20.21 | Sun, 2026-09-20 02:00:43 (UTC) | 1 finding(s) | 2 |
| db-prod-01 | 192.168.20.22 | Sun, 2026-09-20 02:01:14 (UTC) | 2 finding(s) | 3 |
| dev-laptop-07 | 192.168.20.35 | Sun, 2026-09-20 02:02:07 (UTC) | clean | 1 |
Findings
| When | Endpoint | Port | Finding | Recommendation |
|---|---|---|---|---|
| Sun, 2026-09-20 02:01:14 (UTC) | db-prod-01 | 22 | SSH Version Banner Disclosed This SSH server discloses its version banner on connect. This is normal SSH behavior, but the banner gives an attacker a starting point to look up known vulnerabilities for that version. | Keep SSH updated to the latest version, and minimize the banner's detail if your SSH implementation allows it. |
| Sun, 2026-09-20 02:01:14 (UTC) | db-prod-01 | 6379 | Known Vulnerability: CVE-2021-32626 (Redis) Redis is an open source, in-memory database that persists on disk. In affected versions specially crafted Lua scripts executing in Redis can cause the heap-based Lua stack to be overflowed, due to incomplete checks for this condition. This can result with heap corruption and potentially remote code execution. This problem exists in all versions of Redis with Lua scripting support, starting from 2.6. The problem is fixed in versions 6.2.6, 6.0.16 and 5.0.14. | Upgrade Redis to a version not affected by CVE-2021-32626 as soon as possible, and restrict unauthenticated network access to it in the meantime. |
| Sun, 2026-09-20 02:00:43 (UTC) | web-prod-01 | 22 | SSH Version Banner Disclosed This SSH server discloses its version banner on connect. This is normal SSH behavior, but the banner gives an attacker a starting point to look up known vulnerabilities for that version. | Keep SSH updated to the latest version, and minimize the banner's detail if your SSH implementation allows it. |
| Sat, 2026-09-19 08:33:18 (UTC) | db-prod-01 | 22 | SSH Version Banner Disclosed This SSH server discloses its version banner on connect. This is normal SSH behavior, but the banner gives an attacker a starting point to look up known vulnerabilities for that version. | Keep SSH updated to the latest version, and minimize the banner's detail if your SSH implementation allows it. |
Device inventory (every device observed on the LAN)
| MAC | IP | Hostname | Vendor | Managed | Note |
|---|---|---|---|---|---|
| 00:1b:8b:3c:9a:07 | 192.168.20.1 | _gateway | NEC Platforms | no | HQ gateway router |
| 7c:8b:ca:61:d2:4e | 192.168.20.2 | TP-Link Technologies | no | 3F Wi-Fi access point | |
| e4:e7:49:2b:70:c1 | 192.168.20.3 | Hewlett Packard | no | 2F multifunction printer | |
| 90:61:ae:17:4d:e2 | 192.168.20.21 | Intel Corporate | yes | Production web server | |
| 90:61:ae:17:4d:f9 | 192.168.20.22 | Intel Corporate | yes | Production database server | |
| 04:20:9a:cc:31:8f | 192.168.20.31 | sensor-hq-01 | Panasonic AVC Networks Company | no | RoamSwitch-Sensor |
| a0:c9:a0:5e:83:2b | 192.168.20.35 | Murata Manufacturing | yes | Development laptop | |
| 8e:0f:95:a2:64:5d | 192.168.20.44 | no | |||
| 5e:e2:59:1d:c8:03 | 192.168.20.45 | no | |||
| a8:3b:76:9c:20:e4 | 192.168.20.52 | Cloud Network Technology Singapore PTE. | no |
Operation & approval log
| # | When | Actor | Action | Target | Detail |
|---|---|---|---|---|---|
| 18 | Sun, 2026-09-20 02:02:07 (UTC) | scheduler | audit_completed | dev-laptop-07 (Q9mW3sLp0xVc) | trigger=scheduled host=192.168.20.35 findings=0 open_ports=1 new_findings=0 resolved_findings=0 |
| 17 | Sun, 2026-09-20 02:02:05 (UTC) | scheduler | audit_started | dev-laptop-07 (Q9mW3sLp0xVc) | host=192.168.20.35 |
| 16 | Sun, 2026-09-20 02:01:14 (UTC) | scheduler | audit_completed | db-prod-01 (Zt4Kb8NwY1eR) | trigger=scheduled host=192.168.20.22 findings=2 open_ports=3 new_findings=1 resolved_findings=0 |
| 15 | Sun, 2026-09-20 02:01:12 (UTC) | scheduler | audit_started | db-prod-01 (Zt4Kb8NwY1eR) | host=192.168.20.22 |
| 14 | Sun, 2026-09-20 02:00:43 (UTC) | scheduler | audit_completed | web-prod-01 (Xk3F9aLm2QzB) | trigger=scheduled host=192.168.20.21 findings=1 open_ports=2 new_findings=1 resolved_findings=0 |
| 13 | Sun, 2026-09-20 02:00:41 (UTC) | scheduler | audit_started | web-prod-01 (Xk3F9aLm2QzB) | host=192.168.20.21 |
| 12 | Sat, 2026-09-19 09:11:40 (UTC) | cli:uid=1000 | config_changed | schedule.window_end_hour | value=5 |
| 11 | Sat, 2026-09-19 09:11:32 (UTC) | cli:uid=1000 | config_changed | schedule.window_start_hour | value=1 |
| 10 | Sat, 2026-09-19 09:10:02 (UTC) | cli:uid=1000 | config_changed | schedule.enabled | value=true |
| 9 | Sat, 2026-09-19 08:47:19 (UTC) | control_api: | pair | dev-laptop-07 (Q9mW3sLp0xVc) | endpoint redeemed an operator-issued pairing code and was added to the audit scope |
| 8 | Sat, 2026-09-19 08:46:52 (UTC) | cli:uid=1000 | pairing_code_issued | single-use, valid 10 minutes | |
| 7 | Sat, 2026-09-19 08:33:18 (UTC) | cli:uid=1000 | audit_completed | db-prod-01 (Zt4Kb8NwY1eR) | trigger=manual host=192.168.20.22 findings=1 open_ports=2 new_findings=1 resolved_findings=0 |
| 6 | Sat, 2026-09-19 08:33:15 (UTC) | cli:uid=1000 | audit_started | db-prod-01 (Zt4Kb8NwY1eR) | manual audit; host=192.168.20.22 |
| 5 | Sat, 2026-09-19 08:31:07 (UTC) | control_api: | pair | db-prod-01 (Zt4Kb8NwY1eR) | endpoint redeemed an operator-issued pairing code and was added to the audit scope |
| 4 | Sat, 2026-09-19 08:30:41 (UTC) | cli:uid=1000 | pairing_code_issued | single-use, valid 10 minutes | |
| 3 | Sat, 2026-09-19 08:12:26 (UTC) | control_api: | pair | web-prod-01 (Xk3F9aLm2QzB) | endpoint redeemed an operator-issued pairing code and was added to the audit scope |
| 2 | Sat, 2026-09-19 08:11:58 (UTC) | cli:uid=1000 | pairing_code_issued | single-use, valid 10 minutes | |
| 1 | Sat, 2026-09-19 08:00:03 (UTC) | daemon | daemon_started | version 0.3.4 |
所列的機器名稱、MAC 位址、IP 位址和公開金鑰均為虛構。報告內文可以用顯示語言(10 種語言)輸出。這裡提供日文版和英文版的範例(日文以外的顯示語言下,為英文版)。