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

Java中的安全编码实践:挑战和漏洞

Secure Coding Practices in Java: Challenges and Vulnerabilities

Na Meng, Stefan Nagy, Daphne Yao, Wenjie Zhuang, Gustavo Arango Argoty

摘要:

Java平台和第三方库提供了各种安全功能,以促进安全编码。然而,滥用这些功能可能会花费开发人员的大量时间和精力,或者导致软件中的安全漏洞。之前的研究主要集中在密码学和SSL API的滥用上,但没有探索关键的基础研究问题:安全编码实践中最大的挑战和漏洞是什么?在本文中,我们对StackOverflow帖子进行了全面的实证研究,以了解开发人员对Java安全编码的关注,他们的编程障碍以及代码中的潜在漏洞。我们观察到开发人员已经将他们的工作转移到使用Spring安全性提供的身份验证和授权功能上-Spring安全性是一个旨在保护企业应用程序的第三方框架。多种编程挑战与API或库有关,包括加密API的复杂跨语言数据处理,以及配置Spring安全性的复杂的基于Java或基于XML的方法。更有趣的是,我们在建议的接受答案代码中发现了安全漏洞。这些漏洞包括使用不安全的散列函数(如MD5),通过绕过证书验证破坏SSL/TLS安全性,以及不安全地禁用针对跨站点请求伪造(CSRF)攻击的默认保护。我们的研究结果揭示了安全编码援助和教育的不足,以及安全理论和编码实践之间的差距。

英文摘要:

Java platform and third-party libraries provide various security features to facilitate secure coding. However, misusing these features can cost tremendous time and effort of developers or cause security vulnerabilities in software. Prior research was focused on the misuse of cryptography and SSL APIs, but did not explore the key fundamental research question: what are the biggest challenges and vulnerabilities in secure coding practices? In this paper, we conducted a comprehensive empirical study on StackOverflow posts to understand developers' concerns on Java secure coding, their programming obstacles, and potential vulnerabilities in their code. We observed that developers have shifted their effort to the usage of authentication and authorization features provided by Spring security--a third-party framework designed to secure enterprise applications. Multiple programming challenges are related to APIs or libraries, including the complicated cross-language data handling of cryptography APIs, and the complex Java-based or XML-based approaches to configure Spring security. More interestingly, we identified security vulnerabilities in the suggested code of accepted answers. The vulnerabilities included using insecure hash functions such as MD5, breaking SSL/TLS security through bypassing certificate validation, and insecurely disabling the default protection against Cross Site Request Forgery (CSRF) attacks. Our findings reveal the insufficiency of secure coding assistance and education, and the gap between security theory and coding practices.

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

↑