AppScan扫描.NET站点漏洞及修复

  • 2,595 views
  • 阅读模式

刚处理完App安全问题,安全扫描方又反馈来一个Web安全漏洞报告,所幸这次不只是一个人解决~

AppScan扫描.NET站点漏洞及修复
AppScan.itlao5.com

漏洞扫描用的是IBM的AppScan,下午主要修复下面几个低危漏洞:

一、Autocomplete HTML Attribute Not Disabled for Password Field

描述:

允许浏览器记住密码,可能导致密码信息泄露

修复:

在密码输入框(type="password")设置为不自动填充

input设置 autocomplete = "off"
asp:TextBox设置 AutoCompleteType="Disabled"

二、Cacheable SSL Page Found

描述:

允许SSL页面使用缓存,可能导致敏感数据泄露

修复:

SSL页面禁用缓存,在相应的页面的<head></head>

标签内加上以下代码

    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-store" />
    <meta http-equiv="Expires" content="0" />

三、Missing or insecure "Content-Security-Policy" header

描述:

Content-Security-Policy响应头缺失,可能会更大程度的暴露于各种跨站点注入攻击

修复:参考(六)

四、Missing or insecure "X-Content-Type-Options" header

描述:

防止在IE9、chrome和safari中的MIME类型混淆攻击

nosniff – 这个是唯一正确的设置,必须这样。 
修复:参考(六)

五、Missing or insecure "X-XSS-Protection" header

描述:

这个header主要是用来防止浏览器中的反射性xss。现在,只有IE,chrome和safari(webkit)支持这个header。

0 – 关闭对浏览器的xss防护  
1 – 开启xss防护  
1; mode=block – 开启xss防护并通知浏览器阻止而不是过滤用户注入的脚本。  
1; report=http://site.com/report – 这个只有chrome和webkit内核的浏览器支持,这种模式告诉浏览器当发现疑似xss攻击的时候就将这部分数据post到指定地址。  
修复:参考(六)

六、Missing or insecure HTTP Strict-Transport-Security Header

描述:

用来配置浏览器和服务器之间安全的通信,它主要是用来防止中间人攻击,因为它强制所有的通信都走TLS;此设置在https中才有效

max-age=31536000 – 告诉浏览器将域名缓存到STS list里面,时间是一年。  
max-age=31536000; includeSubDomains – 告诉浏览器将域名缓存到STS list里面并且包含所有的子域名,时间是一年。  
max-age=0 – 告诉浏览器移除在STS缓存里的域名,或者不保存此域名。
修复:

在站点的web.config配置文件中添加如下响应头

<system.webServer>
  <httpProtocol> 
    <customHeaders>
      <add name="X-Content-Type-Options" value="nosniff"/>
      <add name="X-XSS-Protection" value="1;mode=block"/>
      <!--add name="X-Frame-Options" value="SAMEORIGIN"/-->
      <add name="Content-Security-Policy" value="default-src 'self'"/>
      <add name="Strict-Transport-Security" value="max-age=63072000"/>
    </customHeaders>
  </httpProtocol>
</system.webServer>

七、Query Parameter in SSL Request

描述:

使用了Get方式传参,可能导致数据泄露

修复:

使用post方式传参,必须用Get的时候,使用"itlao5.com"+"?x=123"替换"itlao5.com?x=123",以规避该漏洞扫描。

简书:ThinkinLiu 博客: IT老五

ps: 本地下载了AppScan,继续扫描,继续解决安全漏洞...

weinxin
扫码关注微信公众号--IT老五
微信扫一扫关注公众号,获取更多实用app,订阅地址不定时更新
Liu, Thinkin
  • 本文由 发表于 2019-03-15 21:53:59
  • 转载请务必保留本文链接:https://itlao5.com/821.html
评论  0  访客  0
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定