Lune

ISSTA2020Top-tier venue

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • JN-SAF: Precise and Efficient NDK/JNI-aware Inter-language Static Analysis Framework for Security Vetting of Android Applications with Native Code cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • NCScope: hardware-assisted analyzer for native code in Android apps cites JN-SAF: Precise and Efficient NDK/JNI-aware Inter-language Static Analysis Framework for Security Vetting of Android Applications with Native Code
  • NCScope: hardware-assisted analyzer for native code in Android apps cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • A Picture is Worth 500 Labels: A Case Study of Demographic Disparities in Local Machine Learning Models for Instagram and TikTok cites JN-SAF: Precise and Efficient NDK/JNI-aware Inter-language Static Analysis Framework for Security Vetting of Android Applications with Native Code
  • A Picture is Worth 500 Labels: A Case Study of Demographic Disparities in Local Machine Learning Models for Instagram and TikTok cites JuCify: A Step Towards Android Code Unification for Enhanced Static Analysis
  • JuCify: A Step Towards Android Code Unification for Enhanced Static Analysis cites JN-SAF: Precise and Efficient NDK/JNI-aware Inter-language Static Analysis Framework for Security Vetting of Android Applications with Native Code
  • JuCify: A Step Towards Android Code Unification for Enhanced Static Analysis cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. JuCify: A Step Towards Android Code Unification for Enhanced Static AnalysisJordan Samhi, Jun Gao, Nadia Daoudi, Pierre Graux et al.ICSE 2022 · 43 citations
  2. 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
  3. NCScope: hardware-assisted analyzer for native code in Android appsHao Zhou, Shuohan Wu, Xiapu Luo, Ting Wang et al.ISSTA 2022 · 16 citations
  4. 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
  5. TIPS: Tracking Integer-Pointer Value Flows for C++ Member Function PointersChangwei Zou, Dongjie He, Yulei Sui, Jingling XueFSE 2024 · 1 citation

Builds on3

  1. 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
  2. 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
  3. On the recall of static call graph construction in practiceLi Sui, Jens Dietrich, Amjed Tahir, George FourtounisICSE 2020 · 34 citations

Related papers

  1. NativeSummary: Summarizing Native Binary Code for Inter-language Static Analysis of Android AppsJikai Wang, Haoyu WangISSTA 2024 · 8 citations
  2. 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
  3. Broadening Horizons of Multilingual Static Analysis: Semantic Summary Extraction from C Code for JNI Program AnalysisSungho Lee, Hyogun Lee, Sukyoung RyuASE 2020 · 29 citations
  4. Call Graph Soundness in Android Static AnalysisJordan Samhi, René Just, Tegawendé F. Bissyandé, Michael D. Ernst et al.ISSTA 2024 · 8 citations
  5. JUSTGen: Effective Test Generation for Unspecified JNI Behaviors on JVMsSungjae Hwang, Sungho Lee, Jihoon Kim, Sukyoung RyuICSE 2021 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines