Demystifying React Native Android Apps for Static Analysis

Yonghui Liu, Xiao Chen, Pei Liu, Jordan Samhi, John Grundy, Chunyang Chen, Li Li

Research output: Contribution to journalArticlepeer-review

Abstract

React Native, an open source framework, simplifies cross-platform app development by allowing JavaScript-side code to interact with native-side code. Previous studies disregarded React Native, resulting in insufficient static analysis of React Native app code. This study initiates the investigation of challenges when statically analyzing React Native apps. We propose ReuNify to improve Soot-based static analysis coverage for JavaScript-side and native-side code. ReuNify converts Hermes bytecode to Soot's intermediate representation. Hermes bytecode, compiled from JavaScript code and integrated into React Native apps, possesses a unique syntax that eludes current JavaScript analyzers. Additionally, we investigate opcode distribution and conduct in-depth analyses of the usage of opcode between popular apps and malware. We also propose a benchmark consisting of 97 control flow-related cases to validate the control flow recovery of the generated intermediate representation. Furthermore, we model the cross-language communication mechanisms of React Native to expand the static analysis coverage for native-side code. Our evaluation demonstrates that ReuNify enables an average increase of 84% in reached nodes within the callgraph and further identifies an average of two additional privacy leaks in taint analysis. In summary, this article demonstrates that ReuNify significantly improves the static analysis for the React Native Android apps.

Original languageEnglish
Article number107
JournalACM Transactions on Software Engineering and Methodology
Volume34
Issue number4
DOIs
StatePublished - 28 Apr 2025

Keywords

  • Android
  • Mobile App
  • React Native
  • Static Analysis

Fingerprint

Dive into the research topics of 'Demystifying React Native Android Apps for Static Analysis'. Together they form a unique fingerprint.

Cite this