行動應用之終身程式行為的分析與重構
Toward App Lifetime Behavior Analysis and Reconstruction
摘要
每天都有惡意或是有漏洞的行動應用程式被發現。老練的惡意程 式沒有固定的行為模式故難以被發現,除非有更先進的分析技術被研 發出來。本篇論文先提出三個新穎的分析技術來改進現有行動應用程 式行為分析,包含檔案成份分析、分析複雜度降低、偵測模型純化。 這些技術能分別能增加分析的範圍、改進分析效能和準確性,但現有 的程式行為分析無法直接部署在真實的裝置之上。然而真實環境與實 驗室環境的差異,將會造成分析結果的不準確。為了能夠接近真實環 境,我們分離了行為分析與運行時期觀測,讓提出的方法能夠被部署 在真實的裝置上。藉由記錄運行時期的資訊,後續還原程式行為的方 法,使分析人員能夠獲得應用程式過去的行為。我們稱這種程序為程 式行為重構,相似於數位鑑識但採用了主動式的資料記錄。本論文第 二個重點在於提出程式行為重構,包含了使用者手勢紀錄與重現,還 有一種新穎的且精細的執行重構方法。這新穎的方法利用跨程序可分 配環境(IDE)來還原運行時變數的數值,得以決定條件判斷跳轉的 方向。我們認為跨元件溝通(ICC)是最好的程式行為表徵,在於它 傳遞了權限保護的資料和負責重要功能的執行。除此之外,所開發的 系統 Libericc 能夠刪減未執行過的程式碼,來減少分析的範圍。 Libericc 是第一個能夠運用在長時間程式行為重構的方法,展現出普 及行動應用程式稽核的可能性。
Malicious and vulnerable apps are uncovered every day. The sophisticated malware usually behaves erratically thereby being unnoticeable unless the advanced analysis or monitoring techniques are developed. This dissertation proposes three novel analysis techniques to improve app behavior analysis, including data composition analysis, anal- ysis complexity reduction, and detection model distillation. Although these techniques have an improvement in terms of analysis scope, performance, and accuracy, respec- tively, conventional analysis techniques are too heavyweight to be deployed on real devices. The inconsistency between a real environment and a lab environment makes the result inaccurate. To approach the real environment, we decouple the behavior anal- ysis from runtime monitoring that enables our approach can be deployed on real devices. With the runtime data logging, analysts can learn the program behavior of the past ex- ecution through analyzing the informative runtime record. We call this procedure app behavior reconstruction, similar to digital forensic, but with an active runtime infor- mation. The second part of this dissertation presents app behavior reconstruction tech- nique, including user gesture recording and replaying, and a novel, fine-grained execu- tion reconstruction. The novel reconstruction applies inter-procedural distributive en- vironment (IDE) to recover the runtime values of symbols, thus having the ability to decide the branching direction of the past execution. We consider the inter-component communication (ICC) as the best representation of app execution since it carries the permission-protected resources or the data for critical functions invocation. Moreover, the proposed system, Libericc, can prune the unexecuted code to narrow down the anal- ysis scope. Libericc is the first scheme suitable for long-term app behavior reconstruc- tion that shows the feasibility of ubiquitous app behavior auditing.