volatility取證的使用----windows內存
簡介
kali下默認安裝
可以對windows,linux,mac,android的內存進行分析
內存文件的准備
Win2003SP2x86下使用工具dumpit獲取到了內存文件,保存為ROOT-6B78B0CA4D-20190202-044824.raw 其實不光.raw .vmem .img都是可以的
獲取基本信息
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw imageinfo
這里最關鍵的就是獲取profile的類型,因為不同的系統數據結構啥的不一樣,所以得用--profile=來指定。 這里自動猜解可能的系統類型,一般情況下第一個是正確的
列出所有進程
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP0x86 pslist psxview可以查看隱藏進程
No suitable address space mapping found
Tried to open image as:
MachOAddressSpace: mac: need base
LimeAddressSpace: lime: need base
WindowsHiberFileSpace32: No base Address Space
WindowsCrashDumpSpace64BitMap: No base Address Space
VMWareMetaAddressSpace: No base Address Space
WindowsCrashDumpSpace64: No base Address Space
HPAKAddressSpace: No base Address Space
VirtualBoxCoreDumpElf64: No base Address Space
VMWareAddressSpace: No base Address Space
QemuCoreDumpElf: No base Address Space
WindowsCrashDumpSpace32: No base Address Space
SkipDuplicatesAMD64PagedMemory: No base Address Space
WindowsAMD64PagedMemory: No base Address Space
這是因為profile指定錯誤的原因,因為我自己提取的內存文件,確實是win2003sp2,而他第一個猜解的profile是sp0,沒有關系,挨個試試就好了,重新列出進程
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP0x86 pslist
提取出某個進程的內容
我在win2003記事本和notepad++里面藏了個 "flag{123456}",我要找出來。
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 pslist|grep notepad grep可以很快的在眾多進程找出我們想要的進程 我們需要找的就是進程的pid
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 memdump -p 1448 -D /root 這條指令是把pid為1448進程的數據保存為dmp格式,保存到/root目錄下邊。
最后一步用winhex打開dmp文件,搜索flag就能找到保存的內容了。
內存中注冊表以及位置
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 hivelist
得到用戶密碼的哈希值
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 -y (system的virtual地址) -s (sam的virtual地址)
cmd執行的命令
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 cmdscan
網絡連接情況
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 netscan
IE使用情況
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 iehistory
filescan查看文件
volatility -f ROOT-6B78B0CA4D-20190202-044824.raw --profile=Win2003SP2x86 filescan
提取filescan的文件,利用dumpfiles
volatility -f memory --profile=WinXPSP2x86 dumpfiles -Q 0x00000000053e9658 --dump-dir=./ -Q制定了文件物理位置的開始,另一個參數制定了保存的位置。