Identifying Java calls in native code via binary scanning
George Fourtounis, Leonidas Triantafyllou, Yannis Smaragdakis
Abstract
Current Java static analyzers, operating either on the source or bytecode level, exhibit unsoundness for programs that contain native code. We show that the Java Native Interface (JNI) specification, which is used by Java programs to interoperate with Java code, is principled enough to permit static reasoning about the effects of native code on program execution when it comes to call-backs. Our approach consists of disassembling native binaries, recovering static symbol information that corresponds to Java method signatures, and producing a model for statically exercising these native call-backs with appropriate mock objects. The approach manages to recover virtually all Java calls in native code, for both Android and Java desktop applications-(a) achieving 100% native-to-application call-graph recall on large Android applications (Chrome, Instagram) and (b) capturing the full native call-back behavior of the XCorpus suite programs. CCS CONCEPTS • Software and its engineering → Compilers; • Theory of computation → Program analysis.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f77cb3cf-4f12-4e56-91cb-205d197b34a8Cited by top-tier papers7
- JuCify: A Step Towards Android Code Unification for Enhanced Static AnalysisJordan Samhi, Jun Gao, Nadia Daoudi, Pierre Graux et al.ICSE 2022 · 43 citations
- Use of Test Doubles in Android Testing: An In-Depth InvestigationMattia Fazzini, Chase Choi, Juan Manuel Copia, Gabriel Lee et al.ICSE 2022 · 19 citations
- NCScope: hardware-assisted analyzer for native code in Android appsHao Zhou, Shuohan Wu, Xiapu Luo, Ting Wang et al.ISSTA 2022 · 16 citations
- A Picture is Worth 500 Labels: A Case Study of Demographic Disparities in Local Machine Learning Models for Instagram and TikTokJack West, Lea Thiemt, Shimaa Ahmed, Maggie Bartig et al.S&P 2024 · 7 citations
- TIPS: Tracking Integer-Pointer Value Flows for C++ Member Function PointersChangwei Zou, Dongjie He, Yulei Sui, Jingling XueFSE 2024 · 1 citation
Builds on3
- SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens et al.S&P 2016 · 1,085 citations
- JN-SAF: Precise and Efficient NDK/JNI-aware Inter-language Static Analysis Framework for Security Vetting of Android Applications with Native CodeFengguo Wei, Xingwei Lin, Xinming Ou, Ting Chen et al.CCS 2018 · 93 citations
- On the recall of static call graph construction in practiceLi Sui, Jens Dietrich, Amjed Tahir, George FourtounisICSE 2020 · 34 citations
Related papers
- Interactive Cross-Language Pointer Analysis for Resolving Native Code in Java ProgramsChenxi Zhang, Yufei Liang, Tian Tan, Chang Xu et al.ICSE 2025 · 1 citation
- NativeSummary: Summarizing Native Binary Code for Inter-language Static Analysis of Android AppsJikai Wang, Haoyu WangISSTA 2024 · 8 citations
- Broadening Horizons of Multilingual Static Analysis: Semantic Summary Extraction from C Code for JNI Program AnalysisSungho Lee, Hyogun Lee, Sukyoung RyuASE 2020 · 29 citations
- Call Graph Soundness in Android Static AnalysisJordan Samhi, René Just, Tegawendé F. Bissyandé, Michael D. Ernst et al.ISSTA 2024 · 8 citations
- JUSTGen: Effective Test Generation for Unspecified JNI Behaviors on JVMsSungjae Hwang, Sungho Lee, Jihoon Kim, Sukyoung RyuICSE 2021 · 12 citations
