Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security 经典ASP::跨站点脚本(XSS)验证问题差_Security_Asp Classic_Xss_Fortify - Fatal编程技术网

Security 经典ASP::跨站点脚本(XSS)验证问题差

Security 经典ASP::跨站点脚本(XSS)验证问题差,security,asp-classic,xss,fortify,Security,Asp Classic,Xss,Fortify,对于传统的经典ASP应用程序,我应该消除所有安全攻击问题。目前,DB包含已编码的数据,不再进行插入/更新操作。从现在起仅选择操作 我能够删除SQL注入和其他一些安全问题,但无法删除 跨站点脚本(XSS):验证问题不佳 这成为项目交付的瓶颈 谁能帮我一下吗 示例: 我的数据库数据如下 单单元格样本数据(韩文和英文字符) 1。。破裂膜설치 관련 필요 자재 列表──────────────────────────────────────

对于传统的经典ASP应用程序,我应该消除所有安全攻击问题。目前,DB包含已编码的数据,不再进行插入/更新操作。从现在起仅选择操作

我能够删除SQL注入和其他一些安全问题,但无法删除

跨站点脚本(XSS):验证问题不佳

这成为项目交付的瓶颈

谁能帮我一下吗

示例: 我的数据库数据如下

单单元格样本数据(韩文和英文字符)

1。。破裂膜설치 관련 필요 자재 列表
──────────────────────────────────────<没有필요 자재 재질 비 고
──────────────────────────────────────
1入口隔离阀,8“C276기존 재고 사용
第二个支架入口/出口为C276/316L신규 구매
3爆破片:C276신규 구매
4 SV出口隔离阀,10“SUS 316L신규 구매
──────────────────────────────────────

2。爆破片规格
1)爆破设计压力:4kg/cm2
2)设计温度:100℃
3)爆破压力公差:±5%
4)制造范围:+0%,-10%
5)材料规格:M1、M4、C31
6)最大允许操作压力:3.2kg/cm2(100℃时

3。爆破片规格선정 기준
。规范、标准=API 520,ASME VIII
。所需爆破压力=容器设计压力
。制造范围(+0%∼ -所需爆破压力的10%
。破裂压力公差+5%,冲压破裂压力的-5%
。指定的阀盘温度=运行中阀盘的实际温度
→ 通常盘状物比容器液相物低

4。破裂盘전단 및 SV2209후단 隔离阀는 CSO(轿厢密封开启)。

5。破裂盘후단에 PG2209를 설치하여 운전 중 破裂盘파손 여부 확인 가능토록 함.
我正在显示上述单元格数据,如下所示:

示例页面:

<!-- #include file="INCLUDES/HTMLDecode.inc" -->
.
.
.
<HTML>
.
.
.
sampledata = rs("sampledata")
.
.
.
<TD><%= ClearForAttack(sampledata) =%></TD>
.
.
.
</HTML>
    <%
    Function HTMLDecode(sText)
        Dim I
        sText = Replace(sText, "&quot;", Chr(34))
        sText = Replace(sText, "&lt;"  , Chr(60))
        sText = Replace(sText, "&gt;"  , Chr(62))
        sText = Replace(sText, "&amp;" , Chr(38))
        sText = Replace(sText, "&nbsp;", Chr(32))
        For I = 1 to 255
            sText = Replace(sText, "&#" & I & ";", Chr(I))
        Next
        HTMLDecode = sText
    End Function
    %>
    <%
    Function ClearForAttack(pStrValue)
        if len(pStrValue)>0 then
            pStrValue = HTMLDecode(Server.HTMLEncode(pStrValue))
            pStrValue = replace(pStrValue,"'","")
            pStrValue = replace(pStrValue,"`","")
            pStrValue = replace(pStrValue,"%","")
            pStrValue = replace(pStrValue,"<","&lt;")
            pStrValue = replace(pStrValue,">","&gt;")
        else
            pStrValue = ""
        end if
        ClearForAttack = pStrValue
    End Function
    %>

.
.
.
.
.
.
sampledata=rs(“sampledata”)
.
.
.
.
.
.
上述功能定义如下:

用户定义函数:

<!-- #include file="INCLUDES/HTMLDecode.inc" -->
.
.
.
<HTML>
.
.
.
sampledata = rs("sampledata")
.
.
.
<TD><%= ClearForAttack(sampledata) =%></TD>
.
.
.
</HTML>
    <%
    Function HTMLDecode(sText)
        Dim I
        sText = Replace(sText, "&quot;", Chr(34))
        sText = Replace(sText, "&lt;"  , Chr(60))
        sText = Replace(sText, "&gt;"  , Chr(62))
        sText = Replace(sText, "&amp;" , Chr(38))
        sText = Replace(sText, "&nbsp;", Chr(32))
        For I = 1 to 255
            sText = Replace(sText, "&#" & I & ";", Chr(I))
        Next
        HTMLDecode = sText
    End Function
    %>
    <%
    Function ClearForAttack(pStrValue)
        if len(pStrValue)>0 then
            pStrValue = HTMLDecode(Server.HTMLEncode(pStrValue))
            pStrValue = replace(pStrValue,"'","")
            pStrValue = replace(pStrValue,"`","")
            pStrValue = replace(pStrValue,"%","")
            pStrValue = replace(pStrValue,"<","&lt;")
            pStrValue = replace(pStrValue,">","&gt;")
        else
            pStrValue = ""
        end if
        ClearForAttack = pStrValue
    End Function
    %>

如前所述,只需清理post/query字符串数据—来自用户输入和数据库的所有数据。您可以尝试多种方法,包括
Server.HTMLEncode

如果需要将其扩展到数据库字段,则需要对
执行某种搜索和替换,分别将它们替换为


XSS存在一些问题。您可能需要。

Server.HTMLEncode会清理查询。您需要运行验证过程以满足较差的验证要求。有一个简单的“黑名单”程序,您可以根据需要进行更改。支票或支票。一旦合并,应删除大部分不良验证。

只需清理post/query字符串数据即可。您可以尝试多种方法,包括
Server.HTMLEncode
。您对XSS的哪种变体有问题?如前所述,XSS:PoorValidation@kpgu1718-这是你的答案-我必须问-你为什么解码编码版本?保持原样,只需输出到您的页面。谢谢您的帮助。但是,我很抱歉。我已经尝试过这些方法,但不起作用。您是否尝试过对来自您的数据库的数据进行
HTMLEncode
?查看一下S.O。再次感谢您的快速响应。我的问题是,如果我直接显示O/P,它会给出XSS:Peristent,如果我使用Server.HTMLEncode(“”),它会给出XSS:Poor验证问题。因此,现在我试图消除这个Pood验证问题。尝试用字符串中的
&#xNN等效。这是一个有点腰带和背带,但可能会工作。这并不是说这会对性能产生影响。举个例子解释一下就好了。