February 7, 2025

Volatlity-内存取证神器

1.工具介绍

Volatility 是一款非常流行的开源内存取证分析框架,主要用于从计算机的内存转储(memory dump)中提取关键信息,广泛应用于数字取证、恶意软件分析和系统调试等领域。Volatility 支持多种操作系统的内存映像,包括 Windows、Linux、MacOS 等,并能够提取与操作系统相关的详细信息,如进程、网络连接、文件、注册表、内核模块等。

1.1 Volatility 迭代

1.1.1 Volatility 2

Volatility 2 支持多个操作系统和平台的内存映像文件,包括 Windows、Linux、MacOS。Volatility 2还 提供了大量的插件来帮助用户分析内存映像。Volatility 2 支持常见的内存映像格式,如 Windows 系统的 .dmp 和 .raw 文件。用户可以通过各种取证工具(如 FTK Imager、WinPMEM 等)获取内存转储并进行分析。

1.1.2 Volatility 3

Volatility 3Volatility 框架的第三代版本,专注于改进和增强内存取证和分析功能。与 Volatility 2.x 相比,Volatility 3 引入了很多架构上的变化和改进,目的是使其更具现代性、更强大且更易于扩展。Volatility 3 的设计更加模块化,并支持更广泛的操作系统和架构,同时通过 Python 3 提供更好的兼容性和性能。

1.1.3 Volatility 2.6 和 Volatility 3 区别
特性 Volatility 2 Volatility 3
Python版本 基于 Python 2 完全基于 Python 3
架构 单体架构,功能整合在一个文件中 模块化架构,支持插件和更强的扩展性
操作系统支持 支持 Windows、Linux、Mac OS,较少支持其他系统 支持 Windows、Linux、macOS,进一步支持 Android、ELF 等
性能 在处理大规模内存映像时性能较低 优化了性能,特别是在处理大规模内存转储时表现更好
插件和命令 插件较少,命令行接口较为简单 插件系统增强,命令行接口更简洁和一致,插件更多
内存映像支持 支持传统的内存映像格式,如 Windows 的 .dmp 和 .raw 增加了对更多内存映像格式的支持,包括 ELF 格式等
符号解析 符号解析较为简单,且处理复杂的内存结构时可能出现困难 改进了符号解析和内存结构解析的准确性和效率
开发和扩展 扩展性较差,功能相对固定 模块化设计,易于扩展和开发新插件
代码结构 较为复杂且过时,维护性差 代码库进行了重构,采用了更加现代的编程模式
社区支持 较为广泛,但已进入维护阶段 更积极的发展阶段,社区支持逐渐增长

2.下载安装

2.1:Volatility2 安装

github:https://github.com/volatilityfoundation/volatility

1
2
3
cd [目录] #这里进入自己喜欢的目录
git clone https://github.com/volatilityfoundation/volatility #把Vikatukuty2克隆到本地
python2 vol.py -h #查看帮助

2.2:Volatility3下载安装和说明

github:https://github.com/volatilityfoundation/volatility3

2.2.1:Volatility3简介

​ Volatility 是世界上使用最广泛的从易失性存储器 (RAM) 样本中提取数字伪影的框架。提取技术完全独立于被研究的系统,但可以查看系统的运行时状态。该框架旨在向人们介绍从易失性存储器样本中提取数字伪影的技术和复杂性,并为进一步研究这一令人兴奋的研究领域提供平台。

2019 年,Volatility 基金会发布了框架的完整重写版本 Volatility 3。该项目旨在解决过去 10 年中出现的与原始代码库相关的许多技术和性能挑战。重写的另一个好处是,Volatility 3 可以根据更符合 Volatility 社区目标的自定义许可证(Volatility 软件许可证 (VSL))发布。 有关更多详细信息,请参阅LICENSE文件。

2.2.2:安装稳定版Volatility3

1
2
3
# 稳定版和开发版安装一个即可
# Volatility 3 需要 Python 3.8.0 或更高版本,并在PyPi 注册表上发布。
pip install volatility3 #直接通过pip安装稳定版

2.2.3:安装开发版Volatility3

1
2
3
4
5
# 开发版和稳定版安装一个即可
git clone https://github.com/volatilityfoundation/volatility3.git
cd volatility3/
python3 -m venv venv && . venv/bin/activate
pip install -e .[dev]

2.2.4:Volatility3参数说明

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
-h, --help:显示此帮助消息并退出。如需特定插件的选项,使用 'volatility <插件名> --help'。

-c CONFIG, --config CONFIG:从 JSON 文件加载配置。

--parallelism [{processes,threads,off}]:启用并行处理(若未给定参数,默认为 'off')。

-e EXTEND, --extend EXTEND:使用新的(或更改的)设置扩展配置。

-p PLUGIN_DIRS, --plugin-dirs PLUGIN_DIRS:以分号分隔的路径列表,用于查找插件。

-s SYMBOL_DIRS, --symbol-dirs SYMBOL_DIRS:以分号分隔的路径列表,用于查找符号。

-v, --verbosity:增加输出详细程度。

-l LOG, --log LOG:将输出同时记录到文件和控制台。

-o OUTPUT_DIR, --output-dir OUTPUT_DIR:输出任何生成文件的目录。

-q, --quiet:去除进度反馈。

-r RENDERER, --renderer RENDERER:确定如何呈现输出(quick、none、csv、pretty、json、jsonl)。

-f FILE, --file FILE:若未定义'single-location',这是 '--single-location=file://' 的简写。

--write-config:将配置 JSON 文件写出到 config.json。

--save-config SAVE_CONFIG:将配置 JSON 文件保存到指定文件。

--clear-cache:清除所有短期缓存项。

--cache-path CACHE_PATH:更改用于存储缓存的默认路径(C:\Users\yancy\AppData\Roaming\volatility3)。

--offline:不在网上搜索其他 JSON 文件。

-u URL, --remote-isf-url URL:在网上搜索 ISF json 文件。

--filters FILTERS:应用于输出的过滤器列表(格式为 [+-] 列名,模式 [!])。

--hide-columns [HIDE_COLUMNS...]:不区分大小写的以空格分隔的前缀列表,用于确定在输出中隐藏哪些列。

--single-location SINGLE_LOCATION:指定要堆叠的基础位置。

--stackers [STACKERS...]:堆叠器列表。

--single-swap-locations [SINGLE_SWAP_LOCATIONS...]:指定与'single-location' 一起使用的交换层 URI 列表。

2.2.5:Volatility3-Linux插件说明

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
linux.bash.Bash
翻译:Linux - bash 命令历史恢复
介绍:从内存中恢复 bash 命令历史记录。

linux.boottime.Boottime
翻译:Linux - 系统启动时间
介绍:显示系统启动的时间。

linux.capabilities.Capabilities
翻译:Linux - 进程能力列表
介绍:列出进程所具备的能力。

linux.check_afinfo.Check_afinfo
翻译:Linux - 网络协议操作函数指针检查
介绍:验证网络协议的操作函数指针是否正常。

linux.check_creds.Check_creds
翻译:Linux - 进程凭证结构检查
介绍:检查是否存在进程共享凭证结构的情况。

linux.check_idt.Check_idt
翻译:Linux - 中断描述符表(IDT)检查
介绍:检查 IDT 是否被修改。

linux.check_modules.Check_modules
翻译:Linux - 模块列表与 sysfs 信息对比
介绍:将已加载的内核模块列表与 sysfs 信息(若可用)进行比较。

linux.check_syscall.Check_syscall
翻译:Linux - 系统调用表钩子检查
介绍:检查系统调用表中是否存在钩子。

linux.ebpf.EBPF
翻译:Linux - eBPF 程序枚举
介绍:枚举内存中的 eBPF 程序。

linux.elfs.Elfs
翻译:Linux - 内存映射 ELF 文件列表
介绍:列出所有进程的内存映射 ELF 文件。

linux.envars.Envars
翻译:Linux - 进程环境变量列表
介绍:列出进程及其对应的环境变量。

linux.hidden_modules.Hidden_modules
翻译:Linux - 隐藏内核模块查找
介绍:通过内存搜索查找隐藏的内核模块。

linux.iomem.IOMem
翻译:Linux - I/O 内存信息生成
介绍:生成类似于运行系统中/proc/iomem的输出信息。

linux.keyboard_notifiers.Keyboard_notifiers
翻译:Linux - 键盘通知器调用链解析
介绍:解析键盘通知器的调用链。

linux.kmsg.Kmsg
翻译:Linux - 内核日志缓冲区读取
介绍:读取内核日志缓冲区的内容。

linux.kthreads.Kthreads
翻译:Linux - kthread 函数枚举
介绍:枚举内核线程(kthread)的函数。

linux.library_list.LibraryList
翻译:Linux - 进程加载库枚举
介绍:枚举加载到进程中的库。

linux.lsmod.Lsmod
翻译:Linux - 已加载内核模块列表
介绍:列出当前已加载的内核模块。

linux.lsof.Lsof
翻译:Linux - 进程打开文件列表
介绍:列出每个进程打开的文件。

linux.malfind.Malfind
翻译:Linux - 潜在注入代码内存范围查找
介绍:列出进程内存中可能包含注入代码的范围。

linux.mountinfo.MountInfo
翻译:Linux - 进程挂载点信息列表
介绍:列出进程挂载命名空间中的挂载点信息。

linux.netfilter.Netfilter
翻译:Linux - Netfilter 钩子列表
介绍:列出 Netfilter 框架中的钩子。

linux.pagecache.Files
翻译:Linux - 内存文件列表(基于页缓存)
介绍:从内存的页缓存中列出文件。

linux.pagecache.InodePages
翻译:Linux - 缓存 inode 页面列表与恢复
介绍:列出并尝试恢复缓存的 inode 页面。

linux.pidhashtable.PIDHashTable
翻译:Linux - 通过 PID 哈希表枚举进程
介绍:利用 PID 哈希表来枚举系统中的进程。

linux.proc.Maps
翻译:Linux - 进程内存映射列表
介绍:列出所有进程的内存映射情况。

linux.psaux.PsAux
翻译:Linux - 进程及其命令行参数列表
介绍:列出进程以及它们对应的命令行参数。

linux.pslist.PsList
翻译:Linux - 进程列表(基于链表)
介绍:列出特定 Linux 内存镜像中通过链表方式找到的进程。

linux.psscan.PsScan
翻译:Linux - 进程扫描列表
介绍:扫描特定 Linux 内存镜像,查找其中存在的进程。

linux.pstree.PsTree
翻译:Linux - 进程树状结构列表
介绍:基于父进程 ID,以树形结构列出进程。

linux.ptrace.Ptrace
翻译:Linux - ptrace 跟踪关系枚举
介绍:枚举 ptrace 的跟踪器和被跟踪的任务。

linux.sockstat.Sockstat
翻译:Linux - 进程网络连接列表
介绍:列出所有进程的网络连接信息。

linux.tty_check.tty_check
翻译:Linux - tty 设备钩子检查
介绍:检查 tty 设备是否存在钩子。

2.2.6:Volatility3-Mac插件说明

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
mac.bash.Bash
翻译:Mac - bash 命令历史恢复
介绍:从内存中恢复 Mac 系统下的 bash 命令历史记录。

mac.check_syscall.Check_syscall
翻译:Mac - 系统调用表钩子检查
介绍:检查 Mac 系统的系统调用表是否存在钩子。

mac.check_sysctl.Check_sysctl
翻译:Mac - sysctl 处理程序钩子检查
介绍:检查 Mac 系统中 sysctl 处理程序是否存在钩子。

mac.check_trap_table.Check_trap_table
翻译:Mac - mach 陷阱表钩子检查
介绍:检查 Mac 系统的 mach 陷阱表是否被修改。

mac.dmesg.Dmesg
翻译:Mac - 内核日志缓冲区打印
介绍:打印 Mac 系统内核日志缓冲区的内容。

mac.ifconfig.Ifconfig
翻译:Mac - 网络接口信息列表
介绍:列出 Mac 系统中所有设备的网络接口信息。

mac.kauth_listeners.Kauth_listeners
翻译:Mac - kauth 监听器列表
介绍:列出 Mac 系统中 kauth 监听器及其状态。

mac.kauth_scopes.Kauth_scopes
翻译:Mac - kauth 作用域列表
介绍:列出 Mac 系统中 kauth 的作用域及其状态。

mac.kevents.Kevents
翻译:Mac - 进程事件处理程序列表
介绍:列出进程在 Mac 系统中注册的事件处理程序。

mac.list_files.List_Files
翻译:Mac - 进程打开文件描述符列表
介绍:列出 Mac 系统中所有进程打开的文件描述符。

mac.lsmod.Lsmod
翻译:Mac - 已加载内核模块列表
介绍:列出 Mac 系统当前已加载的内核模块。

mac.lsof.Lsof
翻译:Mac - 进程打开文件描述符列表
介绍:列出 Mac 系统中所有进程打开的文件描述符。

mac.malfind.Malfind
翻译:Mac - 潜在注入代码内存范围查找
介绍:列出 Mac 系统中进程内存里可能包含注入代码的范围。

mac.mount.Mount
翻译:Mac - 挂载相关信息模块
介绍:此模块包含一组插件,可生成通常在 Mac 系统mount命令中获取的数据。

mac.netstat.Netstat
翻译:Mac - 进程网络连接列表
介绍:列出 Mac 系统中所有进程的网络连接信息。

mac.proc_maps.Maps
翻译:Mac - 进程内存范围列表(潜在注入代码)
介绍:列出 Mac 系统中进程可能包含注入代码的内存范围。

mac.psaux.PsAux
翻译:Mac - 进程命令行参数恢复
介绍:恢复 Mac 系统中进程的命令行参数。

mac.pslist.PsList
翻译:Mac - 进程列表(基于链表)
介绍:列出特定 Mac 内存镜像中通过链表方式找到的进程。

mac.pstree.PsTree
翻译:Mac - 进程树状结构列表
介绍:基于父进程 ID,以树形结构列出 Mac 系统中的进程。

mac.socket_filters.Socket_filters
翻译:Mac - 内核套接字过滤器枚举
介绍:枚举 Mac 系统内核中的套接字过滤器。

mac.timers.Timers
翻译:Mac - 恶意内核定时器检查
介绍:检查 Mac 系统中是否存在恶意的内核定时器。

mac.trustedbsd.Trustedbsd
翻译:Mac - 恶意 trustedbsd 模块检查
介绍:检查 Mac 系统中是否存在恶意的 trustedbsd 模块。

mac.vfsevents.VFSevents
翻译:Mac - 文件系统事件过滤进程列表
介绍:列出 Mac 系统中正在过滤文件系统事件的进程。

2.2.7:Volatility3-Windows插件说明

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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
windows.amcache.Amcache
翻译:Windows 系统 - AmCache 信息提取
介绍:从 AmCache 中提取有关已执行应用程序的信息。

windows.bigpools.BigPools
翻译:Windows 系统 - 大页池列表
介绍:列出 Windows 系统中的大页池。

windows.callbacks.Callbacks
翻译:Windows 系统 - 内核回调与通知例程列表
介绍:列出内核回调以及相关的通知例程。

windows.cmdline.CmdLine
翻译:Windows 系统 - 进程命令行参数列表
介绍:列出各个进程的命令行参数。

windows.cmdscan.CmdScan
翻译:Windows 系统 - 命令历史扫描
介绍:查找 Windows 系统中的命令历史记录列表。

windows.consoles.Consoles
翻译:Windows 系统 - 控制台缓冲区查找
介绍:查找 Windows 系统中的控制台缓冲区。

windows.crashinfo.Crashinfo
翻译:Windows 系统 - 崩溃信息查看
介绍:列出 Windows 系统崩溃转储文件中的信息。

windows.debugregisters.DebugRegisters
翻译:Windows 系统 - 调试寄存器信息
介绍:(文档未提及具体功能,推测与获取或分析调试寄存器相关信息有关)

windows.devicetree.DeviceTree
翻译:Windows 系统 - 设备树列表
介绍:基于特定 Windows 内存镜像中的驱动程序和连接设备,列出设备树结构。

windows.dlllist.DllList
翻译:Windows 系统 - DLL 列表
介绍:列出特定 Windows 内存镜像中已加载的动态链接库(DLL)模块。

windows.driverirp.DriverIrp
翻译:Windows 系统 - 驱动程序 I/O 请求包列表
介绍:列出特定 Windows 内存镜像中驱动程序的 I/O 请求包(IRP)。

windows.drivermodule.DriverModule
翻译:Windows 系统 - 驱动模块检测
介绍:确定是否有任何已加载的驱动程序被 rootkit 隐藏。

windows.driverscan.DriverScan
翻译:Windows 系统 - 驱动程序扫描
介绍:扫描特定 Windows 内存镜像,查找其中存在的驱动程序。

windows.dumpfiles.DumpFiles
翻译:Windows 系统 - 文件转储
介绍:从 Windows 内存样本中转储缓存的文件内容。

windows.envars.Envars
翻译:Windows 系统 - 进程环境变量显示
介绍:显示进程的环境变量。

windows.filescan.FileScan
翻译:Windows 系统 - 文件扫描
介绍:扫描特定 Windows 内存镜像,查找其中存在的文件对象。

windows.getservicesids.GetServiceSIDs
翻译:Windows 系统 - 获取服务 SIDs
介绍:列出进程令牌中的服务安全标识符(SIDs)。

windows.getsids.GetSIDs
翻译:Windows 系统 - 获取进程 SIDs
介绍:打印拥有每个进程的安全标识符(SIDs)。

windows.handles.Handles
翻译:Windows 系统 - 进程句柄列表
介绍:列出进程打开的句柄。

windows.hollowprocesses.HollowProcesses
翻译:Windows 系统 - 空心进程查找
介绍:列出系统中的空心进程。

windows.iat.IAT
翻译:Windows 系统 - 导入地址表提取
介绍:提取程序的导入地址表,以列出程序在外部库中使用的 API(函数)。

windows.info.Info
翻译:Windows 系统 - 系统信息查看
介绍:显示正在分析的内存样本的操作系统及内核详细信息。

windows.joblinks.JobLinks
翻译:Windows 系统 - 作业链接信息查看
介绍:打印进程作业链接信息。

windows.kpcrs.KPCRs
翻译:Windows 系统 - KPCR 结构查看
介绍:打印每个处理器的 KPCR(内核处理器控制区域)结构。

windows.ldrmodules.LdrModules
翻译:Windows 系统 - Ldr 模块列表
介绍:列出特定 Windows 内存镜像中通过 Ldr 机制加载的模块。

windows.malfind.Malfind
翻译:Windows 系统 - 恶意代码内存查找
介绍:列出进程内存中可能包含注入代码的范围,以查找潜在恶意代码。

windows.mbrscan.MBRScan
翻译:Windows 系统 - 主引导记录扫描
介绍:扫描并解析潜在的主引导记录(MBR)。

windows.memmap.Memmap
翻译:Windows 系统 - 内存映射查看
介绍:打印系统的内存映射。

windows.modscan.ModScan
翻译:Windows 系统 - 模块扫描
介绍:扫描特定 Windows 内存镜像,查找其中存在的模块。

windows.modules.Modules
翻译:Windows 系统 - 内核模块列表
介绍:列出已加载的内核模块。

windows.mutantscan.MutantScan
翻译:Windows 系统 - 互斥体扫描
介绍:扫描特定 Windows 内存镜像,查找其中存在的互斥体。

windows.netscan.NetScan
翻译:Windows 系统 - 网络对象扫描
介绍:扫描特定 Windows 内存镜像,查找其中存在的网络对象。

windows.netstat.NetStat
翻译:Windows 系统 - 网络状态查看
介绍:遍历网络跟踪结构,获取网络连接等相关状态信息。

windows.orphan_kernel_threads.Threads
翻译:Windows 系统 - 孤立内核线程列表
介绍:列出孤立的内核线程。

windows.pe_symbols.PESymbols
翻译:Windows 系统 - PE 文件符号查看
介绍:打印进程和内核内存中 PE(可移植可执行)文件的符号。

windows.pedump.PEDump
翻译:Windows 系统 - PE 文件提取
介绍:从特定地址空间的特定地址提取 PE 文件。

windows.poolscanner.PoolScanner
翻译:Windows 系统 - 池扫描器
介绍:一个通用的池扫描插件,用于扫描特定内存区域。

windows.privileges.Privs
翻译:Windows 系统 - 进程特权列表
介绍:列出进程令牌的特权。

windows.processghosting.ProcessGhosting
翻译:Windows 系统 - 进程幽灵化检测
介绍:列出 DeletePending 位被设置或其 FILE_OBJECT 被设置为 0 的进程,以检测进程幽灵化现象。

windows.pslist.PsList
翻译:Windows 系统 - 进程列表(基于链表)
介绍:通过链表方式列出特定 Windows 内存镜像中的进程。

windows.psscan.PsScan
翻译:Windows 系统 - 进程扫描列表
介绍:扫描特定 Windows 内存镜像,查找其中存在的进程。

windows.pstree.PsTree
翻译:Windows 系统 - 进程树状结构列表
介绍:基于父进程 ID,以树形结构列出进程。

windows.psxview.PsXView
翻译:Windows 系统 - 进程多视图分析
介绍:列出通过《内存取证的艺术》中描述的四种方法找到的所有进程,以帮助识别试图隐藏自身的进程。建议在终端查看此插件输出时使用-r pretty。

windows.registry.certificates.Certificates
翻译:Windows 系统 - 注册表证书列表
介绍:列出注册表证书存储中的证书。

windows.registry.getcellroutine.GetCellRoutine
翻译:Windows 系统 - 注册表 GetCellRoutine 检查
介绍:报告注册表配置单元中具有被挂钩的 GetCellRoutine 处理程序的情况。

windows.registry.hivelist.HiveList
翻译:Windows 系统 - 注册表配置单元列表
介绍:列出特定内存镜像中的注册表配置单元。

windows.registry.hivescan.HiveScan
翻译:Windows 系统 - 注册表配置单元扫描
介绍:扫描特定 Windows 内存镜像,查找其中存在的注册表配置单元。

windows.registry.printkey.PrintKey
翻译:Windows 系统 - 注册表键值打印
介绍:列出特定注册表配置单元或特定键值下的注册表键。

windows.registry.userassist.UserAssist
翻译:Windows 系统 - 用户辅助注册表信息查看
介绍:打印用户辅助注册表键及其相关信息。

windows.scheduled_tasks.ScheduledTasks
翻译:Windows 系统 - 计划任务解码
介绍:从 Windows 注册表中解码计划任务信息,包括触发器、操作、运行时间和创建时间等相关信息。

windows.sessions.Sessions
翻译:Windows 系统 - 会话信息进程列表
介绍:列出从环境变量中提取出会话信息的进程。

windows.shimcachemem.ShimcacheMem
翻译:Windows 系统 - Shimcache 内存读取
介绍:从 ahcache.sys 的 AVL 树中读取 Shimcache 条目。

windows.skeleton_key_check.Skeleton_Key_Check
翻译:Windows 系统 - 万能密码检测
介绍:查找系统中是否存在万能密码(Skeleton Key)恶意软件的迹象。

windows.ssdt.SSDT
翻译:Windows 系统 - 系统服务描述表查看
介绍:列出系统服务描述表(SSDT)。

windows.statistics.Statistics
翻译:Windows 系统 - 内存空间统计信息
介绍:列出有关内存空间的统计信息。

windows.strings.Strings
翻译:Windows 系统 - 字符串读取与进程关联
介绍:读取strings命令的输出,并指出每个字符串所属的进程。

windows.suspicious_threads.SuspiciousThreads
翻译:Windows 系统 - 可疑用户态进程线程列表
介绍:列出可疑的用户态进程线程。

windows.svcdiff.SvcDiff
翻译:Windows 系统 - 服务差异对比
介绍:比较通过列表遍历和扫描两种方式找到的服务,以发现 rootkit。

windows.svclist.SvcList
翻译:Windows 系统 - 服务列表
介绍:列出 services.exe 中双链表形式的服务列表。

windows.svcscan.SvcScan
翻译:Windows 系统 - 服务扫描
介绍:扫描 Windows 系统中的服务。

windows.symlinkscan.SymlinkScan
翻译:Windows 系统 - 符号链接扫描
介绍:扫描特定 Windows 内存镜像,查找其中存在的符号链接。

windows.thrdscan.ThrdScan
翻译:Windows 系统 - 线程扫描
介绍:扫描 Windows 系统中的线程。

windows.threads.Threads
翻译:Windows 系统 - 进程线程列表
介绍:列出进程的线程。

windows.timers.Timers
翻译:Windows 系统 - 内核定时器查看
介绍:打印内核定时器以及相关联模块的延迟过程调用(DPC)。

windows.truecrypt.Passphrase
翻译:Windows 系统 - TrueCrypt 密码查找
介绍:查找 TrueCrypt 缓存的密码。

windows.unhooked_system_calls.unhooked_system_calls
翻译:Windows 系统 - 未挂钩系统调用检测
介绍:查找系统中未挂钩系统调用相关的恶意软件迹象(推测与检测特定恶意行为有关)。

windows.unloadedmodules.UnloadedModules
翻译:Windows 系统 - 已卸载内核模块列表
介绍:列出已卸载的内核模块。

windows.vadinfo.VadInfo
翻译:Windows 系统 - VAD 信息查看
介绍:列出进程的内存范围信息(VAD,虚拟地址描述符)。

windows.vadwalk.VadWalk
翻译:Windows 系统 - VAD 树遍历
介绍:遍历虚拟地址描述符(VAD)树。

windows.verinfo.VerInfo
翻译:Windows 系统 - 版本信息查看
介绍:列出 PE 文件中的版本信息。

windows.virtmap.VirtMap
翻译:Windows 系统 - 虚拟映射列表
介绍:列出虚拟映射的部分信息。

3. Volatility3-常用命令

3.1 Volatility3-Windows常用命令

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
# 展示当前内存样本和操作系统内核详细信息,以确定目标系统版本\架构等基础信息
vol -f [内存镜像路] windows.info,Info

# 展示出来内存镜像中的进程,进程基本信息,进程ID,父进程,进程名称等
vol -f [内存镜像路径] windows.palist.PsList

# 查看内存中存在的进程,(更多的事发现隐藏和异常创建的进程)
vol -f [内存镜像路径] windows.oasscan.PsScan

# 树形结构列出进程,主要用于展示进程之间的父子关系
vol -f [内存镜像路径] windows.pstree.PsTree

# 通过<取证的艺术>中描述的四种方法找到所有进程
vol -f [内存镜像路径] windows.psxview.PsXView

# 更详细的通过<取证的艺术>中秒钟的四种方法找到所有进程
vol -f [内存镜像路径] windows.psview.PsXVew -r pretty

# 加载内核模块
vol -f [内存镜像路径] windows.mdules.Modules

# 寻找内存中所有存在的模块,(多用于检测内核模块)
vol -f [内存镜像路径] windows.modscan.ModScan

# 遍历网络跟踪结构,获取网络相关信息 包括但不限于 本地地址,远程地址,端口号等,可用户发现异常网络连接
vol -f [内存镜像路径] windows.netstat.NetStat

# 查找所有网络相关活动
vol -f [内存镜像路径] windows.netscan.NetScan

# 列出镜像中的注册表配置单元
vol -f [内存镜像路径] windows.registry.hivelist.HiveList

# 查看注册表的具体配置 (--key 后面所跟的事要查看注册表键的路径)
vol -f [内存镜像路径] windows.registry.printkey.Prinkey --key "HKLM\Software\Microsoft\Windows NT\CurrentVersion"

# 列出全部进程命令行惨胡(就是看进程是怎么启动的)
vol -f [内存镜像路径] windows.mdline.Cmdline

# 展示进程的环境变量
vol -f [内存镜像路径] windows.envars.Envars

# 展示相关的服务
vol -f [内存镜像路径] windows.svclist.Svclist

# 展示所有服务,一般用于发现隐藏或者异常的服务
vol -f [内存镜像路径] windows.svcscan.SvcScan

# 将数据保存为json格式
vol -f [内存镜像路径] [插件] -r json > xxx.json

# 将数据保存为csv格式
vol -f [内存镜像路径] [插件] -r csv > xxxxx.csv

#将数据保存为txt
vol -f [内存镜像路径] [插件] -r pretty > xxxx.txt

# 将插件生成的文件(缓存)保存到指定目录
# 举例:windows.dumpfiles.DumpFiles
vol -f [内存镜像路径] [插件] --output-dir [/你/要/保存/的/路径]

# 保存配置文件
vol -f [内存镜像路径] --write-config

# 配置文件保存到json文件中
vol -f [内存镜像路径] --write-config xxxxx.json


3.2 Volatility3-macOS 常用命令

3.2.1. 查看内核日志

1
2
# 查看 macOS 系统的内核日志信息
vol -f /path/to/macos_memory_dump.raw mac.dmesg.Dmesg

3.2.2. 列出进程

1
2
# 列出 macOS 内存镜像中的进程
vol -f /path/to/macos_memory_dump.raw mac.pslist.PsList

3.2.3. 以树状结构展示进程

1
2
# 以树状结构列出 macOS 系统中的进程关系
vol -f /path/to/macos_memory_dump.raw mac.pstree.PsTree

3.2.4. 查看网络接口信息

1
2
# 获取 macOS 系统的网络接口配置信息
vol -f /path/to/macos_memory_dump.raw mac.ifconfig.Ifconfig

3.2.5. 查看网络连接信息

1
2
# 列出 macOS 系统中的网络连接情况
vol -f /path/to/macos_memory_dump.raw mac.netstat.Netstat

3.2.6. 列出已加载内核模块

1
2
# 查看 macOS 系统中已加载的内核模块
vol -f /path/to/macos_memory_dump.raw mac.lsmod.Lsmod

3.2.7. 恢复 bash 命令历史

1
2
# 从 macOS 内存镜像中恢复 bash 命令历史记录
vol -f /path/to/macos_memory_dump.raw mac.bash.Bash

3.3 Volatility3-Linux 常用命令

3.3.1. 获取系统启动时间

1
2
# 查看 Linux 系统的启动时间
vol -f /path/to/linux_memory_dump.raw linux.boottime.Boottime

3.3.2. 列出进程

1
2
# 列出 Linux 内存镜像中的进程
vol -f /path/to/linux_memory_dump.raw linux.pslist.PsList

3.3.3. 以树状结构展示进程

1
2
# 以树状结构列出 Linux 系统中的进程关系
vol -f /path/to/linux_memory_dump.raw linux.pstree.PsTree

3.3.4. 查看网络连接信息

1
2
# 列出 Linux 系统中的网络连接情况
vol -f /path/to/linux_memory_dump.raw linux.sockstat.Sockstat

3.3.5. 列出已加载内核模块

1
2
# 查看 Linux 系统中已加载的内核模块
vol -f /path/to/linux_memory_dump.raw linux.lsmod.Lsmod

3.3.6. 恢复 bash 命令历史

1
2
# 从 Linux 内存镜像中恢复 bash 命令历史记录
vol -f /path/to/linux_memory_dump.raw linux.bash.Bash

3.3.7. 列出进程打开的文件

1
2
# 查看 Linux 系统中进程打开的文件信息
vol -f /path/to/linux_memory_dump.raw linux.lsof.Lsof

3.3.4 保存文件配置

3.4.1. 保存为 txt 文件

1
2
3
4
5
# 以 macOS 查看内核日志为例,将结果保存为 txt 文件
vol -f /path/to/macos_memory_dump.raw mac.dmesg.Dmesg -r pretty > macos_dmesg.txt

# 以 Linux 列出进程为例,将结果保存为 txt 文件
vol -f /path/to/linux_memory_dump.raw linux.pslist.PsList -r pretty > linux_pslist.txt

3.4.2. 保存插件生成的文件到指定目录

1
2
3
4
5
# 以 macOS 查看网络接口信息为例,将插件生成的文件保存到指定目录
vol -f /path/to/macos_memory_dump.raw mac.ifconfig.Ifconfig --output-dir /your/save/directory

# 以 Linux 列出已加载内核模块为例,将插件生成的文件保存到指定目录
vol -f /path/to/linux_memory_dump.raw linux.lsmod.Lsmod --output-dir /your/save/directory

3.4.3. 保存配置文件

1
2
3
4
5
# 以 macOS 恢复 bash 命令历史为例,保存配置文件到默认的 config.json
vol -f /path/to/macos_memory_dump.raw mac.bash.Bash --write-config

# 以 Linux 获取系统启动时间为例,保存配置文件到指定的 JSON 文件
vol -f /path/to/linux_memory_dump.raw linux.boottime.Boottime --save-config linux_boottime_config.json

4. Volatility3-高阶用法

(memory_dumnp.raw是内存镜像)

4.1. 多线程处理

1
2
3
4
# Volatility 3 支持通过 --parallelism 选项启用并行处理,以加快分析速度,可选择 processes(多进程)、threads(多线程) 或 off(关闭并行)。

# 使用多进程并行处理来执行 windows.pslist.PsList 插件
vol -f memory_dump.raw --parallelism processes windows.pslist.PsList

4.2. 过滤进程

1
2
3
4
5
6
7
# 可以使用 --filters 选项对输出结果进行过滤,其格式为 [+-]列名,模式[!]。

# 过滤出进程名包含 "explorer" 的进程信息
vol -f memory_dump.raw windows.pslist.PsList --filters "+Name,explorer"

# 排除进程名包含 "svchost" 的进程信息
vol -f memory_dump.raw windows.pslist.PsList --filters "-Name,svchost"

4.3. 多插件运行

1
2
3
4
# 在某些情况下,你可能需要组合多个插件的输出结果进行综合分析。虽然 Volatility 3 本身没有直接的插件组合语法,但可以将不同插件的输出保存到文件后,再使用其他工具(如 Python 脚本)进行处理。
# 分别将进程列表和模块列表保存到文件
vol -f memory_dump.raw windows.pslist.PsList -r json > process_list.json
vol -f memory_dump.raw windows.modules.Modules -r json > module_list.json

4.4. 指定自定义符号和插件路径

1
2
# 指定自定义符号文件路径和插件路径
vol -f memory_dump.raw --symbol-dirs /path/to/custom/symbols --plugin-dirs /path/to/custom/plugins custom_plugin_name

4.5. 缓存管理

1
2
3
4
5
# 清除缓存
vol -f memory_dump.raw --clear-cache windows.pslist.PsList

# 指定缓存路径
vol -f memory_dump.raw --cache-path /path/to/custom/cache windows.pslist.PsList

4.6. 关闭在线搜索额外的JSON文件

1
2
# 如果不想让 Volatility 3 在线搜索额外的 JSON 文件,可以使用 --offline 选项。
vol -f memory_dump.raw --offline windows.info.Info

4.7. 隐藏特定列的数据

1
2
# 隐藏进程列表中的 PID 列和 ParentPID 列
vol -f memory_dump.raw windows.pslist.PsList --hide-columns PID ParentPID

4.8. 详细的调试信息

1
2
# 遇到问题可以使用 -vv 开启详细信息的调试,排查问题
vol -vv -f memory_dump.raw windows.pslist.PsList

4.9. 正则表达式过滤

1
2
# 筛选出进程名以 "svc" 开头的进程信息
vol -f memory_dump.raw windows.pslist.PsList --filters "+Name,^svc.*"

4.10. 高级插件组合与链式分析

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 利用中间结果进行二次分析
# 说明:Volatility 本质上并不能直接在命令行实现链式调用,但可以分步骤完成,例如:找出可以进程,再分析模块
# 第一步找出可疑进程并保存为 JSON
vol -f memory_dump.raw windows.psxview.PsXView -r json > suspicious_processes.json
# 第二步,写python读取json,提取进程pid,并针对pid运行windows.dlllist.DllList

'''
#这里是python
import json
import subprocess

with open('suspicious_processes.json', 'r') as f:
data = json.load(f)
pids = [process['PID'] for process in data['rows'] if process['Hidden'] == True]

for pid in pids:
command = f'vol -f memory_dump.raw windows.dlllist.DllList --pid {pid} -r json'
result = subprocess.run(command, shell=True, capture_output=True, text=True)
print(result.stdout)
'''

4.11. 符号与配置文件高级运用

1
2
3
4
# 动态扩展配置
# 可以使用 --extend 选项动态扩展配置,可在运行时修改配置参数。
# 动态扩展配置,设置某个符号表的路径
vol -f memory_dump.raw --extend "symbols_path=/path/to/custom/symbols" windows.info.Info

4.12. 与其他工具集成

4.12.1. 与yara规则集成

1
2
3
# 将 Volatility 3 与 Yara 规则结合使用,对内存镜像进行恶意代码扫描。可以先使用 Volatility 3 提取相关内存区域,再使用 Yara 进行匹配。
# 提取进程内存区域并保存为文件
vol.py -f memory_dump.raw windows.memmap.Memmap --pid 1234 --output-dir /tmp/mem_dump
1
2
# 使用 Yara 规则扫描提取的内存文件
yara /path/to/rules.yar /tmp/mem_dump/*.dmp

4.12.2. 与数据库集成

1
2
3
# 将 Volatility 3 的分析结果保存到数据库中,方便后续的查询和统计分析。可以将输出保存为 CSV 格式后,使用数据库工具(如 MySQL、SQLite 等)导入数据。
vol.py -f memory_dump.raw windows.pslist.PsList -r csv > process_list.csv
# 数据库导入csv

4.12.3. 等….

这里大家自行测试吧

About this Post

This post is written by 杨CC, licensed under CC BY-NC 4.0.

#电子取证-内存工具