記憶體分析工具Volatility

簡介

Volatility 是數位鑑識領域中最廣泛使用的 記憶體取證(Memory Forensics)框架之一,主要用於分析來自 Windows、Linux、macOS 等作業系統的 RAM 記憶體映像檔(memory dump)。透過對揮發性記憶體內容的解析,Volatility 能協助鑑識人員快速找出潛藏於系統中的惡意活動、駭客行為或可疑程序。而Volatility 是數位鑑識領域中最廣泛使用的 記憶體取證(Memory Forensics)框架之一,主要用於分析來自 Windows、Linux、macOS 等作業系統的 RAM 記憶體映像檔(memory dump)。透過對揮發性記憶體內容的解析,Volatility 能協助鑑識人員快速找出潛藏於系統中的惡意活動、駭客行為或可疑程序。

安裝方法

透過 PyPi registry安裝

pip install volatility3

從github下載安裝

1
2
3
git clone https://github.com/volatilityfoundation/volatility3.git
cd volatility3/
pip install -e volatility3-2.26.2-py3-none-any.whl

安裝完可以使用以下指令測試 vol -h > windows只能在powershell執行,在cmd由於指令重複會無法使用

用法

  • OS 資訊
    vol.py -f "/path/to/file" windows.info

  • pslist / psscan / pstree程序資訊(Process Information)

    1
    2
    3
    4
    vol.py -f "/path/to/file" windows.pslist
    vol.py -f "/path/to/file" windows.psscan
    vol.py -f "/path/to/file" windows.pstree

  • procdump(程序檔案轉存)
    vol.py -f "/path/to/file" -o "/path/to/dir" windows.dumpfiles --pid <PID>

  • memdump(程序記憶體轉存)
    vol.py -f "/path/to/file" -o "/path/to/dir" windows.memmap --dump --pid <PID>

  • handles(程序 handle 列表)
    vol.py -f "/path/to/file" windows.handles --pid <PID>

  • dlllist(載入 DLL)
    vol.py -f "/path/to/file" windows.dlllist --pid <PID>

  • cmdline(程序啟動參數)
    vol.py -f "/path/to/file" windows.cmdline

  • 網路資訊(Network Information)

    1
    2
    vol.py -f "/path/to/file" windows.netscan
    vol.py -f "/path/to/file" windows.netstat

  • 登錄檔(Registry)

    1
    vol.py -f "/path/to/file" windows.registry.hivelist

  • printkey(顯示指定登錄鍵值)
    vol.py -f "/path/to/file" windows.registry.printkey -K "Software\\Microsoft\\Windows\\CurrentVersion"

  • hivedump(整份 hive dump)
    vol.py -f "/path/to/file" windows.registry.hivedump -o <offset>

  • filescan
    vol.py -f "/path/to/file" windows.filescan

  • dumpfiles(從檔案轉存)

    1
    2
    3
    4
    vol.py -f "/path/to/file" windows.dumpfiles --dump-dir "/path/to/dir"
    vol.py -f "/path/to/file" windows.dumpfiles --dump-dir "/path/to/dir" -Q <offset>
    vol.py -f "/path/to/file" windows.dumpfiles --dump-dir "/path/to/dir" -p <PID>

  • malfind(惡意程式注入偵測)
    vol.py -f "/path/to/file" windows.malfind

  • yarascan(YARA 搜尋)
    vol.py -f "/path/to/file" yarascan -y "/path/to/file.yar"

參考資料

  1. https://blog.onfvp.com/post/volatility-cheatsheet/
  2. https://github.com/volatilityfoundation/volatility3
  3. https://ithelp.ithome.com.tw/m/articles/10393365