[论文解读] Leveraging Flawed Tutorials for Seeding Large-Scale Web Vulnerability Discovery
本文提出了一种半自动方法,通过从流行教程中挖掘存在缺陷的代码片段,来发现大规模的网络漏洞,这些代码片段随后被用于检测数万个开源PHP项目中类似的漏洞。该方法识别出117个与顶级教程中漏洞代码片段具有强语法相似性的漏洞,表明存在缺陷的教程可作为大规模漏洞发现的有效种子。
The Web is replete with tutorial-style content on how to accomplish programming tasks. Unfortunately, even top-ranked tutorials suffer from severe security vulnerabilities, such as cross-site scripting (XSS), and SQL injection (SQLi). Assuming that these tutorials influence real-world software development, we hypothesize that code snippets from popular tutorials can be used to bootstrap vulnerability discovery at scale. To validate our hypothesis, we propose a semi-automated approach to find recurring vulnerabilities starting from a handful of top-ranked tutorials that contain vulnerable code snippets. We evaluate our approach by performing an analysis of tens of thousands of open-source web applications to check if vulnerabilities originating in the selected tutorials recur. Our analysis framework has been running on a standard PC, analyzed 64,415 PHP codebases hosted on GitHub thus far, and found a total of 117 vulnerabilities that have a strong syntactic similarity to vulnerable code snippets present in popular tutorials. In addition to shedding light on the anecdotal belief that programmers reuse web tutorial code in an ad hoc manner, our study finds disconcerting evidence of insufficiently reviewed tutorials compromising the security of open-source projects. Moreover, our findings testify to the feasibility of large-scale vulnerability discovery using poorly written tutorials as a starting point.
研究动机与目标
- 调查是否可以利用包含安全漏洞的缺陷教程作为大规模漏洞发现的起点。
- 评估顶级教程中的漏洞代码模式在实际开源网络应用程序中重现的程度。
- 评估审查不充分的教程对开源软件项目安全性的影响。
提出的方法
- 收集已知包含安全缺陷(如XSS和SQL注入)的顶级网络教程代码片段。
- 应用语法相似性分析,检测开源代码仓库中与教程中漏洞代码片段匹配的代码模式。
- 使用半自动流水线扫描GitHub上托管的64,415个PHP代码库,以识别重复出现的漏洞模式。
- 在标准个人电脑上运行分析框架,确保可扩展性和实用性。
- 优先选择广泛使用的教程中的代码片段,以最大化实际代码重用的可能性。
实验结果
研究问题
- RQ1来自流行教程的漏洞代码模式在开源网络应用程序中重现的程度如何?
- RQ2缺陷教程能否作为发现大规模网络漏洞的有效种子?
- RQ3在实际开源项目中,漏洞教程代码的重用程度有多高?
主要发现
- 分析框架成功在64,415个开源PHP代码库中识别出117个漏洞,这些漏洞与顶级教程中漏洞代码片段表现出强语法相似性。
- 实际项目中的大量漏洞可追溯至广泛使用但审查不充分的教程中存在的代码模式。
- 研究结果证实,开发人员经常在未充分进行安全审查的情况下重用教程代码,导致已知漏洞的传播。
- 本研究证明,利用存在缺陷的教程作为自动化大规模代码库漏洞发现的可扩展切入点是可行的。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。