2025年12月20日 星期六

Fortinet FortiCloud SSO 重大漏洞防護指南

 

🚨 【資安緊急通報】Fortinet FortiCloud SSO 重大漏洞防護指南

發佈日期: 2025/12/18
等級: CRITICAL (高危險)
CVE
編號: CVE-2025-59718 / 59719

 

1. 發生了什麼事? (Vulnerability Overview)

Fortinet 近期爆發重大安全漏洞,核心問題在於 SAML 訊息加密簽章驗證不當

  • 風險: 遠端攻擊者可偽造 SAML 訊息,在 「無需帳號密碼」 的情況下,直接取得設備的 最高管理權限 (super_admin)
  • 後果: 駭客登入後可立即匯出配置檔案(Config),竊取雜湊密碼進行離線破解。
  • 注意: 即使您未主動開啟,若曾透過 GUI 註冊 FortiCare 且未手動取消勾選,系統可能已自動開啟此功能。

2. 受影響版本與建議修補 (Fixed Versions)

請儘速檢查設備型號並透過官方路徑升級。官方升級路徑工具

(註:FortiOS 6.4FortiWeb 7.0/7.2 不受此漏洞影響)

產品線

受影響版本

建議修補版本 (及以上)

FortiOS

7.0.0 - 7.6.3

7.0.18+, 7.2.12+, 7.4.9+, 7.6.4+

FortiProxy

7.0.0 - 7.6.3

7.0.22+, 7.2.15+, 7.4.11+, 7.6.4+

FortiWeb

7.4.0 - 8.0.0

7.4.10+, 7.6.5+, 8.0.1+

FortiSwitchMgr

7.0.0 - 7.2.6

7.0.6+, 7.2.7+


3. 緊急防禦措施 (Mitigation)

若無法立即更新韌體,請務必執行以下「關閉 SSO」指令以阻斷攻擊來源。

🔹 方法 ACLI 指令(推薦,最快速)

請使用終端機連線至設備,並執行以下指令確認與關閉:

# 1. 檢查狀態 (若顯示 enable 代表有風險)

get system global | grep sso

# 2. 執行關閉指令

config system global

           set admin-forticloud-sso-login disable

end

🔹 方法 BGUI 圖形介面設定

  • 路徑: System (系統管理) → Settings (基本設定)
  • 動作: 找到 FortiCloud SSO 選項,將其切換為 關閉 (Off)

4. 安全強化與檢測 (Hardening & Forensics)

為防止類似攻擊並確保目前環境安全,建議執行以下加固作業:

  1. 限制管理存取 (Trusted Host)
    進入 System → Administrators,為所有管理員帳號設定「信任主機 (Trusted Host),僅允許特定 IP 來源登入。
  2. 縮小暴露面 (Interface Policy)
    針對 WAN IPsecVPN 等外部介面,取消勾選非必要的管理功能(如 HTTP, HTTPS, SSH)。
  3. 入侵檢查:
    檢查 Log 是否有不明 IP ( 199.247.x.x) 的管理員登入紀錄。若發現異常,請立即重設所有管理員密碼。
    ※參考資料:Arctic Wolf,可自己評估是否加入阻擋IP

5. 官方參考資料 (References)

為了確保資訊正確性,詳細技術細節與 IOC 情資請參閱以下官方公告:

·        官方升級路徑工具 https://docs.fortinet.com/upgrade-tool



 

2025年10月13日 星期一

🧭 如何匯出 Chrome 的瀏覽紀錄

 🧭 如何匯出 Chrome 的瀏覽紀錄

📁 步驟如下:

1️⃣ 找到檔案路徑
 👉 %LOCALAPPDATA%\Google\Chrome\User Data\Default\History

2️⃣ 下載工具
 🔗 DB Browser for SQLite v3.13.1

3️⃣ 開啟資料庫
 📂 使用 DB Browser for SQLite 開啟「History」這個檔案

4️⃣ 執行 SQL 查詢
 在「執行 SQL」分頁中輸入以下指令 👇

SELECT 
    urls.url,
    urls.title,
    datetime(urls.last_visit_time/1000000-11644473600,'unixepoch','localtime') AS last_visit_localtime,
    urls.visit_count
FROM urls
ORDER BY last_visit_localtime DESC;

5️⃣ 匯出結果
 ✅ 點選「儲存結果顯示」
 💾 選擇格式為 CSV,即可完成匯出。



2025年7月30日 星期三

什麼是 ICMP Type 13/14

 

什麼是 ICMP Type 13/14?

  • Type 13 (Timestamp Request):詢問目標主機的系統時間。

  • Type 14 (Timestamp Reply):目標主機回應它的系統時間。


資安風險在哪裡?

1. 設備資訊洩漏(系統時間/時區偵察)

  • 回應 Timestamp Request 時,會洩漏主機的系統時間。

  • 攻擊者可藉此判斷:

    • 系統時區 (timezone)

    • 系統時間是否正確(是否有 NTP 同步)

    • 作業系統類型(某些裝置回應格式不同,如 Windows/Linux)

  • 可作為進一步精準攻擊的「Fingerprinting」資料來源。

2. 橫向移動 / 偽裝偵測

  • 攻擊者在內網橫向掃描時,透過 timestamp 回應比對裝置回應特徵。

  • 某些設備型號會根據 Timestamp 回應的偏移值、格式而露餡。

  • 攻擊者可利用這些細節資訊,去偽裝掃描行為以避開 IDS/IPS 偵測。

3. 時間偏移攻擊 (Blind Data Injection)

  • 有些舊型設備或特殊系統若允許 Timestamp 封包,可被用來進行「時間偏移攻擊」。

  • 雖然較罕見,但針對特定工控環境或 legacy 系統,會利用這些 timestamp 封包去誤導系統時序處理。

4. 資安檢核的低掛果實 (Low Hanging Fruit)

  • 多數資安標準 (如 CIS Benchmarks、DISA STIG) 都建議關閉 ICMP Timestamp。

  • 攻擊者看到 ICMP Timestamp 還能回應的環境,往往會認為資安防護薄弱。


常見的資安規範建議:

  • CIS Benchmark (Windows/Linux) → 建議封鎖 ICMP Type 13/14。

  • DISA STIG (美國國防部安全技術實作指南) → 要求關閉 Timestamp 回應。

  • 台灣資安健診 (弱點掃描) → 某些掃描工具會將此列為「資訊洩漏」項目。

  • 攻擊工具 (如 Nmap、Hping3) → 會預設掃描 timestamp 來輔助 OS Fingerprinting。


實務建議:

  • 企業環境:除非有特定需求 (如診斷/測試用途),一律建議封鎖 ICMP Type 13/14。

  • 若要保留 ICMP Ping 功能 (Echo Type 8/0) → 仍可只封鎖 Type 13/14,不影響一般 ping 連線診斷。

使用方式:

  1. 右鍵 → 以系統管理員身份執行

  2. 封鎖/解封後可用 ping -n 1 -w 1 -4 <target> 測試是否還會有 timestamp 回應(可用 Wireshark 檢查封包Type)。

2024年5月14日 星期二

FortiGate_Email告警

※註1:在FortiOS6.4版本後,GUI已無『「電子郵件告警配置」!
※註2:有切vDom的話…每個vDom都要設一次config alertemail setting

《Step1:設定Email Server》

GUI:《系統管理》→《基本設定》
FGT201E # config system email-server
FGT201E (email-server) # set

type                                Use FortiGuard Message service or custom email server.
reply-to                           Reply-To email address.
server                              SMTP server IP address or hostname.
port                                 SMTP server port.
source-ip                        SMTP server IPv4 source IP.
source-ip6                      SMTP server IPv6 source IP.
authenticate                   Enable/disable authentication.
validate-server               Enable/disable validation of server certificate.
security                          Connection security used by the email server.
ssl-min-proto-version    Minimum supported protocol version for SSL/TLS connections (default is to follow system global setting).

FGT201E (email-server) # get
type                            : custom
reply-to                      : Infosecure-FGT201E@gmail.com
serve                          : notification.fortinet.net
port                           : 465
source-ip                   : 0.0.0.0
source-ip6                  : ::
authenticate                : disable
validate-server            : disable
security                        : smtps
ssl-min-proto-version  : default
FGT201E (email-server) #end


《Step2:電子郵件告警配置》

※GUI:《日誌與報表》→《電子郵件告警配置》

FGT201E # config alertemail setting

《※依「系統事件」寄送告警Mail》

FGT201E (setting) # set filter-mode category //與threshold擇一!
Category系統事件、Threshold威脅程度

FGT201E (setting) # set 
username        Name that appears in the From: field of alert emails (max. 36 characters).
mailto1            Email address to send alert email to (usually a system administrator) (max. 64 characters).
mailto2            Optional second email address to send alert email to (max. 64 characters).
mailto3            Optional third email address to send alert email to (max. 64 characters).
filter-mode       How to filter log messages that are sent to alert emails.
email-interval    Interval between sending alert emails (1 - 99999 min, default = 5).
IPS-logs            Enable/disable IPS logs in alert email.
firewall-authentication-failure-logs Enable/disable firewall authentication failure logs in alert email.
HA-log                Enable/disable HA logs in alert email.
IPsec-errors-logs    Enable/disable IPsec error logs in alert email.
FDS-update-logs     Enable/disable FortiGuard update logs in alert email.
PPP-errors-logs        Enable/disable PPP error logs in alert email.
sslvpn-authentication-errors-logs        Enable/disable SSL-VPN authentication error logs in alert email.
antivirus-logs                     Enable/disable antivirus logs in alert email.
webfilter-logs                        Enable/disable web filter logs in alert email.
configuration-changes-logs     Enable/disable configuration change logs in alert email.
violation-traffic-logs               Enable/disable violation traffic logs in alert email.
admin-login-logs                 Enable/disable administrator login/logout logs in alert email.
FDS-license-expiring-warning    Enable/disable FortiGuard license expiration warnings in alert email.
log-disk-usage-warning          Enable/disable disk usage warnings in alert email.
FSSO-disconnect-logs            Enable/disable logging of FSSO collector agent disconnect.
ssh-logs                               Enable/disable SSH logs in alert email.
FDS-license-expiring-days      Number of days to send alert email prior to FortiGuard license expiration (1 - 100 days, default = 100).
local-disk-usage                   Disk usage percentage at which to send alert email (1 - 99 percent, default = 75).

FGT201E (setting) # get
username            : Infosecure-FGT201E@gmail.com 
mailto1              : jimmy@infosecure.com.tw 
mailto2             
mailto3             
filter-mode          : category 
email-interval      : 5
IPS-logs            : enable 
firewall-authentication-failure-logs : disable 
HA-logs              : disable 
IPsec-errors-logs    : disable 
FDS-update-logs      : disable 
PPP-errors-logs      : disable 
sslvpn-authentication-errors-logs : disable 
antivirus-logs      : enable 
webfilter-logs      : disable 
configuration-changes-logs : enable 
violation-traffic-logs : disable 
admin-login-logs    : enable 
FDS-license-expiring-warning : disable 
log-disk-usage-warning : disable 
FSSO-disconnect-logs         : disable 
ssh-logs            : disable 
FDS-license-expiring-days : 15
local-disk-usage    : 75
FGT201E (setting) #


《※依「威脅程度」寄送告警Mail》

FGT201E (setting) # set filter-mode threshold //與category擇一!
※Category系統事件、Threshold威脅程度

FGT201E (setting) # set 
username                    Name that appears in the From: field of alert emails (max. 36 characters).
mailto1                             Email address to send alert email to (usually a system administrator)(max. 64 characters).
mailto2                              Optional second email address to send alert email to (max. 64 characters).
mailto3                              Optional third email address to send alert email to (max. 64 characters).
filter-mode                     How to filter log messages that are sent to alert emails.
emergency-interval      Emergency alert interval in minutes.
alert-interval                    Alert alert interval in minutes.
critical-interval                Critical alert interval in minutes.
error-interval                    Error alert interval in minutes.
warning-interval             Warning alert interval in minutes.
notification-interval       Notification alert interval in minutes.
information-interval      Information alert interval in minutes.
debug-interval                Debug alert interval in minutes.
severity                             Lowest severity level to log. (Default = alert)

FGT201E (setting) # set severity critical
FGT201E (setting) # get
username             : Infosecure-FGT201E@gmail.com
mailto1                 : jimmy@nextec.tw
mailto2                 :
mailto3                 :
filter-mode           : threshold
emergency-interval    : 1
alert-interval               : 2
critical-interval            : 3
error-interval               : 5
warning-interval          : 10
notification-interval    : 20
information-interval    : 30
debug-interval            : 60
severity                       : critical
FGT201E (setting) #


※測試指令!  diagnose log alertmail test


※參考文件1_FortiOS 6.2以前適用:
https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-configure-alert-email-settings/ta-p/194102

※參考文件2_FortiOS 6.4版後適用:
https://docs.fortinet.com/document/fortigate/7.4.3/administration-guide/526019/email-alerts

2023年5月26日 星期五

如何使用Console線連接網路設備

 常常會有身邊的人來詢問,如何連接網路設備的Console…

來幫大家整理一下。

《一、需要準備的硬體材料》
1、一部→筆電
2、一條→USB轉RS-232線(接口型式:USB-Type A ↔RS-232-9F公)
3、一條→RS-232線(接口型式:RS-232-9M母 ↔RJ-45) 

《二、需要準備的軟體》
1、Putty

《三、操作流程》
1、將USB轉RS-232線材,接上筆電後…在『裝置管理員』內,確認『連接埠COM&LPT』有無識別到此條線材,正常的話,會出現『Com3
※數字不一定是3有可能是其它數字→當你有正常看到數字時,代表,此線材已正確連接到筆電囉!若沒有看到Com,可能要安裝驅動程式。
2、下載『Putty』存放到桌面,並雙擊開啟。


※相關連接:
3、Cisco Console腳位定義(其它資訊可谷歌Cisco pinout)

★註:USB的有線網卡,只能拿去接『有線網路孔』,
雖然,絕大多數的Console Port也是RJ45的型式!
還是會有人誤會,把網路線接到Console Port!
但!絕對是無法設定的!



2023年5月25日 星期四

FortiGate不正常斷電

 

※FortiGate若不正常斷電,登入後會提你做
File System Check

在6.0版之前…只能等開機好後,在登入後,
按下「Reboot and check file system」
或是用CLI執行 execute disk 17

但是在6.2版以後,在『System』→『Setting』→『Start Up Setting』底下
有個不錯的選項『Auto file system check』勾選後(這選項,預設是沒勾選的)
就可以在不正常斷電後,開機自動先執行File System Check了!

至於到底執不執行File System Check有沒有差!
個人建議既然都發現問題了…
還是乖乖的檢查一下!


※參考文件: