AntiXSS 库目前处于版本 4.2.1,下载地址:http://www.microsoft.com/download/en/details.aspx?id=28589。它经历了一次非常棒的重新编写过程,并且就安全性而言,它提供了比 ASP.NET 附带的编码器更好的 HTML 编码器。 并不是说 Server.HtmlEncode 有什么问题,只是它侧重于兼容性而不是安全性。 AntiXSS 使用不同的方法进行编码。 有关详细信息,请访问 msdn.microsoft.com/security/aa973814。Jon Galloway 在 http://weblogs.asp.net/jgalloway/archive/2011/04/28/using-antixss-4-1-beta-as-the-default-encoder-in-asp-net.aspx 中发布了有关此内容的精彩文章。

This release addresses a vulnerability in the HTML Sanitizer, MS12-007 http://technet.microsoft.com/en-us/security/bulletin/ms12-007 and adds full support for .NET 4.0 as well as restoring support for .NET 2.0. 
The sanitizer has been changed to remove all CSS it encounters, this new behaviour means that if you were keeping CSS formatting from HTML that is no longer going to be the case. 
In addition to the change necessary to correct the vulnerability there are a few new features;

  • Minimum Requirements.

You can now, once again, use the encoder libraries with .NET 2.0. The installer will create directories for each framework version supported, .NET 2.0, .NET 3.5 and .NET 4.0 which contain an optimized version of the encoders for that platform.

  • Invalid Unicode no longer throws an exception.

Invalid Unicode characters are now replaced with the Unicode replacement character, U+FFFD (�). Previously, when encoding strings through HtmlEncode, HtmlAttributeEncode, XmlEncode, XmlAttributeEncode or CssEncode invalid Unicode characters would be detected and an exception thrown.

  • UrlPathEncode added.

The encoding library now has UrlPathEncode which will encode a string for use as the path part of a URL.

  • .NET 4.0 encoder support.

There’s finally an official way to swap AntiXSS into the framework. If you are using .NET 4.0 ensure you are using the .NET 4.0 version of the encoding library and then edit your web.config and add the encoderType attribute to the httpRuntime element; i.e.

<httpRuntime encoderType="Microsoft.Security.Application.AntiXssEncoder, AntiXssLibrary"/>

保护您的 ASP.NET 应用程序

SRE with Antixss Module

Microsoft 防跨站点脚本库AntiXSS Library的更多相关文章

  1. 跨站点脚本编制实例(AppScan扫描结果)

    最近工作要求解决下web的项目的漏洞问题,扫描漏洞是用的AppScan工具,其中有很多是关于跨站点脚本编制问题的.下面就把这块东西分享出来. 原创文章,转载请注明 ------------------ ...

  2. ASP.NET Core中的OWASP Top 10 十大风险-跨站点脚本攻击 (XSS)

    不定时更新翻译系列,此系列更新毫无时间规律,文笔菜翻译菜求各位看官老爷们轻喷,如觉得我翻译有问题请挪步原博客地址 本博文翻译自: https://dotnetcoretutorials.com/201 ...

  3. 跨站点脚本编制-XSS 描述及解决方法

    跨站点脚本编制可能是一个危险的安全性问题,在设计安全的基于 Web 的应用程序时应该考虑这一点.本文中,描述了这种问题的本质.它是如何起作用的,并概述了一些推荐的修正策略. 当今的大多数网站都对 We ...

  4. 网站跨站点脚本,Sql注入等攻击的处理

    从360安全论坛里找到的一段代码,经过整理封装,直接在站点Global.asax文件或写一个HttpModule来拦截恶意请求即可: http://bbs.webscan.360.cn/forum.p ...

  5. 使用过滤器解决SQL注入和跨站点脚本编制

    1 SQL注入.盲注 1.1 SQL注入.盲注概述 Web 应用程序通常在后端使用数据库,以与企业数据仓库交互.查询数据库事实上的标准语言是 SQL(各大数据库供应商都有自己的不同版本).Web 应用 ...

  6. [原]网站跨站点脚本,Sql注入等攻击的处理

    从360安全论坛里找到的一段代码,经过整理封装,直接在站点Global.asax文件或写一个HttpModule来拦截恶意请求即可: http://bbs.webscan.360.cn/forum.p ...

  7. IBM Rational AppScan:跨站点脚本攻击深入解析

    IBM Rational AppScan:跨站点脚本攻击深入解析    了解黑客如何启动跨站点脚本攻击(cross-site scripting,XSS),该攻击危害(及不危害)什么,如何检测它们,以 ...

  8. 跨站点脚本攻击XSS

    来源:http://www.freebuf.com/articles/web/15188.html 跨站点脚本攻击是一种Web应用程序的攻击,攻击者尝试注入恶意脚本代码到受信任的网站上执行恶意操作.在 ...

  9. 【漏洞三】跨站点脚本(XSS)攻击

    [漏洞] 跨站点脚本(XSS)攻击 [原因] 跨站点脚本(也称为xss)是一个漏洞,攻击者可以发送恶意代码(通常在(Javascript的形式)给另一个用户.因为浏览器无法知道脚本是否值得信任,所以它 ...

随机推荐

  1. Hadoop_25_MapReduce实现日志清洗程序

    1.需求: 对web访问日志中的各字段识别切分,去除日志中不合法的记录,根据KPI统计需求,生成各类访问请求过滤数据 2.实现代码: a) 定义一个bean,用来记录日志数据中的各数据字段 packa ...

  2. php-fpm优化内存占用大

    1.1 Linux的php-fpm优化心得-php-fpm进程占用内存大和不释放内存问题 LNMP架构中PHP是运行在FastCGI模式下,按照官方的说法,php-cgi会在每个请求结束的时候会回收脚 ...

  3. github仓库管理项目

    一,建立本地git仓库 首先,git要求使用者必须提供自己的身份标识,为此我们需要在git bash中执行以下命令: git config --global user.name  'aa.Tessst ...

  4. ElasticsearchException: java.io.IOException: failed to read [id:0, file:/data/elasticsearch/nodes/0/_state/global-0.st]

    from : https://www.cnblogs.com/hixiaowei/p/11213143.html 1.以前装过elasticsearch,重新安装elastic search ,报错 ...

  5. IDEA中配置Jetty Server

    首先去 Eclipse官网下载Jetty jar包 鼠标移到Jetty上时 点击 Git it (得到它) 点击 .zip等待下载完成 然后 解压出来 接下就让我们 开始 使用IDEA了(创建一个We ...

  6. React生命周期, 兄弟组件之间通信

    1.一个demo(https://www.reactjscn.com/docs/state-and-lifecycle.html) class Clock extends React.Componen ...

  7. Python一等函数

    一等对象 一等对象的定义: (1)在运行时创建 (2)能赋值给变量或数据结构中的元素 (3)能作为参数传给函数 (4)能作为函数的返回结果 ▲ Python中,整数.字符串和字典.函数都是一等对象. ...

  8. 头条编程题 万万没想到之抓捕孔连顺 JavaScript

    [编程题] 万万没想到之抓捕孔连顺 时间限制:1秒 空间限制:131072K 我叫王大锤,是一名特工.我刚刚接到任务:在字节跳动大街进行埋伏,抓捕恐怖分子孔连顺.和我一起行动的还有另外两名特工,我提议 ...

  9. BIOS之于系统启动

    #BIOS之于操作系统 操作系统从开机通电到系统启动成功(执行main函数)分为3个步骤 启动BIOS,准备实模式下中断向量表和中断服务程序 从启动盘加载操作系统程序(包括boot镜像和root文件系 ...

  10. vim.rc配置(deepin)

    set nocompatible " be iMproved, requiredfiletype off " required " set the runtime pat ...