Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3460120.3484823acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article
Open access

SoFi: Reflection-Augmented Fuzzing for JavaScript Engines

Published: 13 November 2021 Publication History
  • Get Citation Alerts
  • Abstract

    JavaScript engines have been shown prone to security vulnerabilities, which can lead to serious consequences due to their popularity. Fuzzing is an effective testing technique to discover vulnerabilities. The main challenge of fuzzing JavaScript engines is to generate syntactically and semantically valid inputs such that deep functionalities can be explored. However, due to the dynamic nature of JavaScript and the special features of different engines, it is quite challenging to generate semantically meaningful test inputs.
    We observed that state-of-the-art semantic-aware JavaScript fuzzers usually require manually written rules to analyze the semantics for a JavaScript engine, which is labor-intensive, incomplete and engine-specific. Moreover, the error rate of generated test cases is still high. Another challenge is that existing fuzzers cannot generate new method calls that are not included in the initial seed corpus or pre-defined rules, which limits the bug-finding capability.
    To this end, we propose a novel semantic-aware fuzzing technique named SoFi. To guarantee the validity of the generated test cases, SoFi adopts a fine-grained program analysis to identify available variables and infer types of these variables for the mutation. Moreover, an automatic repair strategy is proposed to repair syntax/semantic errors in invalid test cases. To improve the exploration capability of SoFi, we propose a reflection-based analysis to identify unseen attributes and methods of objects, which are further used in the mutation. With fine-grained analysis and reflection-based augmentation, SoFi can generate more valid and diverse test cases. Besides, SoFi is general in different JavaScript engines without any manual configuration (e.g., the grammar rules). The evaluation results have shown that SoFi outperforms state-of-the-art techniques in generating semantically valid inputs, improving code coverage and detecting more bugs. SoFi discovered 51 bugs in popular JavaScript engines, 28 of which have been confirmed or fixed by the developers and 10 CVE IDs have been assigned.

    References

    [1]
    american fuzzy lop. https://lcamtuf.coredump.cx/afl/.
    [2]
    benjamn/ast-types: Esprima-compatible implementation of the mozilla js parser api. https://github.com/benjamn/ast-types.
    [3]
    cesanta/mjs: Embedded javascript engine for c/c
    [4]
    . https://github.com/cesanta/mjs.
    [5]
    Esprima. https://esprima.org/.
    [6]
    Espruino up to 1.97 jswrap_graphics.c memory corruption. https://vuldb.com/?id.118465.
    [7]
    estools/escodegen: Ecmascript code generator. https://github.com/estools/escodegen.
    [8]
    funfuzz/src/funfuzz/js/jsfunfuzz at master · mozillasecurity/funfuzz. https://github.com/MozillaSecurity/funfuzz/tree/master/src/funfuzz/js/jsfunfuzz.
    [9]
    googleprojectzero/domato: Dom fuzzer. https://github.com/googleprojectzero/domato.
    [10]
    Javascript - wikipedia. https://en.wikipedia.org/wiki/JavaScript#Dynamic.
    [11]
    Javascriptcore | apple developer documentation. https://developer.apple.com/documentation/javascriptcore.
    [12]
    Jerryscript 1.0 lit/lit-char-helpers.c lit_read_code_unit_from_hex memory corruption. https://vuldb.com/?id.113964.
    [13]
    jerryscript-project/jerryscript: Ultra-lightweight javascript engine for the internet of things. https://github.com/jerryscript-project/jerryscript.
    [14]
    Mujs. https://mujs.com/.
    [15]
    Nvd - cve-2019--1010176. https://nvd.nist.gov/vuln/detail/CVE-2019--1010176.
    [16]
    Openrce/sulley: A pure-python fully automated and unattended fuzzing framework. https://github.com/OpenRCE/sulley.
    [17]
    Peach fuzzer: Discover unknown vulnerabilities. https://www.peach.tech/.
    [18]
    Reflect - javascript | mdn. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect.
    [19]
    tc39/test262: Official ecmascript conformance test suite. https://github.com/tc39/test262.
    [20]
    Xs7 @ tc-39. https://www.moddable.com/XS7-TC-39.php.
    [21]
    Cornelius Aschermann, Tommaso Frassetto, Thorsten Holz, Patrick Jauernig, Ahmad-Reza Sadeghi, and Daniel Teuchert. Nautilus: Fishing for deep bugs with grammars. In NDSS, 2019.
    [22]
    Vijay Ganesh, Tim Leek, and Martin Rinard. Taint-based directed whitebox fuzzing. In 2009 IEEE 31st International Conference on Software Engineering, pages 474--484. IEEE, 2009.
    [23]
    HyungSeok Han, DongHyeon Oh, and Sang Kil Cha. Codealchemist: Semantics-aware code generation to find vulnerabilities in javascript engines. In NDSS, 2019.
    [24]
    Christian Holler, Kim Herzig, and Andreas Zeller. Fuzzcodealchemisting with code fragments. In Presented as part of the 21st $$USENIX$$ Security Symposium ($$USENIX$$ Security 12), pages 445--458, 2012.
    [25]
    Xiangkun Jia, Chao Zhang, Purui Su, Yi Yang, Huafeng Huang, and Dengguo Feng. Towards efficient heap overflow discovery. In 26th $$USENIX$$ Security Symposium ($$USENIX$$ Security 17), pages 989--1006, 2017.
    [26]
    Daniel Jurafsky and James H Martin. Speech and language processing (draft). october 2019. URL https://web. stanford. edu/ jurafsky/slp3, 2019.
    [27]
    Sanjay Rawat, Vivek Jain, Ashish Kumar, Lucian Cojocar, Cristiano Giuffrida, and Herbert Bos. Vuzzer: Application-aware evolutionary fuzzing. In NDSS, volume 17, pages 1--14, 2017.
    [28]
    Kwangwon Sun and Sukyoung Ryu. Analysis of javascript programs: Challenges and research trends. ACM Computing Surveys (CSUR), 50(4):1--34, 2017.
    [29]
    Spandan Veggalam, Sanjay Rawat, Istvan Haller, and Herbert Bos. Ifuzzer: An evolutionary interpreter fuzzer using genetic programming. In European Symposium on Research in Computer Security, pages 581--601. Springer, 2016.
    [30]
    Junjie Wang, Bihuan Chen, Lei Wei, and Yang Liu. Superion: Grammar-aware greybox fuzzing. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), pages 724--735. IEEE, 2019.

    Cited By

    View all
    • (2024)ESFuzzer: An Efficient Way to Fuzz WebAssembly InterpreterElectronics10.3390/electronics1308149813:8(1498)Online publication date: 15-Apr-2024
    • (2023)Validating JIT Compilers via Compilation Space ExplorationProceedings of the 29th Symposium on Operating Systems Principles10.1145/3600006.3613140(66-79)Online publication date: 23-Oct-2023
    • (2023)Feature-Sensitive Coverage for Conformance Testing of Programming Language ImplementationsProceedings of the ACM on Programming Languages10.1145/35912407:PLDI(493-515)Online publication date: 6-Jun-2023
    • Show More Cited By

    Index Terms

    1. SoFi: Reflection-Augmented Fuzzing for JavaScript Engines

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      CCS '21: Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security
      November 2021
      3558 pages
      ISBN:9781450384544
      DOI:10.1145/3460120
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 13 November 2021

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. fuzzing
      2. vulnerability

      Qualifiers

      • Research-article

      Funding Sources

      Conference

      CCS '21
      Sponsor:
      CCS '21: 2021 ACM SIGSAC Conference on Computer and Communications Security
      November 15 - 19, 2021
      Virtual Event, Republic of Korea

      Acceptance Rates

      Overall Acceptance Rate 1,261 of 6,999 submissions, 18%

      Upcoming Conference

      CCS '24
      ACM SIGSAC Conference on Computer and Communications Security
      October 14 - 18, 2024
      Salt Lake City , UT , USA

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)707
      • Downloads (Last 6 weeks)56

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)ESFuzzer: An Efficient Way to Fuzz WebAssembly InterpreterElectronics10.3390/electronics1308149813:8(1498)Online publication date: 15-Apr-2024
      • (2023)Validating JIT Compilers via Compilation Space ExplorationProceedings of the 29th Symposium on Operating Systems Principles10.1145/3600006.3613140(66-79)Online publication date: 23-Oct-2023
      • (2023)Feature-Sensitive Coverage for Conformance Testing of Programming Language ImplementationsProceedings of the ACM on Programming Languages10.1145/35912407:PLDI(493-515)Online publication date: 6-Jun-2023
      • (2023)A Usability Evaluation of AFL and libFuzzer with CS StudentsProceedings of the 2023 CHI Conference on Human Factors in Computing Systems10.1145/3544548.3581178(1-18)Online publication date: 19-Apr-2023
      • (2023)A lightweight and high-precision approach for bulky JavaScript engines fuzzing2023 IEEE 22nd International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom)10.1109/TrustCom60117.2023.00138(982-989)Online publication date: 1-Nov-2023
      • (2023)NodeMedic: End-to-End Analysis of Node.js Vulnerabilities with Provenance Graphs2023 IEEE 8th European Symposium on Security and Privacy (EuroS&P)10.1109/EuroSP57164.2023.00068(1101-1127)Online publication date: Jul-2023
      • (2023)Evaluating seed selection for fuzzing JavaScript enginesEmpirical Software Engineering10.1007/s10664-023-10340-928:6Online publication date: 26-Sep-2023
      • (2023)A novel combinatorial testing approach with fuzzing strategyJournal of Software: Evolution and Process10.1002/smr.253735:12Online publication date: 28-Dec-2023
      • (2022)Viopolicy-Detector: An Automated Approach to Detecting GDPR Suspected Compliance Violations in WebsitesProceedings of the 25th International Symposium on Research in Attacks, Intrusions and Defenses10.1145/3545948.3545952(409-430)Online publication date: 26-Oct-2022
      • (2022)KOP-Fuzzer: A Key-Operation-based Fuzzer for Type Confusion Bugs in JavaScript Engines2022 IEEE 46th Annual Computers, Software, and Applications Conference (COMPSAC)10.1109/COMPSAC54236.2022.00125(757-766)Online publication date: Jun-2022

      View Options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Get Access

      Login options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media