支援在線模糊測試之使用者層級系統呼叫錄製與重播
User-level System Call Record and Replay for In-Vivo Fuzz Testing
摘要
模糊測試(Fuzz Testing)是一種自動化的軟體測試技術,旨在發現程式或系統中的潛在漏洞或錯誤。它是通過對輸入數據進行大量的隨機、無序的變化,從而使測試可以觸發未預期的行為或錯誤。 針對網路服務程式的模糊測試, P.-Y. Chang在 2023年提出了可回溯式在線模糊測試,利用紀錄與重播系統呼叫(system call)的技術,重現過去遭受的網路攻擊並在該狀態實現模糊測試,讓測試者可以更短時間找出潛在的漏洞觸發點,並針對該點進行測試。
然而隨著Linux核心版本更新,過往的核心模式紀錄與重播工具kretprobes已無法順利攔截系統呼叫, 因此在 P.-Y. Chang提出的可回溯式 In-Vivo 模糊測試實驗中需要更改Linux核心來確保對系統呼叫的可攔截性,使部署難度提升以及對操作環境的限制,更甚至有潛在的核心穩定性與安全性風險。為了解決上述問題,本研究提出「 支援在線模糊測試之使用者層級系統呼叫錄製與重播 」系統,基於 K. Yasukata等作者提出的系統呼叫攔截(system call hook)架構 zpoline,實現使用者層級(user level)的系統呼叫紀錄與重播,並結合 In-Vivo 測試,達成可回溯式在線模糊測試系統對環境的適應性提升。
然而隨著Linux核心版本更新,過往的核心模式紀錄與重播工具kretprobes已無法順利攔截系統呼叫, 因此在 P.-Y. Chang提出的可回溯式 In-Vivo 模糊測試實驗中需要更改Linux核心來確保對系統呼叫的可攔截性,使部署難度提升以及對操作環境的限制,更甚至有潛在的核心穩定性與安全性風險。為了解決上述問題,本研究提出「 支援在線模糊測試之使用者層級系統呼叫錄製與重播 」系統,基於 K. Yasukata等作者提出的系統呼叫攔截(system call hook)架構 zpoline,實現使用者層級(user level)的系統呼叫紀錄與重播,並結合 In-Vivo 測試,達成可回溯式在線模糊測試系統對環境的適應性提升。
Fuzz Testing is an automated software testing technique aimed at discovering potential vulnerabilities or errors in programs or systems. For fuzz testing of network service programs, P.-Y. Chang introduced retrospective In-Vivo fuzz testing in 2023. This technique utilizes the technology of recording and replaying system calls to reproduce past network attacks and perform fuzz testing in that state. This allows testers to identify potential vulnerability trigger points in a shorter time frame and conduct tests targeting those points.
However, with the updates to Linux kernel versions, the previously used kernel mode recording and replaying tool, kretprobe, can no longer intercept system calls smoothly. Therefore, in the implementation of retrospective In-Vivo fuzz testing proposed by P.-Y. Chang, it is necessary to modify the Linux kernel to ensure the intercept ability of system calls. This increases the complexity of practical operations, imposes restrictions on the operating environment, and even poses potential risks to kernel stability and security. To address these issues, this study proposes the "User-level System Call Record and Replay for In-Vivo Fuzz Testing" system based on the system call hook framework, zpoline, proposed by K. Yasukata, et al. It achieves user-level system call recording and replaying and integrates In-Vivo testing to enhance the adaptability of retrospective In-Vivo fuzz testing system to the environment.
However, with the updates to Linux kernel versions, the previously used kernel mode recording and replaying tool, kretprobe, can no longer intercept system calls smoothly. Therefore, in the implementation of retrospective In-Vivo fuzz testing proposed by P.-Y. Chang, it is necessary to modify the Linux kernel to ensure the intercept ability of system calls. This increases the complexity of practical operations, imposes restrictions on the operating environment, and even poses potential risks to kernel stability and security. To address these issues, this study proposes the "User-level System Call Record and Replay for In-Vivo Fuzz Testing" system based on the system call hook framework, zpoline, proposed by K. Yasukata, et al. It achieves user-level system call recording and replaying and integrates In-Vivo testing to enhance the adaptability of retrospective In-Vivo fuzz testing system to the environment.