Volatility2

Build the env for volatility 2

Posted by JBNRZ on 2023-01-11
Estimated Reading Time 10 Minutes
Words 1.9k In Total
Viewed Times

Install

pip2

  1. install
1
2
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
sudo python2 get-pip.py

volatility

  1. repository
1
https://github.com/volatilityfoundation/volatility
  1. 下载 源代码
1
wget https://github.com/volatilityfoundation/volatility/archive/refs/heads/master.zip
  1. 进入目录安装
1
python2 setup.py install

Crypto

1
pip2 install pycryptodome -i https://pypi.tuna.tsinghua.edu.cn/simple

distorm3

  1. repository
1
https://github.com/vext01/distorm3
  1. 下载 源代码
1
wget https://github.com/vext01/distorm3/archive/refs/heads/master.zip
  1. 进入目录安装
1
python2 setup2.py install

construct-2.5.5

  1. pypi
1
https://pypi.org/project/construct/2.5.5/
  1. download file
1
2
wget https://files.pythonhosted.org/packages/bc/e8/8db5c4d4e4afda5e12a50ba72144e888635aeb329be55806461f6af19bbe/construct-2.5.5-reupload.tar.gz
unzip
  1. 进入目录安装
1
python2 setup.py install

注意事项

  1. 此时镜像位置必须为绝对路径
1
https://stackoverflow.com/questions/18838921/volatility-error-the-requested-file-doesnt-exist
  1. 导入插件时
1
vol.py --plugin=path 
  1. pip 错误
1
2
Command errored out with exit status 1
尝试下载源码,直接安装

相关用法

命令列表

https://github.com/volatilityfoundation/volatility

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
Volatility Foundation Volatility Framework 2.6
Usage: Volatility - A memory forensics analysis platform.

Options:
-h, --help list all available options and their default values.
Default values may be set in the configuration file
(/etc/volatilityrc)
--conf-file=.volatilityrc
User based configuration file
-d, --debug Debug volatility
--plugins=PLUGINS Additional plugin directories to use (semi-colon
separated)
--info Print information about all registered objects
--cache-directory=C:\Users\JBN/.cache\volatility
Directory where cache files are stored
--cache Use caching
--tz=TZ Sets the (Olson) timezone for displaying timestamps
using pytz (if installed) or tzset
-f FILENAME, --filename=FILENAME
Filename to use when opening an image
--profile=WinXPSP2x86
Name of the profile to load (use --info to see a list
of supported profiles)
-l LOCATION, --location=LOCATION
A URN location from which to load an address space
-w, --write Enable write support
--dtb=DTB DTB Address
--shift=SHIFT Mac KASLR shift address
--output=text Output in this format (support is module specific, see
the Module Output Options below)
--output-file=OUTPUT_FILE
Write output in this file
-v, --verbose Verbose information
-g KDBG, --kdbg=KDBG Specify a KDBG virtual address (Note: for 64-bit
Windows 8 and above this is the address of
KdCopyDataBlock)
--force Force utilization of suspect profile
--cookie=COOKIE Specify the address of nt!ObHeaderCookie (valid for
Windows 10 only)
-k KPCR, --kpcr=KPCR Specify a specific KPCR address

Supported Plugin Commands:

amcache Print AmCache information
apihooks Detect API hooks in process and kernel memory
atoms Print session and window station atom tables
atomscan Pool scanner for atom tables
auditpol Prints out the Audit Policies from HKLM\SECURITY\Policy\PolAdtEv
bigpools Dump the big page pools using BigPagePoolScanner
bioskbd Reads the keyboard buffer from Real Mode memory
cachedump Dumps cached domain hashes from memory
callbacks Print system-wide notification routines
clipboard Extract the contents of the windows clipboard
cmdline Display process command-line arguments
cmdscan Extract command history by scanning for _COMMAND_HISTORY
connections Print list of open connections [Windows XP and 2003 Only]
connscan Pool scanner for tcp connections
consoles Extract command history by scanning for _CONSOLE_INFORMATION
crashinfo Dump crash-dump information
deskscan Poolscaner for tagDESKTOP (desktops)
devicetree Show device tree
dlldump Dump DLLs from a process address space
dlllist Print list of loaded dlls for each process
driverirp Driver IRP hook detection
drivermodule Associate driver objects to kernel modules
driverscan Pool scanner for driver objects
dumpcerts Dump RSA private and public SSL keys
dumpfiles Extract memory mapped and cached files
dumpregistry Dumps registry files out to disk
editbox Displays information about Edit controls. (Listbox experimental.)
envars Display process environment variables
eventhooks Print details on windows event hooks
evtlogs Extract Windows Event Logs (XP/2003 only)
filescan Pool scanner for file objects
gahti Dump the USER handle type information
gditimers Print installed GDI timers and callbacks
gdt Display Global Descriptor Table
getservicesids Get the names of services in the Registry and return Calculated SID
getsids Print the SIDs owning each process
handles Print list of open handles for each process
hashdump Dumps passwords hashes (LM/NTLM) from memory
hibinfo Dump hibernation file information
hivedump Prints out a hive
hivelist Print list of registry hives.
hivescan Pool scanner for registry hives
hpakextract Extract physical memory from an HPAK file
hpakinfo Info on an HPAK file
idt Display Interrupt Descriptor Table
iehistory Reconstruct Internet Explorer cache / history
imagecopy Copies a physical address space out as a raw DD image
imageinfo Identify information for the image
impscan Scan for calls to imported functions
joblinks Print process job link information
kdbgscan Search for and dump potential KDBG values
kpcrscan Search for and dump potential KPCR values
ldrmodules Detect unlinked DLLs
lsadump Dump (decrypted) LSA secrets from the registry
machoinfo Dump Mach-O file format information
malfind Find hidden and injected code
mbrparser Scans for and parses potential Master Boot Records (MBRs)
memdump Dump the addressable memory for a process
memmap Print the memory map
messagehooks List desktop and thread window message hooks
mftparser Scans for and parses potential MFT entries
moddump Dump a kernel driver to an executable file sample
modscan Pool scanner for kernel modules
modules Print list of loaded modules
multiscan Scan for various objects at once
mutantscan Pool scanner for mutex objects
notepad List currently displayed notepad text
objtypescan Scan for Windows object type objects
patcher Patches memory based on page scans
poolpeek Configurable pool scanner plugin
printkey Print a registry key, and its subkeys and values
privs Display process privileges
procdump Dump a process to an executable file sample
pslist Print all running processes by following the EPROCESS lists
psscan Pool scanner for process objects
pstree Print process list as a tree
psxview Find hidden processes with various process listings
qemuinfo Dump Qemu information
raw2dmp Converts a physical memory sample to a windbg crash dump
screenshot Save a pseudo-screenshot based on GDI windows
servicediff List Windows services (ala Plugx)
sessions List details on _MM_SESSION_SPACE (user logon sessions)
shellbags Prints ShellBags info
shimcache Parses the Application Compatibility Shim Cache registry key
shutdowntime Print ShutdownTime of machine from registry
sockets Print list of open sockets
sockscan Pool scanner for tcp socket objects
ssdt Display SSDT entries
strings Match physical offsets to virtual addresses (may take a while, VERY verbose)
svcscan Scan for Windows services
symlinkscan Pool scanner for symlink objects
thrdscan Pool scanner for thread objects
threads Investigate _ETHREAD and _KTHREADs
timeliner Creates a timeline from various artifacts in memory
timers Print kernel timers and associated module DPCs
truecryptmaster Recover TrueCrypt 7.1a Master Keys
truecryptpassphrase TrueCrypt Cached Passphrase Finder
truecryptsummary TrueCrypt Summary
unloadedmodules Print list of unloaded modules
userassist Print userassist registry keys and information
userhandles Dump the USER handle tables
vaddump Dumps out the vad sections to a file
vadinfo Dump the VAD info
vadtree Walk the VAD tree and display in tree format
vadwalk Walk the VAD tree
vboxinfo Dump virtualbox information
verinfo Prints out the version information from PE images
vmwareinfo Dump VMware VMSS/VMSN information
volshell Shell in the memory image
windows Print Desktop Windows (verbose details)
wintree Print Z-Order Desktop Windows Tree
wndscan Pool scanner for window stations
yarascan Scan process or kernel memory with Yara signatures

常用命令

查看镜像信息

(可以获取当前镜像类型,作为 --profile 参数 ex: Win7SP1x86

1
volatility -f {image} imageinfo

imageinfo

列出当前镜像中正在运行的进程

1
volatility -f {image} --profile={profile} pslist

pslist

列出当前镜像中正在运行的进程的进程树

1
volatility -f {image} --profile={profile} pstree

pstree

命令行的内容历史

1
volatility -f {image} --profile={profile} cmdscan

cmdscan

扫描文件

1
volatility -f {image} --profile={profile} filescan

filescan

dump 指定 PID 的进程

1
volatility -f {image} --profile={profile} memdump -p [PID] -D ./

memdump pid

dump 指定 Offset 的文件

1
volatility -f {image} --profile={profile} dumpfiles -Q [Offset] -D ./

dumpfile

显示有关编辑空间的信息

1
volatility -f {image} --profile={profile} editbox

editbox

查看运行进程的次数和时间

1
volatility -f {image} --profile={profile} userassist

userassist

查看 notepad.exe 的内容

(测试镜像不支持该命令,不予演示

1
volatility -f {image} --profile={profile} notepad

notepad

查看剪贴板的数据,支持导出

1
2
volatility -f {image} --profile={profile} clipboard
volatility -f {image} --profile={profile} clipboard > clipboard.txt

clipboard

导出指定 PID 的进程为 .exe

1
volatility -f {image} --profile={profile} procdummp -p [PID] -D ./

procdump

导出指定 PID 进程的所有 DLL

1
volatility -f {image} --profile={profile} dlldump -p [PID] -D ./

dlldump

IE 浏览器的历史记录

1
volatility -f {image} --profile={profile} iehistory

iehistory

列出所有在命令行下运行的程序

1
volatility -f {image} --profile={profile} cmdline

cmdline

检索所有的网络连接

1
volatility -f {image} --profile={profile} netscan

netscan

检索已经建立的网络连接

1
volatility -f {image} --profile={profile} connections

connections

检索所有注册表蜂巢

1
volatility -f {image} --profile={profile} hivelist

hivelist

检索指定 Virtual 地址的注册表键值对

1
volatility -f {image} --profile={profile} hivedump -o [virtual]

hivedump

获取内存中的系统密码

1
2
3
volatility -f {image} --profile={profile} hashdump 
/
volatility -f {image} --profile={profile} hashdump -y [System Virtual] -s [SAM Virtual]

hashdump
hashdump

通过 mimikatz 插件获取系统明文密码

1
volatility -f {image} --plugin={path} --profile={profile} mimikatz

mimikatz

检索注册表中的账号和密码

1
volatility -f {image} --profile={profile} printkey -K "SAM\Domains\Account\Users\Names"

printkey name

检索最后登陆的用户

1
volatility -f {image} --profile={profile} printkey -K "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

printkey user

尽可能多的发现目标主机痕迹

1
volatility -f {image} --profile={profile} timeliner

timeliner

获取控制台下执行的命令及其回显

1
volatility -f {image} --profile={profile} consoles

consoles

通过插件 systeminfo 获取详细配置信息

1
volatility -f {image} --plugin={path} --profile={profile} systeminfo

systeminfo

恢复被删除的文件

1
volatility -f {image} --profile={profile} mftparser > mftparser.txt

mftparser

查看环境变量

1
volatility -f {image} --profile={profile} envars

envars


如果您喜欢此博客或发现它对您有用,则欢迎对此发表评论。 也欢迎您共享此博客,以便更多人可以参与。 如果博客中使用的图像侵犯了您的版权,请与作者联系以将其删除。 谢谢 !