首页> 外文会议> >Detecting Cross-Site Scripting Vulnerabilities through Automated Unit Testing
【24h】

Detecting Cross-Site Scripting Vulnerabilities through Automated Unit Testing

机译:通过自动单元测试检测跨站点脚本漏洞

获取原文

摘要

The best practice to prevent Cross Site Scripting (XSS) attacks is to apply encoders to sanitize untrusted data. To balance security and functionality, encoders should be applied to match the web page context, such as HTML body, JavaScript, and style sheets. A common programming error is the use of a wrong encoder to sanitize untrusted data, leaving the application vulnerable. We present a security unit testing approach to detect XSS vulnerabilities caused by improper encoding of untrusted data. Unit tests for the XSS vulnerability are automatically constructed out of each web page and then evaluated by a unit test execution framework. A grammar-based attack generator is used to automatically generate test inputs. We evaluate our approach on a large open source medical records application, demonstrating that we can detect many 0-day XSS vulnerabilities with very low false positives, and that the grammar-based attack generator has better test coverage than industry best practices.
机译:防止跨站点脚本(XSS)攻击的最佳实践是应用编码器清理不受信任的数据。为了平衡安全性和功能,应应用编码器以匹配网页上下文,例如HTML正文,JavaScript和样式表。常见的编程错误是使用错误的编码器来清理不受信任的数据,从而使应用程序容易受到攻击。我们提出一种安全单元测试方法,以检测由不可信数据的不正确编码导致的XSS漏洞。 XSS漏洞的单元测试是从每个网页中自动构建的,然后由单元测试执行框架进行评估。基于语法的攻击生成器用于自动生成测试输入。我们在大型开源病历应用程序上评估了我们的方法,表明我们可以检测到许多零日XSS漏洞,且误报率极低,并且基于语法的攻击生成器比行业最佳实践具有更好的测试覆盖率。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号