2025年8月29日 星期五

[研究]製作可編輯的 .pdf (用 wkhtmltopdf.exe)

[研究]製作可編輯的 .pdf (用 wkhtmltopdf.exe)

2025-08-20

原理

  • AcroForm (Adobe Acrobat Form) 是 Adobe 在 PDF 1.2 規格就引入的「互動式表單」功能。
  • 它不是把文字打在 PDF 上,而是在 PDF 裡嵌入一種「欄位物件 (field object)」,讀者可在支援的 PDF 閱讀器中輸入/選擇資料。

********************************************************************************

注意中文字亂碼問題,此處是統一用 UTF-8,可能有其他解法。

input.html

<!DOCTYPE html>
<html lang="UTF-8">
<head>
  <meta charset="UTF-8">
</head>
<body>
<form>
  <label>姓名:<input type="text" name="name"></label><br>
  <label>Email:<input type="email" name="email"></label><br>
  <label>部門:
    <select name="dept">
      <option>Sales</option><option>IT</option><option>HR</option>
    </select>
  </label><br>
  <label><input type="checkbox" name="agree"> 我同意條款</label>
</form>
</body>
</html>

「記事本」存檔用 UTF-8


執行

D:\wkhtmltopdf>wkhtmltopdf.exe --enable-forms --encoding utf-8 input.html output.pdf
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

D:\\wkhtmltopdf>

下圖,開啟 output.pdf 畫面


下圖,關閉 .pdf 時候 會問是否儲存變更。

********************************************************************************

ChatGPT 提供的方法,敝人沒有一一去測試

方式一:用桌面軟體建立(最直覺)

  • Adobe Acrobat Pro

開啟檔案 →「工具」→「準備表單(Prepare Form)」。

讓它自動偵測欄位,或自己放 文字框、核取方塊、下拉選單、日期、數字 等。

欄位屬性可設:必填、格式(電話、Email、數字)、預設值、計算、唯讀。

需要簽名就放「簽名欄位」;要鎖其他內容:檔案 → 內容 → 安全性 只允許填表/簽名。


免費/替代工具

  • LibreOffice Writer:插入→表單控制項(文字框、核取方塊…),完成後「檔案→匯出為 PDF」,勾「建立 PDF 表單」。
  • PDF-XChange Editor / Foxit PDF Editor 等也能新增 AcroForm 欄位。

建議選 AcroForm。另一種叫 XFA 的表單相容性差,很多瀏覽器與行動裝置不支援。


方式二:從 HTML 轉成可填寫 PDF

部分轉檔器支援把 HTML 表單轉為 AcroForm 欄位,例如:

  • wkhtmltopdf(有參數可啟用表單),語法 wkhtmltopdf --enable-forms input.html output.pdf
  • PrinceXML、PDFreactor 等商業排版引擎


方式三:用程式庫

常見庫(都支援 AcroForm):

  • Java:iText 7、Apache PDFBox
  • .NET:iText 7 for .NET、PdfSharp/MigraDoc(含表單基本控件)
  • ********************************************************************************Node/前端:pdf-lib、jsPDF(有 AcroForm 插件)


(完)

相關

[研究]Opentext Fortify SAST (SCA) 讓客製化報告 Critical, High 數量為 0

[研究]Opentext Fortify SAST (SCA) 讓客製化報告 Critical, High 數量為 0

2025-08-29

靜態程式碼分析工具 25.0 版開始簡稱 SAST,之前簡稱 SCA 

  • Opentext Fortify SAST(Static Application Security Testing)
  • Opentext Fortify SCA (Static Code Analyzer)

Fortify SAST 並不是能 100% 保證不會誤判 (就像防毒軟體、黑箱 Web 弱點掃描工具、黑箱主機弱點掃描工具、滲透測試、、、也是)。但是若遇到業主 or 上司、主管硬是要求 Critical, High, Medium, 甚至 Low 在程式碼修改掃瞄後都必須達到 0 的情況,原廠也不是沒有提供一些應對措施,例如在 AWB (AuditWorkBench) 設定為 Hide (隱藏),產出的 pdf 報告就不會有。

本篇是從「客製化報告」產出 .pdf 時著手。

********************************************************************************

【問題數量】

原來 .xml 中 (若有),砍掉。

共找到 $TOTAL_FINDINGS$ 個問題 

********************************************************************************

【目錄清單】

原來 .xml 中,修改 <Refinement></Refinement> 內容

<SubSection enabled="true">
    <Title>Issues by Folder</Title>
    <Description>A table summarizing the number of issues found and the breakdown of issues in each Fortify Priority Level</Description>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement></Refinement>
        <Chart chartType="table">
            <Axis>Folder</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>

改為

<SubSection enabled="true">
    <Title>Issues by Folder</Title>
    <Description>A table summarizing the number of issues found and the breakdown of issues in each Fortify Priority Level</Description>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:none</Refinement>
        <Chart chartType="table">
            <Axis>Folder</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>

產出 .pdf 報告上畫面

[fortify priority order] 預設會抓 critical, high, medium, low 的資訊,改成不存在的名稱後,就變成 0。

********************************************************************************

【類別清單】

原來 .xml 中

<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:critical</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>
<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:high</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>
<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:medium</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>
<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:low</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>

改為

<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:critical none</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>
<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:high none</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>
<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:medium none</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>
<SubSection enabled="true">
    <Title>Issues By Category</Title>
	<IssueListing limit="-1" listing="false" showShortFileNames="false">
        <Refinement>[fortify priority order]:low none</Refinement>
        <Chart chartType="table">
            <Axis>Category</Axis>
            <MajorAttribute>Analysis</MajorAttribute>
        </Chart>
    </IssueListing>
</SubSection>

畫面

********************************************************************************

【結果概要】

原來 .xml 中

<ReportSection enabled="true" optionalSubsections="true">
    <Title>Critical Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:critical</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>
<ReportSection enabled="true" optionalSubsections="true">
    <Title>High Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:high</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>
<ReportSection enabled="true" optionalSubsections="true">
    <Title>Medium Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:medium</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>
<ReportSection enabled="true" optionalSubsections="true">
    <Title>Low Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:low</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>

改為

<ReportSection enabled="true" optionalSubsections="true">
    <Title>Critical Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:none</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>
<ReportSection enabled="true" optionalSubsections="true">
    <Title>High Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:none</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>
<ReportSection enabled="true" optionalSubsections="true">
    <Title>Medium Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:none</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>
<ReportSection enabled="true" optionalSubsections="true">
    <Title>Low Results Outline</Title>
    <SubSection enabled="true">
        <Title>Vulnerability Examples by Category</Title>
        <Description>Results summary of all issue categories.  Vulnerability examples are provided by category.</Description>
		<IssueListing limit="-1" listing="true" showShortFileNames="false">
            <Refinement>[fortify priority order]:none</Refinement>
            <Chart chartType="list">
                <Axis>Category</Axis>
                <MajorAttribute>Analysis</MajorAttribute>
            </Chart>
        </IssueListing>
    </SubSection>
</ReportSection>

畫面

********************************************************************************

(完)

相關

2025年8月28日 星期四

[研究]黑箱 Web 弱點掃描結果,會在該系統的 EDR 的監控結果顯示出來 ?

[研究]黑箱 Web 弱點掃描結果,會在該系統的 EDR 的監控結果顯示出來 ?

2025-08-28

黑箱 Web 弱點掃描結果,會在該系統的 EDR 的監控結果顯示出來 ?

ChatGPT 說:

這要分情境來看:

1. 黑箱 Web 弱點掃描 (Black-box Web Vulnerability Scan)

掃描工具只從「外部」去打該網站(例如 Burp Suite、Acunetix、Nessus、OWASP ZAP),就像一般使用者發送 HTTP/HTTPS 請求一樣。

這種情況下,通常不會直接在 EDR(Endpoint Detection & Response)端點偵測器上出現,因為 EDR 是裝在伺服器或工作站 OS 層級,監控的是:

  • 可疑的進程行為
  • 記憶體異常
  • 檔案系統操作
  • 惡意程式載入

但黑箱掃描大多只是在網頁層做「請求 / 回應」,屬於網路流量事件,不是端點行為。

2. 可能會被偵測的情況

雖然 EDR 本身未必顯示,但若有下列情境,仍可能被間接偵測:

  • 伺服器端有 WAF / IDS / IPS:會看到異常請求、SQLi/XSS 攻擊嘗試。
  • EDR 與 SIEM 整合:如果掃描導致系統資源暴增(CPU 飆高、IIS/Apache/Nginx Log 爆量),可能會被 EDR 當作可疑進程異常紀錄上報。
  • 有 RASP (Runtime Application Self-Protection):會攔截應用程式內的異常輸入,並回報安全事件。

3. 不會出現在 EDR 的典型狀況

  • 純粹的外部 HTTP 掃描(例如檢查 robots.txt、常見路徑 fuzz、弱密碼登入測試),不會讓 EDR 看到。
  • 除非掃描觸發了某些程式崩潰、下載檔案、或在伺服器內執行程式碼,才會進到 EDR 的可見範圍。

✅ 結論:

  • 黑箱 Web 弱點掃描結果通常不會在 EDR 端出現,因為它監控的是 OS/端點行為,不是外部網頁請求。
  • 如果要偵測黑箱掃描行為,主要依靠 WAF、IDS/IPS、SIEM 的流量與日誌分析,而不是單純靠 EDR。


[研究]RPO, RTO, MTPD 三個值都相同,合理嗎?

[研究]RPO, RTO, MTPD 三個值都相同,合理嗎?

2025-08-28

RPO, RTO, MTPD 三個值都相同,例如 4,4,4 或 8,8,8,合理嗎?不合理?理由?

ChatGPT 說:

這個問題很有意思 👍

我們來逐一拆解 RPO、RTO、MTPD 三者的定義與邏輯關係:

1️⃣ 定義回顧

  • RPO (Recovery Point Objective):資料可容忍的最大丟失量(以時間計)。例如 RPO = 4 小時 → 最多可接受資料倒退到 4 小時前。
  • RTO (Recovery Time Objective):系統恢復到可用狀態所需的時間上限。例:RTO = 4 小時 → 服務中斷後,4 小時內必須恢復。
  • MTPD (Maximum Tolerable Period of Disruption,又稱 MTD):業務可容忍的最長停擺時間。超過這個時間,企業可能無法存活。

2️⃣ 邏輯關係

通常情況下三者應滿足:RPO ≤ RTO ≤ MTPD

理由:

  • 資料丟失 (RPO) 容忍度通常比服務停擺 (RTO) 更嚴格,因為沒有資料就算服務起來也沒用。
  • RTO 是 IT 層面能在多快時間內復原系統的目標。
  • MTPD 是業務角度能容忍的最長停擺時間,理應 ≥ RTO。

3️⃣ 如果三個值都相同 (例如 4,4,4 或 8,8,8)

合理性:

  • 在某些非常嚴格、對時間和資料都同等敏感的業務(例如即時交易平台、證券交易所),可能會設定 RPO、RTO、MTPD 幾乎相等,因為 資料不能丟,服務也不能停,超過就造成不可接受的影響。
  • 若公司定義非常嚴謹,三者相等是可能的,但屬於 少見情況。

不合理性(更常見的解釋):

  • 一般業務情境下,MTPD 不會和 RTO 完全相等,因為通常會保留 緩衝時間。
  • 例如:
    • RPO = 4 小時(最多能接受丟 4 小時的資料)
    • RTO = 6 小時(要在 6 小時內恢復服務)
    • MTPD = 24 小時(業務最長能停一天)
  • 如果 MTPD 與 RTO 一樣(例如 4=4),代表一旦超過 RTO 就直接等於業務死亡,沒有容錯空間 → 過於理想化/僵硬。

✅ 結論:

  • 三個值相同 → 在極端嚴格的業務下是合理的,但通常不建議。
  • 更合理的設定是:RPO 最短,RTO 次之,MTPD 最大,才能反映出 IT 能力與業務容忍度之間的階層關係。

(完)

2025年8月21日 星期四

[研究]Exchange + Outlook 2019「自動回覆/郵件答錄機」 (Automatic Replies / Out of Office)試用

[研究]Exchange + Outlook 2019「自動回覆/郵件答錄機」 (Automatic Replies / Out of Office)試用

2025-08-21

 用「自動回覆 (Automatic Replies / Out of Office)」

在 Outlook → [檔案] → [自動回覆]。

設定啟用的時間範圍(可選)。

填寫自動回覆的內容(內部 / 外部寄件人可分開設定)。

存檔即可。

👉 優點:

即使 Outlook 關掉、電腦關機,Exchange 伺服器也會自動回覆。

可控是否只對公司內部同仁回覆,或對所有外部寄件人回覆。

可設定啟用/結束時間,很適合出差或休假。







********************************************************************************

不管內部 or 外部信件,都不會自動回v

ChatGPT 說:

🔍 常見原因與檢查方式

1. 伺服器端功能被停用

系統管理員可能在 Exchange Server / Microsoft 365 管理後台關閉了「自動回覆」功能。

外部寄件人特別常被封鎖(避免公司信箱自動回覆到垃圾郵件或郵件迴圈)。

👉 檢查方法:

如果你有管理員帳號,可以用 PowerShell 看 Get-RemoteDomain 的 AutoReplyEnabled 設定。

外部回覆要能用,必須對該網域允許自動回覆。

(敝人不是 Exchange Server 管理員)

2. Outlook 設定問題

你在 Outlook 裡設定了自動回覆,但可能 沒有按「確定」存檔。(確定按了)

或者 Outlook 顯示啟用了,但同步到 Exchange 失敗。

下圖,檢查 WebMaul,發現有設定,確定 Outlook 的設定有更新到 Exchange Server  上




👉 測試方式:

  • 不要用自己寄給自己。(測過,收不到)
  • 請一個同事(同 Exchange Domain)寄信給你,確認內部是否正常。(測過,收不到)
  • 再請外部 Gmail/Yahoo 測試。(測過,收不到)

3. 郵件流 (Transport Rules) 阻擋

  • Exchange Transport Rules(郵件流程規則)可能設定了「封鎖自動回覆」。(不知)
  • 常見在銀行、金融業,避免資訊外洩。

4. 用戶端規則混淆

  • 你是不是同時設定了 Outlook 客戶端規則?(沒)
  • 客戶端規則有時會「攔截」郵件,導致伺服器端自動回覆沒觸發。(沒)

5. 測試方式錯誤

  • 如果你用 同一個信箱寄信給自己,是不會觸發的。
  • 自動回覆只會回給 其他人寄來的第一封信,不會每封都回。(沒收到)
    (Exchange 預設「每個寄件人只回一次」)。


✅ 建議排查步驟

  • 先測試 公司內部同事寄給你 → 看有沒有回覆。
  • 再測試 外部 Gmail 寄給你 → 如果沒回,可能是管理員關閉了外部自動回覆。
  • 確認是否有其他 Outlook 規則干擾。
  • 若仍無法,請 IT 管理員確認 Exchange 伺服器是否允許 Out of Office / Automatic Replies。

(完)

2025年8月20日 星期三

[研究]滲透測試發現 java.lang.StringIndexOutOfBoundsException 的風險等級

[研究]滲透測試發現 java.lang.StringIndexOutOfBoundsException 的風險等級

2025-08-20

Java 網站做滲透測試,有設定客製化錯誤網頁,滲透測試檢測人員用 burp Suite 攔到 java.lang.StringIndexOutOfBoundsException 訊息,但是訊息並沒在使用者畫面顯示,檢測人員 可以因 burp Suite 攔到 Exception 訊息,判斷為 Critical, High, Medium, Low, Info 安全問題,或應是 無安全問題 ?

ChatGPT 說:

這是一個 「誤判風險」很高的情境,我幫你分幾個層次拆解:

1. 目前情況描述

  • 你的 Java 網站有 客製化錯誤頁(使用者實際畫面看不到詳細 Exception 報錯)。
  • 滲透測試人員用 Burp Suite 攔截 HTTP Response,在 Response 內容裡仍看到 java.lang.StringIndexOutOfBoundsException 之類訊息。
  • 表面上:使用者端看不到,但 HTTP Response 裡的 Raw Data 仍帶有 Exception 訊息。

2. 風險判斷依據

狀況 安全性風險判斷 常見等級
Exception 訊息會顯示在使用者畫面 攻擊者可直接收集系統細節 (stack trace、class name、程式路徑),可能導致資訊洩漏 Medium / High (依 Exception 敏感度)
Exception 不顯示在畫面,但仍出現在 Response 原始碼/HTTP Header/隱藏區段 攻擊者可攔截流量就能取得錯誤細節 → 屬於 資訊洩漏 (Information Disclosure) Low / Medium
Exception 完全不回傳到用戶端 (只留在 server log) 攻擊者完全無法取得 → 無資訊外洩 無安全問題

狀況 安全性風險判斷 常見等級

Exception 訊息會顯示在使用者畫面 攻擊者可直接收集系統細節 (stack trace、class name、程式路徑),可能導致資訊洩漏 Medium / High (依 Exception 敏感度)

Exception 不顯示在畫面,但仍出現在 Response 原始碼/HTTP Header/隱藏區段 攻擊者可攔截流量就能取得錯誤細節 → 屬於 資訊洩漏 (Information Disclosure) Low / Medium

Exception 完全不回傳到用戶端 (只留在 server log) 攻擊者完全無法取得 → 無資訊外洩 無安全問題

3. 你這個案例

  • 客製化錯誤頁已啟用 ✅
  • 但 Burp Suite 仍攔到 Exception 訊息 → 代表 後端實際 Response 仍有資訊洩漏,只是 UI 上被包裝。
  • 意味著只要有人攔封包(MITM、自身測試、Proxy),還是能取得 Exception 細節。

這就屬於 資訊洩漏漏洞,一般安全測試會歸類為:

  • 👉 Low (若只是類似 StringIndexOutOfBoundsException 這種常見錯誤,無敏感內部資訊)。
  • 👉 Medium (若 Exception 包含明確路徑、SQL 語法、系統環境參數)。

絕對 不是 Critical / High,因為沒有直接 Remote Code Execution、SQL Injection、認證繞過等。

也 不是無安全問題,因為錯誤資訊仍然外洩到 Response。

4. 建議處理方式

  1. 確認 Response:確定是否在 Response body、header,還是某個 debug hidden field。
  2. 關閉詳細 exception 傳遞:
    • Java Web.xml 設定 <error-page> 搭配 web.xml 或 Spring Boot 的 server.error.include-message=never。
    • 確保錯誤細節只寫入 server log,不要透過 Response 帶給 Client。
  1. 再測一次:確保 Burp Suite 攔到的 Response 不含 exception string。

✅ 結論:

你這個情況應該歸類為 Low ~ Medium 資訊洩漏漏洞 (Information Disclosure),不是 Critical/High,更不是「無安全問題」。

**********

以下是一份你可以給滲透測試單位或寫進資安報告的 回應範本,我用 正式中文 幫你寫:

回應範本:

議題名稱:java.lang.StringIndexOutOfBoundsException 錯誤訊息資訊外洩

檢測結果說明:

滲透測試人員於攔截 HTTP Response 時發現存在 java.lang.StringIndexOutOfBoundsException 錯誤訊息,然而該錯誤訊息並未於實際使用者瀏覽器畫面顯示,而是被客製化錯誤頁面所取代。此情況代表系統內部例外訊息仍可能透過 Response 回傳至 Client 端封包中,被攔截工具(如 Burp Suite)擷取。

風險等級建議:

本議題屬於 資訊洩漏 (Information Disclosure),主要風險為攻擊者可藉由封包攔截方式獲取部分系統內部錯誤細節。

  • 若錯誤訊息僅包含通用例外名稱(例如:StringIndexOutOfBoundsException),未帶有敏感路徑或 SQL 內容,建議風險等級為 Low。
  • 若訊息包含系統路徑、程式碼位置或資料庫相關資訊,建議提升至 Medium。

本案例未涉及敏感資料或直接攻擊面,故不屬於 High 或 Critical 等級。

改善建議:

  • 避免例外訊息回傳至 Client
    • 確認 Web Application Framework 設定,例如:
      • Java EE: 使用 web.xml <error-page> 配置。
      • Spring Boot: 設定 server.error.include-message=never、server.error.include-stacktrace=never。
    • 僅顯示客製化錯誤訊息給使用者(如「系統發生錯誤,請稍後再試」)。
  • 完整紀錄於伺服器 Log
    • 將詳細 Exception Stack Trace 寫入伺服器端日誌,供開發與維運人員除錯使用。
  • 重新測試驗證
    • 修正後再次透過 Burp Suite 或類似攔截工具測試,確認 Response 已不再含有 Exception 訊息。

(完)

2025年8月18日 星期一

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(四)

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(四)

2025-08-18

第四個系統 ASP.NET WebForm 系統。

OWASP Dependency-Track (DT) 畫面


**********

Mend(原 WhiteSource)畫面


(完)

相關

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(一)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend.html

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(二)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend_18.html

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(三)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend_27.html

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(四)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend_84.html


[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(三)

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(三)

2025-08-18

第三個系統 ASP.NET WebForm 系統。

OWASP Dependency-Track (DT) 畫面



**********

Mend(原 WhiteSource)畫面


(完)

相關

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(一)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend.html

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(二)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend_18.html

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(三)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend_27.html

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(二)

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(二)

2025-08-18

另一個系統 ASP.NET WebForm 系統。

OWASP Dependency-Track (DT) 畫面


**********

Mend(原 WhiteSource)畫面



(完)

相關

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(一)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend.html

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(二)
https://shaurong.blogspot.com/2025/08/owasp-dependency-track-dt-mend_18.html

2025年8月15日 星期五

[研究]Mend (WhiteSource) 誤判 .nupkg

[研究]Mend (WhiteSource) 誤判 .nupkg 為有問題

2025-08-15

ASP.NET WebForm 專案,用 Visual Studio 2019 的 NuGet 管理套件,根本不是套件本身,結果 Mend 把 .nupkg 誤判為有問題。

(完)

相關

[研究]發現 Mend 不會區分是否註解
https://shaurong.blogspot.com/2025/06/mend.html

2025年8月13日 星期三

[研究] "Microsoft Edge WebView2 執行階段" 和 Edge 關係 ?

[研究] "Microsoft Edge WebView2 執行階段" 和 Edge 關係 ?

2025-08-13

"Microsoft Edge WebView2 執行階段" 和 Edge 關係 ?

如果 Edge 移除了,僅剩 "Microsoft Edge WebView2 執行階段" 還有用處?


ChatGPT 說:

我來幫你拆開說明一下:

1. 什麼是 Microsoft Edge WebView2 執行階段

  • 用途:它是一個讓 Windows 桌面應用程式(不只是瀏覽器)可以嵌入網頁內容的元件。
  • 引擎:WebView2 使用 和 Microsoft Edge 相同的 Chromium 引擎,但它是一套獨立封裝的 Runtime,不依賴你是否安裝 Edge 主程式。
  • 使用場景:
    • Office(例如 Outlook、Teams UI)
    • 第三方應用程式(例如某些安控工具、ERP、POS 系統)
    • Windows 系統內部的一些功能(例如「設定」的某些頁面、新版檔案總管功能)

2. WebView2 與 Edge 的關係

  • 共用內核:WebView2 的渲染引擎和 Edge Chromium 版本一致,但安裝在不同位置,更新頻率由 Microsoft 控制。
  • 相互獨立:
    • Edge 主程式:給使用者直接瀏覽網頁。
    • WebView2 Runtime:給其他程式呼叫來顯示網頁內容,不是瀏覽器。
  • 更新同步:雖然內核一樣,WebView2 的更新不一定跟 Edge 同步,而是由 Windows Update 或應用程式安裝包管理。

3. 如果 Edge 被移除,WebView2 還有用處嗎?

✅ 有用處,因為:

  • WebView2 Runtime 是自成一套的 Chromium 引擎,不需要 Edge 主程式存在。
  • 移除 Edge 後,仍然可以讓依賴 WebView2 的應用程式正常顯示網頁內容。
  • 例如:即使電腦沒有 Edge,你的 Outlook 或 Teams 還能顯示 HTML 郵件、聊天介面,因為它們用的是 WebView2 Runtime。

4. 注意事項

  • 不能用 WebView2 取代 Edge
    • WebView2 沒有完整瀏覽器介面,也不支援像 Edge 那樣獨立上網。
  • 有些系統功能可能依賴 Edge 主程式
    • 比如 Windows 內建的幫助文件、某些登入流程,可能會直接喚起 Edge 而不是 WebView2。
  • 移除 Edge 可能破壞 Windows 更新或功能(特別是在 Windows 11/Server 2022 之後,Edge 幾乎被視為系統組件)

(完)

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)比較

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)比較 

2025-08-13

SCA(Software Composition Analysis)軟體組成分析

Dependency-Track (DT) 與 Mend 功能比較表
比較項目Dependency-Track (DT)Mend
產品性質開源 SCA(Software Composition Analysis)平台,由 OWASP 社群維護商業 SCA 與授權管理平台(原 WhiteSource),由 Mend.io 維護
授權模式Apache 2.0 開源授權,免費商業授權,依用戶/專案/程式碼庫計費
部署方式自行部署(Docker、Kubernetes、裸機,支援離線環境)雲端 SaaS 或私有部署(需授權)
核心功能SBOM 管理(原生支援 CycloneDX)、漏洞檢測、授權合規檢查SBOM 管理、漏洞檢測、授權合規、自動修補 PR、進階政策控管
漏洞資料來源NVD、OSS Index、VulnDB(可擴充自有資料庫)NVD、專屬商業漏洞資料庫、0-day 情資
授權管理基本授權辨識與合規檢查完整授權分析、合規政策、自動阻擋不符授權的套件
修補建議提供漏洞版本與修補資訊,無自動 PR 功能提供漏洞修補建議,可自動開 PR 升級套件
優先排序能力基於 CVSS 分數與風險分佈AI/演算法結合可利用性、影響範圍進行風險優先排序
DevOps 整合CI/CD、API、Webhook(需自行配置)深度支援 CI/CD(Jenkins、GitHub Actions、Azure DevOps…)、IDE 外掛
報表與視覺化自訂報表、Web API 輸出完整管理儀表板、視覺化報表、自動通知
維護與支援需自行維護、更新與疑難排解提供廠商技術支援與版本更新
適用對象成本敏感、具備維運能力、需離線部署的組織預算充足、需快速導入、重視商業支援與自動化的組織

(完)

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(一)

[研究]OWASP Dependency-Track (DT) 與 Mend(原 WhiteSource)實際掃描結果比較(一)

2025-08-13

這是同一個專案

OWASP Dependency-Track (DT) 畫面

註解:Attributed On 欄位的日期代表的是:該漏洞(Vulnerability)或安全資訊 被正式歸因(attributed)給該元件或套件的日期,是 Dependency-Track 從漏洞資料來源(Vulnerability Source)抓回來的日期。

**********

Mend(原 WhiteSource)畫面


Severity 點下去有詳細資訊
********************************************************************************
某 ASP.NET WebForm 專案,OWASP Dependency-Track (DT) 列出了有弱點的元件資訊

System.Security.Cryptography.X509Certificates 4.3.2 CVE-2024-0057
bootstrap 3.4.1 NVD CVE-2024-6484
bootstrap 3.4.1 NVD CVE-2024-6485
bootstrap 3.4.1 NVD CVE-2024-6531
RestSharp 106.15.0 NVD CVE-2024-45302
vue 2.6.11 NVD CVE-2024-9506
bootstrap 3.4.1 NVD CVE-2025-1647
System.Text.Json 9.0.8 NVD CVE-2024-43485

Mend 列出了有弱點的元件資訊
vue-2.6.11.min.js CVE-2024-9506 CVE-2024-6783
vue-2.5.21.js CVE-2024-9506
vue-2.5.21.min.js CVE-2024-9506
vue-2.6.11.js CVE-2024-9506 CVE-2024-6783
sixlabors.imagesharp.2.1.8.nupkg CVE-2025-27598 CVE-2025-54575 CVE-2024-41131 CVE-2024-41132

為何掃出的套件有差異?

ChatGPT 說:

你看到 OWASP Dependency-Track (DT) 和 Mend 掃描結果不一致,主要是因為兩者的元件識別方式、掃描範圍、資料來源、版本解析邏輯都有差異。
我幫你拆成幾個關鍵原因來看:

1. 識別方式不同
  • DT
主要透過 SBOM(Software Bill of Materials)或套件管理檔案(例如 .csproj、packages.config、package-lock.json)中宣告的套件名稱與版本,依照套件層級(NuGet package、NPM package、JAR、Docker image 等)來比對漏洞資料庫。
  • Mend
除了讀取套件管理檔案,也會直接掃描實際檔案內容(如 .js、.dll、.min.js、.nupkg)並用檔案指紋(hash / signature)去匹配漏洞資料庫。
→ 所以 Mend 才會報 vue-2.6.11.min.js 與 vue-2.5.21.js 這種單獨的檔案名稱,而 DT 則是只看到 vue 2.6.11 這個 package。

2. 掃描範圍不同
  • DT 偏向「專案依賴」層面,通常看你宣告安裝的**直接依賴(direct dependencies)**與已解析出的間接依賴(transitive dependencies)。
  • Mend 除了直接與間接依賴,也會去掃描:
    • 壓縮檔內的第三方資源(如 .nupkg 內嵌的 DLL/JS)
    • wwwroot、Scripts 資料夾中的第三方前端庫
    • 未透過套件管理器安裝的手動引用檔案(vendor code)

3. 漏洞資料來源不同
  • DT 常用的來源:
    • NVD(National Vulnerability Database)
    • GitHub Security Advisories
    • Sonatype OSS Index(視設定而定)
  • Mend 的來源更混合:
    • NVD
    • Mend 自家的漏洞資料庫(從各種 GitHub issue、專案 changelog、研究報告匯入)
    • 其他公開與商業威脅情報
    • 因此可能會掃到 NVD 尚未收錄的 CVE(例如 CVE-2024-6783)

4. 版本與比對演算法不同
  • 有些漏洞是針對特定版本範圍發佈的,但不同掃描工具在版本正則判斷上會有落差
    → 可能 DT 判斷你的版本不在漏洞範圍,但 Mend 的匹配規則比較寬鬆,於是報出來。
  • 反之,也可能 Mend 的 signature 沒對到你的檔案版本,於是沒報。

5. 更新頻率不同
  • 漏洞資料庫更新頻率不同會影響掃描結果。
    有些 CVE 發布初期,NVD 還沒「enrich」(補充詳細描述與受影響版本),DT 可能就暫時沒有資訊,而 Mend 可能已經自行補齊。

💡 簡單比喻
  • DT 比較像「看你說你家買了哪些電器,去查電器型號有沒有瑕疵」;
  • Mend 像是「直接進你家,數你有幾台電器,連朋友送你的、二手的、沒登記的都找出來比對」。

********************************************************************************


(完)

Windows Server 2022 能移除 Edge ?

[研究]Windows Server 2019、Windows Server 2022 能移除 Edge ?

2025-08-13

Windows Server 2019 能移除 Edge ?

Windows Server 2022 能移除 Edge ?

ChatGPT 說:

1. Windows Server 2019

Windows Server 2019 預設不會自動安裝 Microsoft Edge,只提供 Internet Explorer 作為相容性瀏覽器

。換言之,Edge 並非預設組件,用戶若未額外安裝,便自然不存在 Edge。

如果你已經手動安裝了 Chromium-based Edge,理論上可以用命令行移除,像是透過以下方式:

cd "C:\Program Files (x86)\Microsoft\Edge\Application\<版本號>\Installer"

.\setup.exe --uninstall --system-level --verbose-logging --force-uninstall

這方法適用於 Windows Server 2019(以及後續版本)

結論:在未安裝情況下沒有 Edge;若已安裝,則可按上述方式手動移除,但官方並不鼓勵且可能會因更新被重新還原。

註:敝人直接用「控制台」「解除安裝程式」進行移除。


2. Windows Server 2022

Windows Server 2022 預設已經包含 Edge,使用者介面中通常會看到 Edge 作為預設瀏覽器

結論:雖然可以手動嘗試移除,但 官方並不支援完全移除 Edge 且可能隨更新被還原,甚至可能導致系統不穩。

註:敝人直接用「控制台」進行移除,沒報告任何錯誤,暫時觀望中。

(完)


[研究]比較 SBOM 和 第三方元件清單

[研究]比較 SBOM 和 第三方元件清單

2025-08-13

ChatGPT 說:

SBOM(Software Bill of Materials)和「第三方元件」是相關但不相同的概念,差別主要在於 範疇、用途、與呈現方式。我幫你用結構化方式整理如下:

項目SBOM(軟體材料清單)第三方元件
概念一份完整清單,列出軟體中所有組成部分(包括自研、開源、商用、甚至間接依賴),就像食品的成分表。指軟體開發中使用的非自家開發的軟體模組、函式庫或服務,通常來自開源社群或商業供應商。
範圍包含第一方(自研)、第二方(客戶專屬)、第三方(外部供應)所有組件及其依賴關係。只針對外部來源的組件(第三方軟體、外包代碼、開源庫)。
呈現方式標準化格式(如 SPDX、CycloneDX、SWID),包含名稱、版本、授權、供應商、依賴關係、檔案雜湊值等。沒有固定格式,可能只是一份列表(Excel、README、工具掃描結果)列出使用的外部套件名稱與版本。
資訊豐富度會記錄所有軟體組件來源與關聯,方便做漏洞追蹤與合規檢查。主要是用來管理或追蹤使用了哪些外部套件,不一定包含全部依賴、授權資訊。
資安協助快速識別受影響的組件(如 Log4j 漏洞事件),方便做 CVE 修補與影響評估。通常只知道用了哪些第三方套件,但不一定能即時對應到漏洞與依賴樹。
授權合規可用來檢查整體授權狀況(GPL、MIT、Apache 2.0 等),避免授權衝突。常需要額外工具去分析授權,否則容易漏掉間接依賴的授權風險。
供應鏈透明度讓客戶、合作夥伴知道軟體組成,符合如美國行政命令 14028 的供應鏈安全要求。側重於開發團隊內部使用,不一定對外公開。

(完)

2025年8月8日 星期五

[研究]ASP.NET WebForm 專案第三方元件後升級編譯出錯

[研究]ASP.NET WebForm 專案第三方元件後升級編譯出錯

2025-08-08

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 19

********************************************************************************

已開始重建...

1>------ 已開始全部重建: 專案: WebApplition1, 組態: Debug Any CPU ------

1>  請考慮將組件 "Autofac, Culture=neutral, PublicKeyToken=17863af14b0044da" 的 app.config 從版本 "8.3.0.0" [] 重新對應至版本 "8.4.0.0" [D:\Solution1\WebApplication1\packages\Autofac.8.4.0\lib\netstandard2.0\Autofac.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "ExtendedNumerics.BigDecimal, Culture=neutral, PublicKeyToken=65f1315a45ad8949" 的 app.config 從版本 "3000.0.4.132" [] 重新對應至版本 "3001.0.1.201" [D:\Solution1\WebApplication1\packages\ExtendedNumerics.BigDecimal.3001.0.1.201\lib\net48\ExtendedNumerics.BigDecimal.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "Microsoft.Bcl.AsyncInterfaces, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\Microsoft.Bcl.AsyncInterfaces.9.0.8\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "Microsoft.Owin, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 的 app.config 從版本 "4.2.2.0" [] 重新對應至版本 "4.2.3.0" [D:\Solution1\WebApplication1\packages\Microsoft.Owin.4.2.3\lib\net45\Microsoft.Owin.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "Microsoft.Owin.Security, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 的 app.config 從版本 "4.2.2.0" [] 重新對應至版本 "4.2.3.0" [D:\Solution1\WebApplication1\packages\Microsoft.Owin.Security.4.2.3\lib\net45\Microsoft.Owin.Security.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "Microsoft.Owin.Security.Cookies, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 的 app.config 從版本 "4.2.2.0" [] 重新對應至版本 "4.2.3.0" [D:\Solution1\WebApplication1\packages\Microsoft.Owin.Security.Cookies.4.2.3\lib\net45\Microsoft.Owin.Security.Cookies.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "Microsoft.Owin.Security.OAuth, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 的 app.config 從版本 "4.2.2.0" [] 重新對應至版本 "4.2.3.0" [D:\Solution1\WebApplication1\packages\Microsoft.Owin.Security.OAuth.4.2.3\lib\net45\Microsoft.Owin.Security.OAuth.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "System.Collections.Immutable, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\System.Collections.Immutable.9.0.8\lib\net462\System.Collections.Immutable.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "System.Diagnostics.DiagnosticSource, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\System.Diagnostics.DiagnosticSource.9.0.8\lib\net462\System.Diagnostics.DiagnosticSource.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "System.Formats.Asn1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\System.Formats.Asn1.9.0.8\lib\net462\System.Formats.Asn1.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "System.Security.Permissions, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\System.Security.Permissions.9.0.8\lib\net462\System.Security.Permissions.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "System.Text.Encoding.CodePages, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\System.Text.Encoding.CodePages.9.0.8\lib\net462\System.Text.Encoding.CodePages.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "System.Text.Encodings.Web, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\System.Text.Encodings.Web.9.0.8\lib\net462\System.Text.Encodings.Web.dll],以解決衝突並避免出現警告。

1>  請考慮將組件 "System.Text.Json, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" 的 app.config 從版本 "9.0.0.6" [] 重新對應至版本 "9.0.0.8" [D:\Solution1\WebApplication1\packages\System.Text.Json.9.0.8\lib\net462\System.Text.Json.dll],以解決衝突並避免出現警告。

1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3247: 在同一個相依組件的不同版本之間發現衝突。請在 Visual Studio 中按兩下這個警告 (或選取後按 Enter) 解決這些衝突,或者將下列繫結重新導向加到應用程式組態檔中的 [執行階段] 節點: 


<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="Autofac" culture="neutral" publicKeyToken="17863af14b0044da" />
		<bindingRedirect oldVersion="0.0.0.0-8.4.0.0" newVersion="8.4.0.0" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="ExtendedNumerics.BigDecimal" culture="neutral" publicKeyToken="65f1315a45ad8949" />
		<bindingRedirect oldVersion="0.0.0.0-3001.0.1.201" newVersion="3001.0.1.201" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="Microsoft.Owin" culture="neutral" publicKeyToken="31bf3856ad364e35" />
		<bindingRedirect oldVersion="0.0.0.0-4.2.3.0" newVersion="4.2.3.0" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="Microsoft.Owin.Security" culture="neutral" publicKeyToken="31bf3856ad364e35" />
		<bindingRedirect oldVersion="0.0.0.0-4.2.3.0" newVersion="4.2.3.0" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="Microsoft.Owin.Security.Cookies" culture="neutral" publicKeyToken="31bf3856ad364e35" />
		<bindingRedirect oldVersion="0.0.0.0-4.2.3.0" newVersion="4.2.3.0" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="Microsoft.Owin.Security.OAuth" culture="neutral" publicKeyToken="31bf3856ad364e35" />
		<bindingRedirect oldVersion="0.0.0.0-4.2.3.0" newVersion="4.2.3.0" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="System.Collections.Immutable" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="System.Diagnostics.DiagnosticSource" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="System.Formats.Asn1" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="System.Security.Permissions" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="System.Text.Encoding.CodePages" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="System.Text.Encodings.Web" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>
<assemblyBinding
	xmlns="urn:schemas-microsoft-com:asm.v1">
	<dependentAssembly>
		<assemblyIdentity name="System.Text.Json" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
		<bindingRedirect oldVersion="0.0.0.0-9.0.0.8" newVersion="9.0.0.8" />
	</dependentAssembly>
</assemblyBinding>


********************************************************************************

解決

最後把這份砍了,把先前備份的 Source Code 複製一份過來,把 D:\Solution1\WebApplication1\packages 目錄整個砍了,再做一次 NuGet 升級,正常了。

(完)

相關