首页> 外文学位 >Dynamic Analysis for JavaScript Code
【24h】

Dynamic Analysis for JavaScript Code

机译:JavaScript代码的动态分析

获取原文
获取原文并翻译 | 示例

摘要

The effectiveness of the widely adopted static analysis tools is often limited by JavaScript's dynamic nature and the need to over-approximate runtime behaviors. To tackle this challenge, we research robust dynamic analysis techniques for real-world JavaScript code.;To analyze front-end web applications, we first extend Jalangi which is a dynamic analysis framework based on source code instrumentation. Our extension of Jalangi intercepts and rewrites JavaScript code during network transmission. We also develop NodeSec, which is a dynamic instrumentation framework that traces and sandboxes the interactions between a Node.js program and the operating system. Based on the two frameworks, we research dynamic analysis techniques to detect correctness, performance, and security issues in JavaScript code.;First, we present DLint, a dynamic analysis approach to check code quality rules in JavaScript. DLint consists of a generic framework and an extensible set of checkers that each addresses a particular rule. We formally describe and implement 28 checkers that address problems missed by state-of-the-art static approaches. Applying the approach in an empirical study on over 200 popular websites shows that static and dynamic checking complement each other. On average per website, DLint detects 49 problems that are missed statically, including visible bugs on the websites of IKEA, Hilton, eBay, and CNBC.;Second, we present JITProf, a profiling framework to dynamically identify JIT-unfriendly code, which prohibits profitable JIT optimizations. The key idea is to associate meta-information with JavaScript objects and code locations, to update this information whenever particular runtime events occur, and to use the meta-information to identify JIT-unfriendly operations. We use JITProf to analyze widely used JavaScript web applications and show that JIT-unfriendly code is prevalent in practice. We show that refactoring JIT-unfriendly code identified by JITProf leads to statistically significant performance improvements of up to 26.3% in 15 popular benchmarks.;Finally, we conduct the first large-scale empirical study of security issues on over 330,000 npm packages. We adopted an iterative approach to dynamically analyze those packages and identified 360 previously unknown malicious or vulnerable packages, 315 of which have been validated by the community so far; 258 of those issues are considered as highly severe. All those packages with security issues in aggregate have 2,138 downloads per day, stressing the risks for the Node.js ecosystem.
机译:广泛采用的静态分析工具的有效性通常受JavaScript的动态性质和过分逼近运行时行为的限制。为了解决这个挑战,我们研究了用于现实世界JavaScript代码的强大的动态分析技术。为了分析前端Web应用程序,我们首先扩展了Jalangi,这是一个基于源代码工具的动态分析框架。我们对Jalangi的扩展在网络传输过程中拦截并重写了JavaScript代码。我们还开发了NodeSec,这是一个动态的检测框架,可跟踪和沙盒化Node.js程序与操作系统之间的交互。基于这两个框架,我们研究了动态分析技术来检测JavaScript代码中的正确性,性能和安全性问题。首先,我们提出DLint,一种用于检查JavaScript中的代码质量规则的动态分析方法。 DLint由通用框架和一组可扩展的检查程序组成,每个检查程序都处理特定的规则。我们正式描述和实现28个检查器,以解决最新的静态方法遗漏的问题。将这种方法应用于对200多个流行网站的实证研究表明,静态和动态检查是相辅相成的。 DLint平均每个网站都会检测到49个静态遗漏的问题,包括IKEA,Hilton,eBay和CNBC网站上的可见错误。其次,我们介绍了JITProf,这是一个可动态识别JIT不友好代码的配置文件框架,可防止有利可图的JIT优化。关键思想是将元信息与JavaScript对象和代码位置相关联,以在发生特定的运行时事件时更新此信息,并使用元信息来识别对JIT不友好的操作。我们使用JITProf分析广泛使用的JavaScript Web应用程序,并证明在实践中普遍存在JIT不友好的代码。我们显示出,重构JITProf识别出的对JIT不友好的代码可以在15个流行的基准中带来统计上显着的性能提升,达到了26.3%。最后,我们对超过330,000 npm的软件包进行了首次大规模的安全性问题实证研究。我们采用迭代方法动态分析了这些软件包,并确定了360个以前未知的恶意或易受攻击的软件包,到目前为止,其中315个已被社区验证。这些问题中有258个被认为是非常严重的。所有这些具有安全性问题的软件包每天总计下载2138次下载,这给Node.js生态系统带来了风险。

著录项

  • 作者

    Gong, Liang.;

  • 作者单位

    University of California, Berkeley.;

  • 授予单位 University of California, Berkeley.;
  • 学科 Computer science.
  • 学位 Ph.D.
  • 年度 2018
  • 页码 128 p.
  • 总页数 128
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号