一種基于代碼和數據分離的代碼復用攻擊防御方法
本文選題:代碼復用攻擊 + QEMU; 參考:《華中科技大學》2016年碩士論文
【摘要】:代碼復用攻擊是一種不需要引入外部代碼,利用庫函數或程序自身代碼達到攻擊目的的攻擊方式。它具備圖靈完全計算能力,同時極具威脅性和隱蔽性。雖然如今主流的操作系統(tǒng)通過使用DEP(Data Execution Prevention)和ASLR(Address Space Layout Randomization)等防御策略,能夠阻止傳統(tǒng)的代碼注入攻擊和靜態(tài)的代碼復用攻擊。但是動態(tài)代碼復用攻擊的出現(xiàn)打破了DEP和ASLR筑建的防護壁壘,向計算機系統(tǒng)安全發(fā)起了新的挑戰(zhàn)。針對代碼復用攻擊需要“掃描”內存來構造具有攻擊力的gadget(代碼復用片段)鏈這一特征,提出了一種基于代碼和數據分離的代碼復用攻擊防御方法。該方法在虛擬機管理器層,利用虛擬多TLB機制分離代碼的讀和執(zhí)行,阻止攻擊者構造gadget鏈,從而達到防御代碼復用攻擊的目的。虛擬多TLB機制是指對現(xiàn)有虛擬機的內存管理單元進行擴充(即新增一個與TLB具有相似結構和功能的DTLB)。為了改變以前代碼同時具有可讀可執(zhí)行的混合權限,將代碼和數據分別保存到只讀和只可執(zhí)行的內存區(qū)域,然后利用TLB和DTLB分別對代碼和數據進行訪問。以開源虛擬機QEMU為開發(fā)平臺,構建了基于代碼和數據分離的代碼復用攻擊防御系統(tǒng)。整個防御過程分成預處理、頁面加載和頁面訪問三個階段。其中,預處理階段分離出代碼中的數據并將它們作為一個新段保存到可執(zhí)行文件中,頁面加載時將代碼和數據加載到不同屬性的內存區(qū)域,頁面訪問實現(xiàn)代碼的讀和執(zhí)行的分離。經過測試,原型系統(tǒng)能夠有效地隱藏gadget(如msvcr7.dll中可利用的gadget數目從3146下降到4)并能夠準確地防御利用CVE-2012-1876和CVE-2012-1889漏洞構造的代碼復用攻擊;系統(tǒng)的性能損耗率為58.4%。實驗結果證明在虛擬機系統(tǒng)中實現(xiàn)所提出的基于代碼和數據分離的代碼復用攻擊防御方法是有效的、可行的。
[Abstract]:Code reuse attack is an attack that does not need to introduce external code, use library function or program itself code to achieve attack purposes. It has Turing complete computing power, with great threat and concealment. Although the mainstream operating system is now using DEP (Data Execution Prevention) and ASLR (Address Space Layout Ra) Ndomization) and other defense strategies can prevent traditional code injection attacks and static code reuse attacks. However, the emergence of dynamic code reuse attacks breaks the protection barriers built by DEP and ASLR and poses new challenges to computer system security. Gadget (code multiplexed fragment) chain is a feature that proposes a code reuse attack defense method based on code and data separation. This method separates code reading and execution in virtual machine manager layer and uses virtual multiple TLB mechanism to prevent attackers to construct gadget chain, thus achieving the purpose of defending code reuse attacks. Virtual multiple TLB mechanism It is an extension of the memory management unit of existing virtual machines (that is, a new DTLB with a similar structure and function with TLB). In order to change the readable and executable permissions of the previous code, the code and data are saved to the read-only and only executable memory domain, and then the code and the data are used by TLB and DTLB respectively. With the open source virtual machine QEMU as the development platform, the code and data separation code reuse attack defense system is constructed. The whole defense process is divided into three stages: preprocessing, page loading and page access. In the preprocessing phase, the data in the code is separated and stored as a new segment to the executable file. When the page is loaded, the code and data are loaded into the memory area of different attributes, and the page access is separated from the read and execution of the code. After testing, the prototype system can effectively hide the gadget (as the number of gadget available in the msvcr7.dll is reduced from 3146 to 4) and can accurately defend the CVE-2012-1876 and CVE-2012-1889 vulnerabilities. The code reuse attack is constructed; the performance loss rate of the system is 58.4%. experimental results. It is proved that it is effective and feasible to implement the proposed code reuse attack defense method based on the code and data separation in the virtual machine system.
【學位授予單位】:華中科技大學
【學位級別】:碩士
【學位授予年份】:2016
【分類號】:TP309
【參考文獻】
相關期刊論文 前7條
1 邢驍;陳平;丁文彪;茅兵;謝立;;BIOP:自動構造增強型ROP攻擊[J];計算機學報;2014年05期
2 黃志軍;鄭滔;;基于Return-Oriented Programming的程序攻擊與防護[J];計算機科學;2012年S1期
3 韓浩;茅兵;謝立;;針對ROP攻擊的動態(tài)運行時檢測系統(tǒng)[J];計算機工程;2012年04期
4 李正玉;茅兵;謝立;;一種基于JOP的rootkit構造方法[J];計算機科學;2011年S1期
5 ;認識微軟ASLR與DEP操作系統(tǒng)安全防護技術[J];計算機與網絡;2010年20期
6 劉鋒;雷航;李曉瑜;;Kernel-based virtual machine事件跟蹤機制的設計與實現(xiàn)[J];計算機應用;2008年S2期
7 吳金波,蔣烈輝;反靜態(tài)反匯編技術研究[J];計算機應用;2005年03期
相關博士學位論文 前2條
1 文晟;網絡蠕蟲的傳播模型與防御策略研究[D];中南大學;2012年
2 陳平;代碼復用攻擊與防御技術研究[D];南京大學;2012年
相關碩士學位論文 前3條
1 呂慶翰;面向哰擬化的綜合性能測評方法研究[D];華南理工大學;2015年
2 錢逸;基于ARM架構的ROP攻擊與防御技術研究[D];上海交通大學;2012年
3 韓浩;ROP攻擊及其變種的檢測技術[D];南京大學;2011年
,本文編號:1805467
本文鏈接:http://www.sikaile.net/kejilunwen/ruanjiangongchenglunwen/1805467.html