Identifying Java calls in native code via binary scanning
George Fourtounis, Leonidas Triantafyllou, Yannis Smaragdakis
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- JN-SAF: Precise and Efficient NDK/JNI-aware Inter-language Static Analysis Framework for Security Vetting of Android Applications with Native Code 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
- NCScope: hardware-assisted analyzer for native code in Android apps 引用了 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 引用了 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 引用了 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 引用了 JuCify: A Step Towards Android Code Unification for Enhanced Static Analysis
- JuCify: A Step Towards Android Code Unification for Enhanced Static Analysis 引用了 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 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
引用它的顶会 Paper7
- JuCify: A Step Towards Android Code Unification for Enhanced Static AnalysisJordan Samhi, Jun Gao, Nadia Daoudi, Pierre Graux 等ICSE 2022 · 43 次引用
- Use of Test Doubles in Android Testing: An In-Depth InvestigationMattia Fazzini, Chase Choi, Juan Manuel Copia, Gabriel Lee 等ICSE 2022 · 19 次引用
- NCScope: hardware-assisted analyzer for native code in Android appsHao Zhou, Shuohan Wu, Xiapu Luo, Ting Wang 等ISSTA 2022 · 16 次引用
- 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 等S&P 2024 · 7 次引用
- TIPS: Tracking Integer-Pointer Value Flows for C++ Member Function PointersChangwei Zou, Dongjie He, Yulei Sui, Jingling XueFSE 2024 · 1 次引用
它引用的 Paper3
- SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
- 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 等CCS 2018 · 93 次引用
- On the recall of static call graph construction in practiceLi Sui, Jens Dietrich, Amjed Tahir, George FourtounisICSE 2020 · 34 次引用
相关 Paper
- NativeSummary: Summarizing Native Binary Code for Inter-language Static Analysis of Android AppsJikai Wang, Haoyu WangISSTA 2024 · 8 次引用
- Interactive Cross-Language Pointer Analysis for Resolving Native Code in Java ProgramsChenxi Zhang, Yufei Liang, Tian Tan, Chang Xu 等ICSE 2025 · 1 次引用
- Broadening Horizons of Multilingual Static Analysis: Semantic Summary Extraction from C Code for JNI Program AnalysisSungho Lee, Hyogun Lee, Sukyoung RyuASE 2020 · 29 次引用
- Call Graph Soundness in Android Static AnalysisJordan Samhi, René Just, Tegawendé F. Bissyandé, Michael D. Ernst 等ISSTA 2024 · 8 次引用
- JUSTGen: Effective Test Generation for Unspecified JNI Behaviors on JVMsSungjae Hwang, Sungho Lee, Jihoon Kim, Sukyoung RyuICSE 2021 · 12 次引用
