Volatility工具学习

背景

VMware虚拟机系统hang死,手动重启无法触发系统panic,从而不能触发kdump产生vmcore文件进行原因分析;此种情况下需要手动生成虚拟机内存快照,进而利用Volatility工具分析系统hang死的具体原因。

配置

  • 使用VMware创建虚拟机内存快照,同时重启虚拟机。
  • 下载对应python版本的Volatility 。(python3 Volatility3 )
  • 安装依赖distorm3
pip install distorm3

正常情况下,完成以上步骤后,就可以使用Volatility工具分析内存快照了。

使用

1、分析系统架构

使用imageinfo参数查看设备信息,找到适配的配置文件。

python vol.py -f /root/vm_snapshot/Test.vmem imageinfo

当然,如果系统信息确定的情况下,也可以直接使用内置的配置文件。

$ python vol.py --info
Volatility Foundation Volatility Framework 2.6.1Profiles
--------
VistaSP0x64           - A Profile for Windows Vista SP0 x64
VistaSP0x86           - A Profile for Windows Vista SP0 x86
... ...

可以看到Volatility仅内置Windows系统的配置文件,因此在Linux系统上imageinfo时,会出现无法正常执行的情形。

$ python vol.py -f /root/vm_snapshot/Test.vmem imageinfo
Volatility Foundation Volatility Framework 2.6.1
INFO    : volatility.debug    : Determining profile based on KDBG search...

若出现这种情况,则说明Volatility的配置文件无法分析该系统的内存快照,需要手动构建你自己的 Linux 配置文件。

构建过程中,可能会出现一下编译错误,如gcc版本错误,dwarf库未找到等等,解决方案都可以在网上找到,这里就不一一赘述了。

$ cd tools/linux/
$ pwd
/root/volatility/tools/linux
$ ls
kcore  Makefile  Makefile.enterprise  module.c
$ make
make -C //lib/modules/4.9.0-19-linx-security-amd64/build CONFIG_DEBUG_INFO=y M="/root/volatility/tools/linux" modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.0-19-linx-security-amd64'CC [M]  /root/volatility/tools/linux/module.oBuilding modules, stage 2.MODPOST 1 modulesCC      /root/volatility/tools/linux/module.mod.oLD [M]  /root/volatility/tools/linux/module.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-19-linx-security-amd64'
dwarfdump -di module.ko > module.dwarf
make -C //lib/modules/4.9.0-19-linx-security-amd64/build M="/root/volatility/tools/linux" clean
make[1]: Entering directory '/usr/src/linux-headers-4.9.0-19-linx-security-amd64'CLEAN   /root/volatility/tools/linux/.tmp_versionsCLEAN   /root/volatility/tools/linux/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-19-linx-security-amd64'

编译完成之后,目录下会出现一个module.dwarf文件,我们需要将该文件与系统符号表一起打包,创建Volatility插件。

$ ls -l module.dwarf
-rw-r--r-- 1 root root 3191958 416 11:23 module.dwarf
$ ls -l /boot/System.map-4.9.0-19-linx-security-amd64
-rw-r--r-- 1 root root 3220023 625  2024 /boot/System.map-4.9.0-19-linx-security-amd64
$ zip volatility/plugins/overlays/linux/Linx_6.0.80.zip tools/linux/module.dwarf /boot/System.map-4.9.0-19-linx-security-amd64
updating: tools/linux/module.dwarf (deflated 91%)
updating: boot/System.map-4.9.0-19-linx-security-amd64 (deflated 79%)

上述操作完成后,可以使用--info查询插件是否正常安装。

$ python vol.py -f /root/vm_snapshot/Test.vmem --info|grep Linx
Volatility Foundation Volatility Framework 2.6.1
LinuxLinx_6_0_80x64   - A Profile for Linux Linx_6.0.80 x64
2、使用

使用-h参数查看配置文件支持的命令。

$ python vol.py -f /root/vm_snapshot/Test.vmem --profile=LinuxLinx_6_0_80x64 -h
Volatility Foundation Volatility Framework 2.6.1
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=/root/.volatilityrcUser 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=/root/.cache/volatilityDirectory where cache files are stored--cache               Use caching--tz=TZ               Sets the (Olson) timezone for displaying timestampsusing pytz (if installed) or tzset-f FILENAME, --filename=FILENAMEFilename to use when opening an image--profile=LinuxLinx_6_0_80x64Name of the profile to load (use --info to see a listof supported profiles)-l file:///root/vm_snapshot/Test.vmem, --location=file:///root/vm_snapshot/Test.vmemA 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, seethe Module Output Options below)--output-file=OUTPUT_FILEWrite output in this file-v, --verbose         Verbose information--physical_shift=PHYSICAL_SHIFTLinux kernel physical shift address--virtual_shift=VIRTUAL_SHIFTLinux kernel virtual shift address-g KDBG, --kdbg=KDBG  Specify a KDBG virtual address (Note: for 64-bitWindows 8 and above this is the address ofKdCopyDataBlock)--force               Force utilization of suspect profile--cookie=COOKIE       Specify the address of nt!ObHeaderCookie (valid forWindows 10 only)-k KPCR, --kpcr=KPCR  Specify a specific KPCR addressSupported Plugin Commands:imagecopy       Copies a physical address space out as a raw DD imagelimeinfo        Dump Lime file format informationlinux_apihooks  Checks for userland apihookslinux_arp       Print the ARP tablelinux_aslr_shift        Automatically detect the Linux ASLR shiftlinux_banner    Prints the Linux banner informationlinux_bash      Recover bash history from bash process memorylinux_bash_env  Recover a process' dynamic environment variableslinux_bash_hash Recover bash hash table from bash process memorylinux_check_afinfo      Verifies the operation function pointers of network protocolslinux_check_creds       Checks if any processes are sharing credential structureslinux_check_fop Check file operation structures for rootkit modificationslinux_check_idt Checks if the IDT has been alteredlinux_check_inline_kernel       Check for inline kernel hookslinux_check_modules     Compares module list to sysfs info, if availablelinux_check_syscall     Checks if the system call table has been alteredlinux_check_tty Checks tty devices for hookslinux_cpuinfo   Prints info about each active processorlinux_dentry_cache      Gather files from the dentry cachelinux_dmesg     Gather dmesg bufferlinux_dump_map  Writes selected memory mappings to disklinux_dynamic_env       Recover a process' dynamic environment variableslinux_elfs      Find ELF binaries in process mappingslinux_enumerate_files   Lists files referenced by the filesystem cachelinux_find_file Lists and recovers files from memorylinux_getcwd    Lists current working directory of each processlinux_hidden_modules    Carves memory to find hidden kernel moduleslinux_ifconfig  Gathers active interfaceslinux_info_regs It's like 'info registers' in GDB. It prints out all thelinux_iomem     Provides output similar to /proc/iomemlinux_kernel_opened_files       Lists files that are opened from within the kernellinux_keyboard_notifiers        Parses the keyboard notifier call chainlinux_ldrmodules        Compares the output of proc maps with the list of libraries from libdllinux_library_list      Lists libraries loaded into a processlinux_librarydump       Dumps shared libraries in process memory to disklinux_list_raw  List applications with promiscuous socketslinux_lsmod     Gather loaded kernel moduleslinux_lsof      Lists file descriptors and their pathlinux_malfind   Looks for suspicious process mappingslinux_memmap    Dumps the memory map for linux taskslinux_moddump   Extract loaded kernel moduleslinux_mount     Gather mounted fs/deviceslinux_mount_cache       Gather mounted fs/devices from kmem_cachelinux_netfilter Lists Netfilter hookslinux_netscan   Carves for network connection structureslinux_netstat   Lists open socketslinux_pidhashtable      Enumerates processes through the PID hash tablelinux_pkt_queues        Writes per-process packet queues out to disklinux_plthook   Scan ELF binaries' PLT for hooks to non-NEEDED imageslinux_proc_maps Gathers process memory mapslinux_proc_maps_rb      Gathers process maps for linux through the mappings red-black treelinux_procdump  Dumps a process's executable image to disklinux_process_hollow    Checks for signs of process hollowinglinux_psaux     Gathers processes along with full command line and start timelinux_psenv     Gathers processes along with their static environment variableslinux_pslist    Gather active tasks by walking the task_struct->task listlinux_pslist_cache      Gather tasks from the kmem_cachelinux_psscan    Scan physical memory for processeslinux_pstree    Shows the parent/child relationship between processeslinux_psxview   Find hidden processes with various process listingslinux_recover_filesystem        Recovers the entire cached file system from memorylinux_route_cache       Recovers the routing cache from memorylinux_sk_buff_cache     Recovers packets from the sk_buff kmem_cachelinux_slabinfo  Mimics /proc/slabinfo on a running machinelinux_strings   Match physical offsets to virtual addresses (may take a while, VERY verbose)linux_threads   Prints threads of processeslinux_tmpfs     Recovers tmpfs filesystems from memorylinux_truecrypt_passphrase      Recovers cached Truecrypt passphraseslinux_vma_cache Gather VMAs from the vm_area_struct cachelinux_volshell  Shell in the memory imagelinux_yarascan  A shell in the Linux memory imagembrparser       Scans for and parses potential Master Boot Records (MBRs)patcher         Patches memory based on page scansraw2dmp         Converts a physical memory sample to a windbg crash dumpvmwareinfo      Dump VMware VMSS/VMSN information

Volatility3 使用

Volatility3在用法上与Volatility差异不大,只是支持的参数列表发生了较大变化,可以使用-h查看支持的插件列表。其中较大的差别在于Volatility3抛弃了构建起来较为复杂的 profile,转而使用符号表。而由于Linux 版本很多很杂,并没有提供非常全面的符号表,想要使用的话必须使用 dwarf2json生成自己的符号文件。

$ ./dwarf2json linux
No files specified
Usage: dwarf2json linux [OPTIONS]--elf PATH           ELF file PATH to extract symbol and type information--elf-symbols PATH   ELF file PATH to extract only symbol information--elf-types PATH     ELF file PATH to extract only type information--system-map PATH    System.Map file PATH to extract symbol information

--system-map参数指定/boot目录下的系统符号表文件,--elf文件必须指定带调试符号vmlinuz文件。将dwarf2json的输出结果保存到Volatility3根目录,就可以正常使用了。

$ ./dwarf2json linux --elf /usr/lib/debug/boot/vmlinux-4.4.0-137-generic > output.json
# Volatility3分析进程
$ python3 vol.py -f /vm_snapshot/Test.vmem -s . linux.pslist.PsList

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/902602.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

学习笔记(C++篇)--- Day 4

目录 1.赋值运算符重载 1.1 运算符重载 1.2 赋值运算符重载 1.3 日期类实现 1.赋值运算符重载 1.1 运算符重载 ①当运算符被用于类类型的对象时,C语言允许我们通过通过运算符重载的形式指定新的含义。C规定类类型对象使用运算符时,必须转换成调用对…

Docker 快速入门教程

1. Docker 基本概念 镜像(Image): 只读模板,包含创建容器的指令 容器(Container): 镜像的运行实例 Dockerfile: 用于构建镜像的文本文件 仓库(Repository): 存放镜像的地方(如Docker Hub) 2. 安装Docker 根据你的操作系统选择安装方式:…

vue项目中使用tinymce富文本编辑器

vue使用tinymce 文章目录 vue使用tinymcetinymce富文本编辑器在这里插入图片描述 一、本文要实现二、使用步骤1.安装tinymce2.tinymce组件新建3. 在store添加商品详情的状态管理4. tinymce组件的引入 tinymce富文本编辑器 提示:以下是本篇文章正文内容,下…

简单适配torch_npu不支持的ATen算子

简单适配torch_npu不支持的ATen算子 一、背景说明1.1 PyTorch扩展机制1.2 核心概念二、实现步骤详解2.1 实现前向、反向传播算子2.2 编译生成动态库2.3 测试验证程序三、关键点解析3.1 设计注意事项3.2 性能优化方向四、验证结果一、背景说明 1.1 PyTorch扩展机制 PrivateUse1…

同样的html标记,不同语言的文本,显示的字体和粗细会不一样吗

同样的 HTML 标记,在不同语言的文本下,显示出来的字体和粗细确实可能会不一样,原因如下: 🌍 不同语言默认字体不同 浏览器字体回退机制 CSS 里写的字体如果当前系统不支持,就会回退到下一个,比如…

基于 Spring Boot 瑞吉外卖系统开发(六)

基于 Spring Boot 瑞吉外卖系统开发(六) 菜品列表 在系统管理端首页,单击左侧菜单栏中的“菜品管理”,会在右侧打开菜品管理页面。 请求URL/dish/page,请求方法GET,请求参数page,pageSize。 该菜品列表…

计算机视觉与深度学习 | TensorFlow基本概念与应用场景:MNIST 手写数字识别(附代码)

TensorFlow 基本概念 TensorFlow 是一个开源的机器学习框架,由 Google 开发,核心概念包括: 张量(Tensor):多维数组,是数据的基本单位。计算图(Graph):早期版本中用于描述数据流和计算过程,2.x 默认启用即时执行(Eager Execution),兼顾灵活性和性能。层(Layers)…

vue+django+LSTM微博舆情分析系统 | 深度学习 | 食品安全分析

文章结尾部分有CSDN官方提供的学长 联系方式名片 文章结尾部分有CSDN官方提供的学长 联系方式名片 关注B站,有好处! 编号: D031 LSTM 架构:vuedjangoLSTMMySQL 功能: 微博信息爬取、情感分析、基于负面消极内容舆情分析…

RHCE第三次作业 搭建dns的正向解析服务器

server为服务器 client为客户端 设置主配置文件 在server下: [rootServer ~]#vim /etc/named.conf #进入到配置页面,并修改 设置区域文件 [rootServer ~]# vim /etc/named.rfc1912.zones 设置域名解析文件 [rootServer named]# cd /var/named…

Windows 同步技术-一次性初始化

组件通常设计为在首次调用时执行初始化任务,而不是加载它们时。 一次性初始化函数可确保此初始化仅发生一次,即使多个线程可能尝试初始化也是如此。 Windows Server 2003 和 Windows XP: 应用程序必须使用 互锁函数 或其他同步机制提供自己的…

OpenCV 中的角点检测方法详解

文章目录 引言1. Harris角点检测原理1.1 什么是角点?1.2 Harris算法的核心思想1.3 角点、边缘和平坦区域的区分 2. OpenCV实现Harris角点检测3. 总结 引言 在计算机视觉和图像处理中,特征点检测(Feature Detection)是一个关键任务…

全面介绍AVFilter 的添加和使用

author: hjjdebug date: 2025年 04月 22日 星期二 13:48:19 CST description: 全面介绍AVFilter 的添加和使用 文章目录 1.两个重要的编码思想1. 写代码不再是我们调用别人,而是别人调用我们!2. 面向对象的编程方法. 2. AVFilter 开发流程2.1 编写AVFilter 文件2.1.…

生物计算安全攻防战:从DNA存储破译到碳基芯片防御体系重构

随着碳基生物芯片突破冯诺依曼架构限制,DNA数据存储密度达到1EB/克量级,合成生物学与信息技术的融合正引发新一轮安全革命。本文深入解析碳基芯片逆向工程路径,揭示酶驱动DNA数据解码的技术突破,预警合成生物回路潜在的数据泄露风…

Spring Boot 集成 Ollama API 使用总结

Spring Boot 中集成 Ollama API 的完整指南&#xff0c;涵盖基础配置、API 调用、性能优化及常见问题解决。 一、环境准备 1. 依赖配置 在 pom.xml 中添加必要的依赖&#xff1a; <!-- Spring Web (用于 REST 请求) --> <dependency><groupId>org.springf…

SimVG论文精读

1. 数据集和任务部分 SimVG用的六个数据集&#xff1a;RefCOCO//g, ReferIt, Flickr30K, and GRefCOCO 数据集名称图像数量参照表达式数量参照对象实例数语言特性主要任务RefCOCO19,994142,20950,000​基于 MS COCO 图像&#xff0c;采用 ReferItGame 收集的指代表达数据集。…

VS中回显109:对‘pthread_create’未定义的引用

VS中解决 用VS2022写多线性程时需要使用pthread_create()用于创建线程,即使项目里加了所需要的头文件#include <pthread.h>但编译却报对pthread_create未定义的引用的错误,这是因为没有包含所需要的库 项目右击属性 在库依赖项中添加 pthread Ubuntu中解决 在Ubuntu中…

kotlin与MVVM结合使用总结(一)

一、Kotlin 与 MVVM 结合的核心优势 代码简洁性 数据类&#xff08;data class&#xff09;简化 Model 层定义&#xff0c;自动生成equals/hashCode/toString扩展函数简化 View 层逻辑&#xff08;如点击事件扩展&#xff09;lateinit/by lazy优化 ViewModel 属性初始化 异步处…

视频分析设备平台EasyCVR安防视频小知识:安防监控常见故障精准排查方法

随着安防监控技术的飞速发展&#xff0c;监控系统已经成为现代安防体系中不可或缺的核心组成部分&#xff0c;广泛应用于安防监控、交通管理、工业自动化等多个领域。然而&#xff0c;监控系统的稳定运行高度依赖于设备的正确配置、线路的可靠连接以及电源的稳定供电。在实际应…

【DeepSeek 学习推理】Llumnix: Dynamic Scheduling for Large Language Model Serving实验部分

6.1 实验设置 测试平台。我们使用阿里云上的16-GPU集群&#xff08;包含4个GPU虚拟机&#xff0c;类型为ecs.gn7i-c32g1.32xlarge&#xff09;。每台虚拟机配备4个NVIDIA A10&#xff08;24 GB&#xff09;GPU&#xff08;通过PCI-e 4.0连接&#xff09;、128个vCPU、752 GB内…

如何利用深度学习进行交通流量预测与疏导

传统的交通管理方法&#xff0c;诸如固定的信号灯配时方案、基于经验的警力部署等&#xff0c;在面对现代城市如此复杂多变的交通状况时&#xff0c;已然显得捉襟见肘&#xff0c;难以满足高效交通管理的需求。 在此背景下&#xff0c;准确的交通流量预测便成为了破解交通拥堵难…