Volatility

Fc04dB Lv3

# Volatility

# 先以 OtterCTF 为例

# 查看镜像信息

vol.py -f /home/kali/Desktop/OtterCTF.vmem imageinfo

image.png

会存在很多镜像,一般第一个就是对的,可以用下面的命令验证

# 调出 shell 窗口

可以测试你猜测的系统是否正确,正确的话就能 getshell

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 volshell

image.png

# 获取镜像的用户名密码

可以使用 hashdump,但得到密码都是哈希加密之后的,使用 lsadump 或者 mimikatz 可以得到明文

直接利用后两个插件,

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 lsadump

image.png

vol.py --plugins=/home/kali/Tools/volatility/volatility/plugins -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 mimikatz

image.png

# 获取 ip 地址

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 netscan

image.png

# 获取主机名

# 查注册表

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 hivelist 1

image.png

主机名信息在 SYSTEM 的那一条记录中,再用 -o + Virtual printkey 来查看指定的记录

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 -o 0xfffff8a000024010 printkey

1714225836369.png

跟进 ControlSet001

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 -o 0xfffff8a000024010 printkey -K "ControlSet001"

1714225968337.png

继续跟进 Control

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 -o 0xfffff8a000024010 printkey -K "ControlSet001\Control"

1714226095273.png

跟进 ComputerName

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 -o 0xfffff8a000024010 printkey -K "ControlSet001\Control\ComputerName"

1714226188973.png

继续跟进 ComputerName

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 -o 0xfffff8a000024010 printkey -K "ControlSet001\Control\ComputerName\ComputerName"

1714226289670.png

到处注册表: hivedump

# 查看进程

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 pslist

1714227976982.png

题目要求找到他玩的游戏,排除认识的程序,找不认识的百度一下,这个 lunarMS 就是答案,还需要找出游戏的服务器 ip,用 grep 正则表达

1714231953244.png

# 提取进程

1.memdump 将进程以 dmp 文件保存

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 memdump -p 708 -D /home/kali

1714273354650.png

在利用 strings 提取字符串找到游戏账号

1714273819021.png

2. 提取完整进程

用 procdump 提取

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 procdump -p 3720 -D /home/kali

1714276933594.png

# 查看剪切板

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 clipboard

1714274863169.png

获得邮箱

# 查看进程树

题目要求找到恶意程序

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 pstree

1714275093047.png

可以用 dlllist 查看一下进程相关的 dll 文件列表

# 查看 dll 文件列表

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 dlllist -p 3720

1714275458700.png

运行在 temp 中,不太正经,就是题目答案

# 扫描文件

vol.py -f /home/kali/Desktop/OtterCTF.vmem --profile=Win7SP1x64 filescan |grep "Rick And Morty"

1714276122628.png

# vol.py -h

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
Options:
-h, --help list all available options and their default values.
Default values may be set in the configuration file
(/etc/volatilityrc)
--conf-file=/home/kali/.volatilityrc
User based configuration file
-d, --debug Debug volatility
--plugins=PLUGINS Additional plugin directories to use (colon separated)
--info Print information about all registered objects
--cache-directory=/home/kali/.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
--physical_shift=PHYSICAL_SHIFT
Linux kernel physical shift address
--virtual_shift=VIRTUAL_SHIFT
Linux kernel virtual shift address
-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
-k KPCR, --kpcr=KPCR Specify a specific KPCR address
--cookie=COOKIE Specify the address of nt!ObHeaderCookie (valid for
Windows 10 only)

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 #提取命令行历史记录(_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 #提取命令行历史记录扫描_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 #转储内存中的Windows账号密码哈希
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 #重建IE缓存及访问历史记录
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
netscan #扫描网络情况
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
  • Title: Volatility
  • Author: Fc04dB
  • Created at : 2024-04-27 21:21:27
  • Updated at : 2024-07-04 23:15:13
  • Link: https://redefine.ohevan.com/2024/04/27/Volatility/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments