arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1804.01862cs.CR
收藏

跨站点脚本漏洞的自动检测与修复

Automated Detecting and Repair of Cross-Site Scripting Vulnerabilities

Mahmoud Mohammadi, Bei-Tseng Chu, Heather Richter Lipford

摘要:

防止跨站脚本(XSS)攻击的最佳实践是应用编码器来清理不受信任的数据。为了平衡安全性和功能性,应该应用编码器来匹配网页上下文,例如HTML主体、JavaScript和样式表。一个常见的编程错误是使用错误类型的编码器来清理不受信任的数据,使应用程序容易受到攻击。我们提出了一个安全的单元测试方法来检测XSS漏洞所造成的不受信任的数据的不正确编码。XSS漏洞的单元测试在每个网页中构建,然后由单元测试执行框架进行评估。设计了一个基于语法的攻击生成器来自动生成测试输入。我们还提出了一个漏洞修复技术,可以自动修复检测到的漏洞在许多情况下。这种方法的评估已经进行了一个开源的医疗记录应用程序,超过200个网页编写的JSP。

英文摘要:

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 type of 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 constructed out of each web page and then evaluated by a unit test execution framework. A grammar-based attack generator is devised to automatically generate test inputs. We also propose a vulnerability repair technique that can automatically fix detected vulnerabilities in many situations. Evaluation of this approach has been conducted on an open source medical record application with over 200 web pages written in JSP.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑