arrow
Return

Reverse Engineering of Obfuscated Lua Bytecode via Interpreter Semantics Testing

delete2023-01-01
delete2
PRE
AI
C
Chenke Luo
J
Jiang Ming
傅
傅建明 (Jianming Fu) *
G
Guojun Peng
Z
Zhetao Li
DOI:10.1109/TIFS.2023.3289254delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
As an efficient and multi-platform scripting language, Lua is gaining increasing popularity in the industry. Unfortunately, Lua's unique advantages also catch cybercriminals' attention. A growing number of IoT malware authors switch to Lua for malicious payload development and then distribute malware in bytecode form. To impede malware code analysis, malware authors obfuscate standard Lua bytecode into a customized bytecode specification. Only the attached interpreter can execute that particular bytecode file. Rapid recovery of Lua obfuscated bytecode is essential for a swift response to new malware threats. However, existing generic code deobfuscation approaches cannot keep up with the pace of emerging threats. In this paper, we present a novel reverse engineering technique, called interpreter semantics testing. Given a customized interpreter used to execute obfuscated Lua bytecode, we construct a set of LuaGadgets that can adapt to the customized interpreter. Each LuaGadget contains a carefully chosen opcode sequence to fulfill an observable calculation-it is designed to test one or two particular opcodes at a time. Next, we mutate unknown opcode values to generate a bunch of test cases and run them using the customized interpreter; we can observe the expected result only when the mutation hits the opcode's right value. We perform test case prioritization to cost-effectively recover the semantics of all obfuscated opcodes. Our approach makes no assumptions about the interpreter's structure and is free from analyzing the numerous execution traces of opcode handlers. We have evaluated our tool, LuaHunt, with Lua malware variants and real-world applications. LuaHunt is able to recover the obfuscated bytecode's semantics within 90 seconds for each test case, and all of our deobfuscation results can pass the correctness testing. The encouraging results demonstrate that LuaHunt is a promising tool to lighten the burden of security analysts.
Keywords:
Malware
Codes
Semantics
Testing
Virtualization
Standards
Source coding
Malware analysis
bytecode obfsucation
deobfuscation
Lua
interpreter semantics testing
A detection framework for semantic code clones and obfuscated code
err2018-05-01
err28
PREAI
errSheneamer, Abdullah; Roy, Swarup; Kalita, Jugal
errShare
errSave
Covert Computation Hiding code in code through compile-time obfuscation
err2014-05-01
err13
PREAI
errSchrittwieser, Sebastian; Katzenbeisser, Stefan; Kieseberg, Peter; Huber, Markus; Leithner, Manuel; Mulazzani, Martin; Weippl, Edgar
errShare
errSave
Obfuscation-Resilient Android Malware Analysis Based on Complementary Features
err2023-01-01
err14
PREAI
errGao, Cuiying; Cai, Minghui; Yin, Shuijun; Huang, Gaozhun; Li, Heng; Yuan, Wei; Luo, Xiapu
errShare
errSave
An alternative to code comment generation? Generating comment from bytecode
err2025-03-01
err0
PREAI
errChen, Xiangping; Chen, Junqi; Lian, Zhilu; Huang, Yuan; Zhou, Xiaocong; Wu, Yunzhi; Zheng, Zibin
errShare
errSave
Semantics-aware obfuscation scheme prediction for binary
err2020-12-01
err6
errOAAI
errZhao, Yujie; Tang, Zhanyong; Ye, Guixin; Peng, Dongxu; Fang, Dingyi; Chen, Xiaojiang; Wang, Zheng
errShare
errSave
errShare
errSave
errShare
errSave

Journal

IEEE Transactions on Information Forensics and Security cover
IEEE Transactions on Information Forensics and Security
IF:
8
Papers:
5.5K
Citations:
3.0W

Organization

T
Tulane University
Scholars:
491
Papers: 221
Citations: 5.9K
Jinan University cover
Jinan University
Scholars:
3.2K
Papers: 963
Citations: 2.0W
wuhan university cover
wuhan university
Scholars:
7.3K
Papers: 2.2K
Citations: 4.9W
researcher View more organizations
Cited Papers

Cited Papers

A short history of auxin-binding proteins
err2002-01-01
err0
PREAI
errRichard M. Napier; Karine M. David; Catherine Perrot-Rechenmann
errShare
errSave
errShare
errSave
Mental Health Smartphone Apps: Review and Evidence-Based Recommendations for Future Developments
err2016-03-01
err0
errOAAI
errDavid Bakker; Nikolaos Kazantzis; Debra Rickwood; Nikki Rickard
errShare
errSave
The sense of taste.
err
IF0
err1917-01-01
err0
PREAI
errH. L. Hollingworth; A. T. Poffenberger
errShare
errSave
errShare
errSave
errShare
errSave
The Common Representative Intermediates Mechanism Version 2 in the United Kingdom Chemistry and Aerosols Model
err2021-05-07
err0
errOAAI
errS. Archer‐Nicholls; N. L. Abraham; Y. M. Shin; J. Weber; M. R. Russo; D. Lowe; S. R. Utembe; F. M. O'Connor; B. Kerridge; B. Latter; R. Siddans; M. Jenkin; O. Wild; A. T. Archibald
errShare
errSave
Developmental constraint shaped genome evolution and erythrocyte loss in Antarctic fishes following paleoclimate change
err2020-10-27
err0
errOAAI
errJacob M. Daane; Juliette Auvinet; Alicia Stoebenau; Donald Yergeau; Matthew P. Harris; H. William Detrich
errShare
errSave
Binary-Code Obfuscations in Prevalent Packer Tools
err2013-07-11
err93
errOAAI
errRoundy, Kevin A.; Miller, Barton P.
errShare
errSave
researcher View more