arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2006.07350cs.CRcs.SE
收藏

在基于Android的混合应用中利用ML算法有效检测和预防JavaScript-XSS攻击

Exploiting ML algorithms for Efficient Detection and Prevention of JavaScript-XSS Attacks in Android Based Hybrid Applications

Usama Khalid, Muhammad Abdullah, Kashif Inayat

摘要:

多年来,移动应用程序的安全性开发和分析已成为一个活跃的研究领域,因为许多应用程序容易受到不同的攻击。特别是在过去三年中出现了混合应用程序的概念,其中应用程序以本地语言和Web语言开发,因为Web语言的使用在混合移动应用程序中增加了某些安全风险,因为它创建了可能的渠道,恶意代码可以被注入应用程序中。WebView是混合移动应用程序中的重要组件,用于实现沙箱机制,以保护智能手机设备的本地资源免受未经授权的JavaScript访问。然而,WebView应用程序编程接口(API)也存在安全问题。例如,攻击者可以通过访问应用程序的公共方法绕过沙箱安全性来经由JavaScript代码攻击混合应用程序。跨站脚本(XSS)是一种最流行的恶意代码注入技术,用于通过JavaScript访问应用程序的公共方法。这项研究提出了一个框架,在混合应用程序中使用最先进的机器学习(ML)算法检测和预防XSS攻击。攻击的检测已经通过利用注册的Java对象功能来执行。数据集和示例混合应用程序是使用android studio开发的。然后使用了目前广泛使用的工具RapidMiner进行实证分析。实验结果表明,基于集成的随机森林算法的性能优于其他算法,准确率和F-测度均高达99%。

英文摘要:

The development and analysis of mobile applications in term of security have become an active research area from many years as many apps are vulnerable to different attacks. Especially the concept of hybrid applications has emerged in the last three years where applications are developed in both native and web languages because the use of web languages raises certain security risks in hybrid mobile applications as it creates possible channels where malicious code can be injected inside the application. WebView is an important component in hybrid mobile applications which used to implements a sandbox mechanism to protect the local resources of smartphone devices from un-authorized access of JavaScript. However, the WebView application program interfaces (APIs) also have security issues. For example, an attacker can attack the hybrid application via JavaScript code by bypassing the sandbox security through accessing the public methods of the applications. Cross-site scripting (XSS) is one of the most popular malicious code injection technique for accessing the public methods of the application through JavaScript. This research proposes a framework for detection and prevention of XSS attacks in hybrid applications using state-of-the-art machine learning (ML) algorithms. The detection of the attacks have been perform by exploiting the registered Java object features. The dataset and the sample hybrid applications have been developed using the android studio. Then the widely used toolkit, RapidMiner, has been used for empirical analysis. The results reveal that the ensemble based Random Forest algorithm outperforms other algorithms and achieves both the accuracy and F-measures as high as of 99%.

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

↑