【正文】
碩士學(xué)位論文基于錯誤注入的組件安全性測試研究A Thesis Submitted in Partial Fulfillment of the Requirementsfor the Degree of Master of EngineeringResearch on Security Testing of Software Component Based on Fault InjectionCandidate :Yuan ChanglongMajor :Computer Software and TheorySupervisor :Associate Prof. Xu LipingHuazhong University of Science and TechnologyWuhan 430074, P. R. ChinaJune, 2008獨創(chuàng)性聲明本人聲明所呈交的學(xué)位論文是我個人在導(dǎo)師指導(dǎo)下進(jìn)行的研究工作及取得的研究成果。盡我所知,除文中已經(jīng)標(biāo)明引用的內(nèi)容外,本論文不包含任何其他個人或集體已經(jīng)發(fā)表或撰寫過的研究成果。對本文的研究做出貢獻(xiàn)的個人和集體,均已在文中以明確方式標(biāo)明。本人完全意識到本聲明的法律結(jié)果由本人承擔(dān)。 學(xué)位論文作者簽名: 日期: 年 月 日學(xué)位論文版權(quán)使用授權(quán)書本學(xué)位論文作者完全了解學(xué)校有關(guān)保留、使用學(xué)位論文的規(guī)定,即:學(xué)校有權(quán)保留并向國家有關(guān)部門或機(jī)構(gòu)送交論文的復(fù)印件和電子版,允許論文被查閱和借閱。本人授權(quán)華中科技大學(xué)可以將本學(xué)位論文的全部或部分內(nèi)容編入有關(guān)數(shù)據(jù)庫進(jìn)行檢索,可以采用影印、縮印或掃描等復(fù)制手段保存和匯編本學(xué)位論文。保密□,在_______年解密后適用本授權(quán)書。本論文屬于不保密。(請在以上方框內(nèi)打“√”)學(xué)位論文作者簽名: 指導(dǎo)教師簽名: 日期: 年 月 日 日期: 年 月 日華 中 科 技 大 學(xué) 碩 士 學(xué) 位 論 文摘 要隨著基于組件的軟件開發(fā)技術(shù)的出現(xiàn),組件——特別是第三方組件的使用,大大提高了軟件開發(fā)的效率。組件技術(shù)的基礎(chǔ)是存在大量的組件,因此,組件的可靠性和安全性就顯得尤為重要。然而有關(guān)組件的軟件測試技術(shù)的研究還相對薄弱,組件的安全性測試更是軟件測試?yán)碚撘粋€新的研究方向,其理論和技術(shù)的研究對于促進(jìn)組件技術(shù)的發(fā)展具有重要的理論價值和現(xiàn)實意義。由于不同于傳統(tǒng)的軟件模塊,組件以第三方復(fù)用為目的進(jìn)行開發(fā),多數(shù)情況下源代碼不可見,對組件尤其是第三方組件只能采用基于“黑盒”的安全性測試方法。在當(dāng)今黑盒安全性測試領(lǐng)域,錯誤注入技術(shù)作為一種模擬攻擊和動態(tài)執(zhí)行分析的有效技術(shù),在軟件測評和系統(tǒng)安全性分析方面具有明顯的優(yōu)勢。它根據(jù)軟件代碼運行所產(chǎn)生的行為而不是簡單地從其結(jié)構(gòu)來研究軟件的安全漏洞,這種方法有利于發(fā)現(xiàn)那些通過靜態(tài)結(jié)構(gòu)分析所無法發(fā)現(xiàn)的新的潛在安全漏洞來源。SDFI(Static and Dynamic Fault Injection)是一種基于錯誤注入技術(shù)的針對組件特別是第三方組件的安全性測試方法。SDFI建立在安全漏洞分類學(xué)研究的基礎(chǔ)之上,給出一種組件安全錯誤注入測試模型FIM(Fault Injection Model)。FIM針對組件運行前和運行時兩個不同時機(jī),選擇兩種不同的錯誤注入檢測方法——接口參數(shù)錯誤注入和動態(tài)環(huán)境錯誤注入,從而達(dá)到有針對性地高效率測試組件安全漏洞的目的。SDFI分別針對接口參數(shù)錯誤注入及動態(tài)環(huán)境錯誤注入測試用例“組合爆炸”問題,給出相應(yīng)的EEC(Exceptional Elements Coverage)和DSW(Division and Sorting by Weight)測試用例約減算法。在研究項目COM組件安全測試系統(tǒng)CSTS(Component Security Testing System)中,設(shè)計和實現(xiàn)了自動化錯誤注入子系統(tǒng),并使用第三方COM組件進(jìn)行測試,驗證了SDFI的有效性。關(guān)鍵詞:組件,錯誤注入,安全漏洞,接口錯誤注入,環(huán)境錯誤注入I華 中 科 技 大 學(xué) 碩 士 學(xué) 位 論 文Abstract Along with the appearance of software development technology based on ponent, the ponent, especially the third party ponent, raised the software development efficiency greatly. Component technology based on massive ponents, therefore the reliably and security of ponent are especially significant. However, the ponent testing is still weak, ponent security testing is a new research direction of the software testing, its theory and technology will have the important value and practical significance in the promotion of ponent technology39。s development.As is different from the traditional software modules, ponents developed for the third parties39。 reusable purpose, in most cases the source code is not visible, the security testing of ponent especially the third party ponent can only be based on the black box methods. In today39。s black box security testing, fault injection as an effective technology of attack simulation and dynamic analysis has obvious advantages in software evaluation and analysis of system security. From the running behavior rather than simply the structure of software to study security flaws, this approach is conducive to find the new potential security vulnerabilities which cannot be found by static analysis.SDFI (Static and Dynamic Fault Injection) is one kind of ponent security testing method based on fault injection. On the basis of the research in security vulnerabilities taxonomy, SDFI gave one kind of fault injection modelFIM (Fault Injection Model). Before running and after running, FIM respectively chose different fault injection methods –interface parameter fault injection and dynamic environment fault injection, to achieve the purpose of security testing of ponent vulnerability with high efficiency. For the problem of “Portfolio explosion” caused by interface parameter fault injection and dynamic environment fault injection, SDFI gave the corresponding testcases reduction algorithms EEC (Exceptional Elements Coverage) and DSW (Division and Sorting by Weight). In the project of COM ponent security testing system (CSTS), designed and implemented the automated fault injection subsystem, and took the typical third party COM ponents as testing examples, confirmed the validity of SDFI.Keywords:Component, Fault Injection, Security Vulnerability, Interface Fault Injection, Environment Fault InjectionII華 中 科 技 大 學(xué) 碩 士 學(xué) 位 論 文目 錄摘 要 IAbstract II1 緒 論 研究背景和意義 (1) 國內(nèi)外研究現(xiàn)狀 (2) 研究目標(biāo)和方法 (7) 本文的組織結(jié)構(gòu) (7)2 組件安全錯誤注入測試方法 組件安全性測試 (9) 錯誤注入測試方法 (13) 基于錯誤注入的組件安全測試方法 (17) 本章小結(jié) (22)3 接口參數(shù)錯誤注入方法 接口參數(shù)錯誤注入概念 (23) 基于Ballista的接口參數(shù)錯誤注入方法 (24) 本章小結(jié) (28)4 動態(tài)環(huán)境錯誤注入方法 動態(tài)環(huán)境錯誤注入概念 (29) 動態(tài)環(huán)境錯誤注入關(guān)鍵問題 (30) 基于EAI模型的動態(tài)環(huán)境錯誤注入方法 (31) 本章小結(jié) (40)5 CSTS中錯誤注入子系統(tǒng)實現(xiàn) 組件安全測試系統(tǒng) (41) 錯誤注入子系統(tǒng)設(shè)計 (45) 系統(tǒng)實現(xiàn)關(guān)鍵技術(shù) (47) 本章小結(jié) (50)6 COM組件測試及效果評估 COM組件測試 (51) 測試效果評估 (58) 本章小結(jié) (60)7 結(jié)束語 本文工作總結(jié) (61) 后續(xù)工作展望 (62)致 謝 (63)參考文獻(xiàn) (64)附錄 攻讀學(xué)位期間參與的科研項目 (69)IV1 緒 論 研究背景和意義隨著計算機(jī)技術(shù)的迅猛發(fā)展,計算機(jī)硬件性能越來越高,由于較少考慮硬件的局限以及人們的實際需求,相應(yīng)的軟件規(guī)模越來越龐大、結(jié)構(gòu)也越來越復(fù)雜。傳統(tǒng)面向過程的軟件開發(fā)技術(shù),已無法勝任軟件開發(fā)過程中對效率和資源充分利用的要求。為了提高軟件開發(fā)的效率,面向?qū)ο蠹敖⒃诿嫦驅(qū)ο蠹夹g(shù)基礎(chǔ)之上的組件技術(shù)得到廣泛應(yīng)用,已成為軟件開發(fā)技術(shù)主流[1]。組件技術(shù)的應(yīng)用引入了封裝和可重用等概念,特別是第三方組件的使用,大大提高了軟件開發(fā)的效率、降低了軟件開發(fā)的成本,但同時也增加了軟件可靠性和安全性的風(fēng)險。不可靠或不安全的組件往往成為軟件系統(tǒng)中最薄弱的環(huán)節(jié),該環(huán)節(jié)的斷裂將導(dǎo)致整個系統(tǒng)的崩潰[2]。因此,組件的可靠性和安全性是不容忽視的重要問題,它的好壞與否將直接關(guān)系到整個系統(tǒng)的可靠性和安全性以及質(zhì)量的優(yōu)與劣。作為保證安全性的重要手段,組件安全性測試也自然成為重要的研究內(nèi)容。然而,與在組件化程序分析、設(shè)計方法以及如何構(gòu)筑組件系統(tǒng)等方面獲得的豐富研究成果相比,有關(guān)組件和基于組件的軟件測試技術(shù)的研究還相對薄弱[3],尤其是組件的安全性測試,更是軟件測試?yán)碚撘粋€新的研究方向,其理論和技術(shù)的研究將對于促進(jìn)組件化技術(shù)的發(fā)展具有重要的理論價值和現(xiàn)實意義。錯誤注入作為一種有效的安全性測試技術(shù),在評估硬件和軟件領(lǐng)域的可靠性和安全性方面都獲得了充分的肯定[4],是一個強(qiáng)大的技術(shù)工具,可以在很大程度上改善軟件的可靠性和安全性。其最大優(yōu)勢在于不僅可以模擬對軟件應(yīng)用的惡意攻擊,加速待測軟件故障的發(fā)生,其實施過程還可以實現(xiàn)自動化[5]。更為重要的是,錯誤注入從軟件代碼運行所產(chǎn)生的行為而不是簡單地從其結(jié)構(gòu)來研究軟件的安全漏洞,這種方法有利于使測試者發(fā)現(xiàn)那些通過靜態(tài)結(jié)構(gòu)分析所無法發(fā)現(xiàn)的新的潛在安全漏洞來源[6]。因此,錯誤注入安全性測試方法在軟件測評和系統(tǒng)安全性分析方面具有明顯的優(yōu)勢,值得進(jìn)一步研究將其應(yīng)用到組件安全性測試當(dāng)中。 國內(nèi)外研究現(xiàn)狀 組件安全性測試目前,組件安全性測試模型、方法和技術(shù),