2025年7月18日 星期五

[研究][研究]黑箱 Web弱掃報告【不安全的第三方鏈結 (target="_blank")】弱點(二)

[研究][研究]黑箱 Web弱掃報告【不安全的第三方鏈結 (target="_blank")】弱點(二)

2025-07-18

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

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

續這篇

[研究]黑箱 Web弱點掃描報告【不安全的第三方鏈結 (target="_blank")】弱點(一)
https://shaurong.blogspot.com/2025/06/web-targetblank.html

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

它的檢測依據蠻明確的,誤判機率也低,修補方式也明確,危險等級有到【中】?

Default.aspx 修補前

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" 
    Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <a href="https://example.com" target="_blank">外部連結</a>
    </form>
</body>
</html>

Default.aspx 修補後

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" 
    Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <a href="https://example.com" target="_blank" rel="noopener noreferrer">外部連結</a>
    </form>
</body>
</html>

Default.aspx.cs

using System;

namespace WebApplication1
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}

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

HCL AppScan 10.8.1 掃描結果 (修補前)

HCL AppScan 10.8.1 掃描結果 (修補後)

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

OWASP ZAP 2.16.1掃描結果 (修補前)

OWASP ZAP 2.16.1掃描結果 (修補後)

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

Acunetix Web Vulnerability Scanner (AWVS) 25.5.25 掃描結果 (修補前)




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

OWASP ZAP 2.16.1沒有列【【不安全的第三方鏈結 (target="_blank")】】,認為【第三方鏈結 (target="_blank")】別說不算「中」,連「低」和「INFO」都排不上。

Acunetix Web Vulnerability Scanner (AWVS)也沒有列【不安全的第三方鏈結 (target="_blank")】。

(完)

相關




沒有留言:

張貼留言