透過您的圖書館登入
IP:3.144.102.239
  • 學位論文

Android的Dex反編譯器設計與實作:型態推斷部分

Android’s Dex Decompiler: Type Inference Part

指導教授 : 陳俊良

摘要


目前Android系統上的應用程式主要是由Java撰寫並編譯成為class檔案,而後再經由Android的dx編譯成dex檔案。dex檔案格式為一個register-based指令集以及為了行動裝置所最佳化而成的格式。目前對於dex的二元轉換工具仍然不夠豐富,而Java二元轉換工具多年來已經累積相當多的成果,因此將dex檔案加入豐富的Java二元轉換工具是目前的主要目標。 由於dex檔案在產生時並未將區域變數的型態資訊寫入,因此若要將dex檔案加入Java二元轉換工具中,其中一個重要的目標就是要將區域變數的型態補足。另外因為Android系統指令對於型態的寬鬆態度,使得型態推斷更加的困難,本論文提出並且實作了一個可以讀取dex檔案並且轉換為中介格式,最後實作出可以將區域變數的型態資訊補足的type inferencer,經由實驗,我們也成功的將數個程式從dex檔案格式反編譯成java檔案格式。

關鍵字

反編譯器 型態推斷 Android dex 逆向工程

並列摘要


Currently, Android applications are mainly written in Java language. After using javac to compile these Java source files into Java class files, we use Android dx compiler to convert these Java class files to dex files furthermore. Dex file is a kind of register-based instruction set and optimized for mobile devices. At present, the binary transformations for dex are not rich, but the binary transformation for Java are developed for many years. Therefore, our main target is joining dex file to Java binary transformations. Dx compiler would not write local variable type information into dex file in codegen step. If we want to join dex file to Java binary transformation family, the main problem is that we need to infer the local variable type. Furthermore, Android system takes a lazy attitude about type. It causes type inference in dex more difficult. In this thesis, we provide and implement a type inferencer which can read dex file, transform it to the intermediate representation, and infer the local variable type. We also successfully decompile program from dex file format to the java file format by our experimentation.

並列關鍵字

Decompiler Type Inference Android dex Reversed Engineering

參考文獻


[8] P. Pominville, F. Qian, R. Vall’ee-Rai, L. Hendren, and C. Verbrugge, "A framework for optimizing Java using attributes," CC 2001, vol. 2027 of Lecture Notes in Computer Science, p. 334+, 2001.
[14] R. Vall’ee-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan, "Soot - a Java bytecode optimization framework," Proceedings of CASCON '99, pp. 125-135, 1999.
[15] R. Vall’ee-Rai, E. Gagnon, L. Hendren, P. Lam, P. Pominville and V. Sundaresan, "Optimizing Java bytecode using the Soot frame-work: Is it feasible?," Proceedings of CC'00, vol. 1781 of Lecture Notes in Computer Science, pp. 18-34, 2000.
[16] J. Lhot’ak, O. Lhot’ak and L. Hendren, "Integrating the Soot compiler infrastructure into an IDE," Proceedings of the 13th International Conference of Compiler Construction, vol. 2985 of Lecture Notes in Computer Science, pp. 281-297, Apr. 2004.
[18] E. M. Gagnon and L. J. Hendren, "Intra-Procedural Inference of Static Types for Java Bytecode," Technical Report Sable 1998-5, Oct. 1998.

被引用紀錄


劉必宏(2012)。Dalvik可執行檔之二元轉換〔碩士論文,國立臺灣大學〕。華藝線上圖書館。https://doi.org/10.6342/NTU.2012.01262

延伸閱讀