信息网络安全 ›› 2026, Vol. 26 ›› Issue (2): 263-273.doi: 10.3969/j.issn.1671-1122.2026.02.007
收稿日期:2025-03-25
出版日期:2026-02-10
发布日期:2026-02-23
通讯作者:
傅建明 jmfu@whu.edu.cn
作者简介:程龙(2000—),男,河南,硕士研究生,主要研究方向为移动安全|解梦飞(1997—),男,山东,博士研究生,主要研究方向为系统安全、漏洞挖掘|吴鸿涛(2000—),男,河南,硕士研究生,主要研究方向为系统安全|傅建明(1969—),男,湖南,教授,博士,CCF会员,主要研究方向为系统安全、移动安全
基金资助:
CHENG Long, XIE Mengfei, WU Hongtao, FU Jianming(
)
Received:2025-03-25
Online:2026-02-10
Published:2026-02-23
摘要:
移动操作系统通过预先编译将应用中的字节码翻译为机器码并存储在odex文件中,以提升应用的启动和运行效率。然而,系统框架代码更新后odex文件会失效,导致应用需要重新编译,影响用户体验。对已有odex文件进行静态重写可避免重新编译,但是现有的静态重写技术较少关注odex文件及系统环境变化引发的重写问题。针对上述问题,文章提出一种基于编译辅助的odex文件重写方法,利用编译过程中收集的指令信息,指导对odex文件的精准静态重写,使其适应不同的系统环境。基于该方法实现原型系统,并对50个高流行度的应用进行了实验评估。实验结果表明,该原型系统能够有效实现odex文件重写,与重新编译应用相比,重写odex文件的时间开销平均仅为重新编译时间的6.85%。
中图分类号:
程龙, 解梦飞, 吴鸿涛, 傅建明. 一种基于编译辅助的odex文件重写方法[J]. 信息网络安全, 2026, 26(2): 263-273.
CHENG Long, XIE Mengfei, WU Hongtao, FU Jianming. A Compiler-Assisted odex File Rewriting Method[J]. Netinfo Security, 2026, 26(2): 263-273.
表3
本文方案的各项时间开销数据
| 应用包名 | 产物大小 /MB | 编译 时间/s | 编译额外时间/s | 重写 时间/s | 节约 时间 /s | 保存dex时间/s |
|---|---|---|---|---|---|---|
| com.baidu.netdisk | 699 | 52.36 | 14.31 | 4.09 | 33.96 | 0.88 |
| com.eg.android.AlipayGphone | 649 | 40.45 | 5.97 | 5.25 | 29.23 | 0.61 |
| com.ss.android.article.news | 630 | 42.50 | 7.27 | 2.24 | 32.97 | 0.81 |
| com.tencent.qqlive | 668 | 53.70 | 10.57 | 6.71 | 36.41 | 1.23 |
| com.tencent.qqmusic | 626 | 44.44 | 10.15 | 7.28 | 27.00 | 0.95 |
| tv.danmaku.bili | 585 | 43.95 | 11.12 | 3.39 | 29.43 | 1.04 |
| com.baidu.searchbox | 545 | 34.34 | 8.22 | 2.56 | 23.55 | 0.64 |
| com.smile.gifmaker | 553 | 43.64 | 3.69 | 2.24 | 37.71 | 1.01 |
| com.ss.android.article.lite | 531 | 35.14 | 4.81 | 1.58 | 28.74 | 0.69 |
| com.cat.readall | 535 | 39.06 | 7.10 | 2.07 | 29.89 | 0.68 |
| [1] | StatCounter. Operatign System Market Share Worldwide[EB/OL]. (2024-10-31)[2024-10-31]. https://gs.statcounter.com/os-market-share. |
| [2] |
MA Yun, LIU Xuanzhe, LIU Yi, et al. A Tale of Two Fashions: An Empirical Study on the Performance of Native Apps and Web Apps on Android[J]. IEEE Transactions on Mobile Computing, 2018, 17(5): 990-1003.
doi: 10.1109/TMC.2017.2756633 URL |
| [3] | MA Sijun, XIAO Rong, CHENG Jiangwei. Research on Performance Data Acquisition Probe of Android Application[J]. Computer Applications and Software, 2017, 34(7): 192-197. |
| 马思峻, 肖荣, 成江伟. Android应用性能数据采集探针研究[J]. 计算机应用与软件, 2017, 34(7): 192-197. | |
| [4] |
VISOCHAN A, STROGANOV A, TITARENKO I, et al. Method for Profile-Guided Optimization of Android Applications Using Random Forest[J]. IEEE Access, 2022, 10: 109652-109662.
doi: 10.1109/ACCESS.2022.3214971 URL |
| [5] | Google. Android Runtime and Dalvik[EB/OL]. (2024-04-26)[2024-10-31]. https://source.android.com/docs/core/runtime. |
| [6] | Google. Configure ART[EB/OL]. (2024-04-26)[2024-10-31]. https://source.android.com/docs/core/runtime/configure. |
| [7] | HARSHA K. How Many Apps Does the Average Person Have?[EB/OL]. (2023-06-16)[2024-10-31]. https://dataprot.net/statistics/how-many-apps-does-the-average-person-have/. |
| [8] | SMITHSON M, ELWAZEER K, ANAND K, et al. Static Binary Rewriting without Supplemental Information: Overcoming the Tradeoff between Coverage and Correctness[C]// IEEE. 2013 20th Working Conference on Reverse Engineering (WCRE). New York: IEEE, 2013: 52-61. |
| [9] | DI F A, PAYER M, AGOSTA G. Rev.ng: A Unified Binary Analysis Framework to Recover CFGs and Function Boundaries[C]// ACM. The 26th International Conference on Compiler Construction. New York: ACM, 2017: 131-141. |
| [10] | DINABURG A, RUEF A. Mcsema: Static Translation of x86 Instructions to LLVM IR[EB/OL]. (2024-04-26)[2024-10-31]. https://github.com/trailofbits/publications/tree/master/presentations/McSema%20-%20Static%20Translation%20of%20x86%20instructions%20to%20LLVM%20IR. |
| [11] | WANG Ruoyu, SHOSHITAISHVILI Y, BIANCHI A, et al. Ramblr: Making Reassembly Great Again[EB/OL]. (2017-10-05)[2024-10-31]. https://www.ndss-symposium.org/wp-content/uploads/2017/09/ndss2017_10-5_Wang_paper_0.pdf. |
| [12] | WANG Shuai, WANG Pei, WU Dinghao. Reassembleable Disassembling[EB/OL]. (2015-08-12)[2024-10-31]. https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-wang-shuai.pdf. |
| [13] | HISER J D, NGUYEN-TUONG A, CO M, et al. A Framework for Creating Binary Rewriting Tools (Short Paper)[C]// IEEE. 2014 Tenth European Dependable Computing Conference. New York: IEEE, 2014: 142-145. |
| [14] | WILLIAMS-KING D, KOBAYASHI H, WILLIAMS-KING K, et al. Egalito: Layout-Agnostic Binary Recompilation[C]// ACM. The Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems. New York: ACM, 2020: 133-147. |
| [15] | PARZEFALL F, DESHPANDE C, HETZELT F, et al. What You Trace Is What You Get: Dynamic Stack-Layout Recovery for Binary Recompilation[C]// ACM. The 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2. New York:ACM, 2024: 1250-1263. |
| [16] | DUCK G J, GAO Xiang, ROYCHOUDHURY A. Binary Rewriting without Control Flow Recovery[C]// ACM. The 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. New York: ACM, 2020: 151-163. |
| [17] | DI B L, MOGHADDAS H, PAYER M. ARMore: Pushing Love Back Into Binaries[C]// USENIX. The 32nd USENIX Security Symposium (USENIX Security 23). Berkeley: USENIX, 2023: 6311-6328. |
| [18] | KOO H, CHEN Yaohui, LU Long, et al. Compiler-Assisted Code Randomization[C]// IEEE. 2018 IEEE Symposium on Security and Privacy (SP). New York: IEEE, 2018: 461-477. |
| [19] |
XIE Mengfei, LIN Yan, LUO Chenke, et al. PointerScope: Understanding Pointer Patching for Code Randomization[J]. IEEE Transactions on Dependable and Secure Computing, 2023, 20(4): 3019-3036.
doi: 10.1109/TDSC.2022.3203043 URL |
| [20] | Google. Dalvik Bytecode Format[EB/OL]. (2024-08-05)[2024-10-31]. https://source.android.com/docs/core/runtime/dalvik-bytecode. |
| [1] | 张光华, 李国瑜, 王鹤, 李珩, 武少广. 基于污点流分析的物联网固件高可信度漏洞检测[J]. 信息网络安全, 2026, 26(2): 325-337. |
| [2] | 赵佳, 王妍淳, 马洪亮, 李琪. 基于可信执行环境的层次角色基分级加密方案[J]. 信息网络安全, 2026, 26(2): 315-324. |
| [3] | 许朴, 孙心怡, 朱永根. 基于过程间字符串常量分析的Java注入漏洞检测方法[J]. 信息网络安全, 2026, 26(2): 304-314. |
| [4] | 胡航, 冯凯, 谭晶磊, 张玉臣. 基于Moran过程和随机演化博弈模型的网络防御决策方法[J]. 信息网络安全, 2026, 26(2): 291-303. |
| [5] | 顾兆军, 李丽, 隋翯. 基于大语言模型的SQL注入漏洞检测载荷生成方法[J]. 信息网络安全, 2026, 26(2): 274-290. |
| [6] | 韩益亮, 冯浩康, 吴旭光, 孙钰腾, 王圆圆. 基于神经网络的随机数生成器评估综述[J]. 信息网络安全, 2026, 26(2): 171-188. |
| [7] | 林甜甜, 王奕天, 王小航, 竺婷, 任奎. CCASim:Arm机密计算架构性能仿真器研究[J]. 信息网络安全, 2026, 26(2): 189-210. |
| [8] | 陶慈, 陈昊然, 陈平. 面向工控系统的C语言异常处理路径定向模糊测试方法[J]. 信息网络安全, 2026, 26(2): 211-223. |
| [9] | 曹仁龙, 胡红钢. 基于Grover算法的高斯筛法量子线路设计方法[J]. 信息网络安全, 2026, 26(2): 224-235. |
| [10] | 王腾, 樊坤渭, 张瑶. 面向分布式学习的多密钥同态加密与差分隐私融合方案[J]. 信息网络安全, 2026, 26(2): 236-250. |
| [11] | 杨乐, 何慧阳, 尤玮婧, 张佰韬, 林璟锵. 适用于轻量级客户端的多方隐私集合求交协议[J]. 信息网络安全, 2026, 26(2): 251-262. |
| [12] | 郭毅, 李旭青, 张子蛟, 张宏涛, 张连成, 张香丽. 基于区块链的数据安全共享研究[J]. 信息网络安全, 2026, 26(1): 1-23. |
| [13] | 郑开发, 骆振鹏, 刘嘉奕, 刘志全, 王赜, 吴云坤. 支持属性更新的轻量级联邦学习节点动态参与方案[J]. 信息网络安全, 2026, 26(1): 102-114. |
| [14] | 李冬, 高源, 于俊清, 曾木虹, 陈俊鑫. 一种基于P4的多模态网络控制与安全检测方案[J]. 信息网络安全, 2026, 26(1): 115-124. |
| [15] | 董佳瑜, 高宏民, 马兆丰, 赖冠辉. 多重签名机制在区块链中的研究及实现[J]. 信息网络安全, 2026, 26(1): 125-138. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||