簡易檢索 / 詳目顯示

研究生: 郭皓程
Hao-Cheng Kuo
論文名稱: 利用QEMU動態資訊分析二進為程式變數型態
Using QEMU dynamic information to analyze the variable types in binary program
指導教授: 黃元欣
Yuan-Shin Hwang
口試委員: 謝仁偉
Jen-Wei Hsieh
賴祐吉
Yu-Chi Lai
學位類別: 碩士
Master
系所名稱: 電資學院 - 資訊工程系
Department of Computer Science and Information Engineering
論文出版年: 2018
畢業學年度: 107
語文別: 中文
論文頁數: 51
中文關鍵詞: QEMUbinary分析變數型態分析
外文關鍵詞: QEMU, binary analysis, variable types analysis
相關次數: 點閱:159下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報

軟體逆向工程在現今社會扮演很重要的角色,從商業軟件(商業軟件)到惡意程式(惡意軟件)這些沒有開放原始碼的程式,當我們想要了解程序其中的特性就需要逆向工程技術的幫忙, 換句話說也就是在沒有原始碼的情況下,對二進制進行分析,了解程式的內容與行為。
在這篇論文中我們所使用的工具QEMU,它的用戶模式模擬模式,能啟動由不同中央處理器(CPU)編譯的Linux程式,藉由將原程式機械碼反組譯成中間表示式 (TCG IR)再轉換成本機處理器可以執行的機械碼,在最後階段執行程式,而在轉換的過程中有許多程序執行的資訊,我們記錄這些資訊進而分析程式。
而此論文的方法,我們根據程序在內存配置的架構,搭配收集QEMU執行程式過程中的資訊,透過我們實作的分析方法來找到程式中變數的個數並且區分變數的模態。


軟體逆向工程在現今社會扮演很重要的角色,從商業軟件(商業軟件)到惡意程式(惡意軟件)這些沒有開放原始碼的程式,當我們想要了解程序其中的特性就需要逆向工程技術的幫忙, 換句話說也就是在沒有原始碼的情況下,對二進制進行分析,了解程式的內容與行為。
在這篇論文中我們所使用的工具QEMU,它的用戶模式模擬模式,能啟動由不同中央處理器(CPU)編譯的Linux程式,藉由將原程式機械碼反組譯成中間表示式 (TCG IR)再轉換成本機處理器可以執行的機械碼,在最後階段執行程式,而在轉換的過程中有許多程序執行的資訊,我們記錄這些資訊進而分析程式。
而此論文的方法,我們根據程序在內存配置的架構,搭配收集QEMU執行程式過程中的資訊,透過我們實作的分析方法來找到程式中變數的個數並且區分變數的模態。

論文摘要 1 誌謝 3 目錄 4 第一章 序論 6 1.1 研究背景 6 1.2 研究動機 6 1.3 研究目的 7 1.4 研究方法 7 1.5 論文架構 8 第二章 文獻回顧 9 2.1 Executable and Linkable Format 9 2.2 QEMU 11 2.3 Binary analysis 16 2.4 相關研究 18 第三章 方法 22 3.1 概念 22 3.2 架構說明 25 3.3 Variable type analysis 29 3.3.1 stack variable 29 3.3.2 Stack Variable type 31 3.3.3 Array/Structure 33 3.3.4 Pointer 35 3.3.5 Global variable 37 第四章 實驗結果 39 4.1 實驗平台 39 4.2 準確度評估 40 第五章 結論 44 5.1 結論 44 5.2 未來展望 44 參考文獻 45

[1] F. Bellard, “Qemu, a fast and portable dynamic translator,”in USENIX Annual Technical Conference, FREENIX Track, 2005, pp.41-46.
[2] Executable and Linkable Format(ELF) http://www.skyfree.org/linux/references/ELF_Format.pdf
[3] R. L. Sites, A. Chernoff, M. B. Kirk, M. P. Marks, and S. G. Robinson. “Binary translation”. Communications of the ACM,36(2):69-81, February 1993.
[4] C. Cifuentes and M. V. Emmerik, ”UQBT: Adaptable Binary Translation at Low Cost,” Computer, vol.33, pp.60- 66, March 2000.
[5] V. Bala, E. Duesterwald, and S. Banerjia, “Dynamo: a transparent dynamic optimization system,” in PLDI ’00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation. New York, NY, USA: ACM, 2000, pp. 1-12.
[6] “GCC, the GNU Compiler Collection,” https://gcc.gnu.org/
[7] “Tiny Code Generator (TCG) Documentation,” https://wiki.qemu.org/Documentation/TCG
[8] Gogul Balakrishnan, Thomas Reps, “DIVINE: Discovering Variables IN Executables”, VMCAI 2007: Verification, Model Checking, and Abstract Interpretation pp. 1-28.
[9] Khaled ElWazeer, Kapil Anand, Aparna Kotha, Matthew Smithson, Rajeev Barua, “Scalable Variable and Data Type Detection in a Binary Rewriter”, Proceeding PLDI '13 Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation Pages 51-60.
[10] Gogul Balakrishnan, Thomas Reps, ”Analyzing Memory Accesses in x86 Executable”, CC 2004: Compiler Construction pp. 5-23.
[11] G. Ramalingam, John Field, Grank Tip, “Aggregate structure identification and its application to program analysis”, POPL’99 Proceedings of the 26th ACM SIGPLAN- SIGACT Symposium on Principles of programming languages Pages 119-132.
[12] Frances E. Allen IBM Corporation, “Control flow analysis” SIGPLAN Proceedings of a symposium on Compiler optimization, Pages 1-19.
[13] F. E. Allen, J. Cocke, “A program data flow analysis procedure”, Communications of the ACM, Volume 19 Issue 3, March 1976, Page 137.
[14] Tiffany Bao, Jonathan Burket, Maverick Woo, Rafael Turner, David Brumley, “BYTEWEIGHT: Learning to Recognize Functions in Binary Code”, Proceedings of the 23rd USENIX Security Symposium. August 20-22, 2014.
[15] Giridhar Ravipati, Andrew R. Bernat, Nate Rosenblum, Barton P. Miller, Jeffrey K. Hollingsworth, “Toward the Deconstruction of Dyninst”
https://pdfs.semanticscholar.org/0288/1fe0a909001740ab48b8cfa5161f49fb49ea.pdf
[16] Objdump. GNU Binary Utilities. ftp://ftp.gnu.org/old-gnu/Manuals/binutils-
2.10.1/html_node/binutils_6.html
[17] ARM binary executable http://infocenter.arm.com/help/topic/com.arm.doc.dui00
41c/DUI0041C.pdf
[18] MIPS https://www.mips.com/
[19] MiBench: A free, commercially representative embedded benchmark suite,
http://vhosts.eecs.umich.edu/mibench/Publications/MiBench.pdf

QR CODE