vol-rs README

The project's README from github.com/daffainfo/vol-rs. As one markdown file: README.md.

vol-rs

A port of the Volatility 3 memory forensics framework from Python to Rust. It reads the same memory images, runs the same plugins with the same options, and prints the same output, byte for byte, a good deal faster.

License

This project is a port of Volatility 3 and is therefore an "Addition" under the Volatility Software License 1.0, so it is published under that same license. The full text is in LICENSE and online at https://www.volatilityfoundation.org/license/vsl-v1.0. Every source file keeps the notice recording what it was derived from.

This project is not affiliated with or endorsed by the Volatility Foundation. The name Volatility is used only to say what this is a port of.

Building

Rust 1.85 or newer, then:

cargo build --release

The binary lands at target/release/vol-rs. Nothing optional is needed. Symbol decompression, RC4, DES, AES, YARA matching, x86 disassembly, PNG writing and tar archives are all built in, where the Python version reaches for pycryptodomex, yara-python, capstone and pillow.

Using it

./target/release/vol-rs -f memory.raw windows.pslist.PsList
./target/release/vol-rs -f memory.lime linux.bash.Bash
./target/release/vol-rs -f memory.raw -r csv windows.netscan.NetScan
./target/release/vol-rs windows.malfind.Malfind --help
./target/release/vol-rs --list-plugins

Every option the Python version takes is taken here too, with the same names and the same defaults, including -o, -r, -s, -c, -e, --filters, --hide-columns, --save-config, --stackers and --single-swap-locations. Each plugin's own options match as well, which the help pages show: all 197 of them are identical to the Python ones, character for character.

Symbols

Symbol packs go in $XDG_DATA_HOME/vol-rs/symbols, or ~/.local/share/vol-rs/symbols when that variable is not set. A pack somewhere else is named with --symbol-dirs or through the VOLRS_SYMBOL_PATH environment variable. Windows symbols are fetched from the Microsoft symbol server on demand and cached under ~/.cache/vol-rs.

What has been checked

Both sides were run against the same captures and diffed, header framing and trailing newlines included:

Check Result
Windows plugins with no arguments 99 of 100 identical
Linux plugins with no arguments 56 of 57 identical
Runs that take arguments 43 of 43 identical
Files written by extracting plugins 1,747 compared, every file both tools wrote is equal
Plugin help pages 197 of 197 identical

The eight files that did not compare equal are the two cases listed under Known differences below. Seven are partial files the Python version leaves on disk after reporting that it could not dump them, which this port does not create, and one is a tarball whose contents match but whose timestamps record when each run happened.

The two plugins missing from those counts are the ones the Python version cannot finish on the test machine. windows.memmap.Memmap is killed by the out of memory killer after 7.8 million lines, and linux.pscallstack.PsCallStack is killed before it ends. In both cases every line the Python version managed to write first is reproduced exactly.

Across every plugin that runs with no arguments, the Windows sweep takes 273 seconds here against 5723 seconds, and the Linux sweep 68 seconds against 3130 seconds.

Speed

The ten widest gaps on each capture, out of every plugin that runs with no arguments:

Windows

Plugin Rust Python Faster
windows.malware.suspicious_threads.SuspiciousThreads 0.47 s 281.6 s x599
windows.suspicious_threads.SuspiciousThreads 0.50 s 259.1 s x518
windows.malware.hollowprocesses.HollowProcesses 0.52 s 257.9 s x496
windows.suspended_threads.SuspendedThreads 0.090 s 42.0 s x467
windows.malware.malfind.Malfind 0.52 s 236.5 s x455
windows.hollowprocesses.HollowProcesses 0.59 s 263.0 s x446
windows.debugregisters.DebugRegisters 0.090 s 37.0 s x411
windows.malfind.Malfind 0.65 s 239.7 s x369
windows.vadinfo.VadInfo 0.99 s 329.7 s x333
windows.verinfo.VerInfo 0.99 s 150.7 s x152

Linux

Plugin Rust Python Faster
linux.library_list.LibraryList 1.99 s 788.7 s x396
linux.kallsyms.Kallsyms 2.41 s 161.6 s x67
linux.netfilter.Netfilter 0.89 s 56.3 s x63
linux.lsof.Lsof 0.89 s 55.6 s x62
linux.sockstat.Sockstat 1.60 s 97.2 s x61
linux.check_idt.Check_idt 0.82 s 49.7 s x61
linux.malware.netfilter.Netfilter 1.07 s 62.0 s x58
linux.pagecache.Files 1.67 s 93.4 s x56
linux.kthreads.Kthreads 0.87 s 47.2 s x54
linux.proc.Maps 2.53 s 135.4 s x54

BENCHMARKS.md has the rest: every plugin on both captures, the runs that take arguments, and the machine the numbers were measured on.

Known differences

A handful of things cannot match, and each is deliberate:

To do

Everything below is ported and builds, but has not been run against real evidence yet:

Credit

Volatility 3 is the work of the Volatility Foundation and its contributors. This is a port of their design, their plugin set and their output format, and it exists because that work is open.

vol-rs (daffainfo/vol-rs)

Searching Database…

197 ·GitHub
这是什么?“vol-rs”是把 Volatility 3 内存取证框架从 Python 逐行移植到 Rust 的项目。它读取相同的内存镜像,用相同的选项运行相同的插件,并打印逐字节一致的输出,只是快得多。
这是命令行工具,还是导入我代码的库?它是一个独立的命令行二进制(“vol-rs”),与 Volatility 3 CLI 完全一致:相同的参数名、相同的默认值、相同的插件选项——不是用来嵌入其他代码的库。
怎么构建和运行它?用 Rust 1.85 或更新版本通过 Cargo 构建;编译出的二进制位于 target/release/vol-rs,接受与 Volatility 3 相同的参数,例如 -o、-r、-s、-c、-e、--filters 和 --stackers。
需要单独安装 Python、YARA 或其他库吗?不需要,一切都内置在这一个二进制里:符号解压、RC4/DES/AES、YARA 匹配、x86 反汇编、PNG 写入和 tar 归档,取代了 Python 版中的 pycryptodomex、yara-python、capstone 和 pillow。
每个插件都经过真实样本的完整验证吗?Windows 和 Linux 插件已与 Python 输出逐字节核对,但 23 个 macOS 插件仍需要真实的 Mac 内存转储来验证,32 位镜像未经测试,crash dump、AVML、QEMU、ELF core 和 Xen 格式也尚未验证。
它能分析哪些操作系统的内存镜像?它支持与 Volatility 3 相同的目标:Windows 和 Linux 转储经过充分测试并与 Python 输出做过 diff,macOS(Darwin 10.10–10.15)插件已实现并通过符号检查,但尚未在真实的 Mac 镜像上运行过。
vol-rs 比 Python 版 Volatility 3 快多少?在完整的无参数插件扫描中,Windows 运行这里只需 273 秒,而 Python 需要 5723 秒;Linux 运行则是 68 秒对 3130 秒;像 SuspiciousThreads 这样的单个插件最多可快 599 倍。
符号包放在哪里,Windows 符号如何获取?符号包存放在 $XDGDATAHOME/vol-rs/symbols(默认是 ~/.local/share/vol-rs/symbols);Windows 符号会按需自动从微软符号服务器获取,并缓存在 ~/.cache/vol-rs 下。
它的输出与原版 Volatility 3 有多一致?非常一致:100 个 Windows 插件中的 99 个、57 个 Linux 插件中的 56 个、全部 43 次带参数运行、1,747 个提取文件和全部 197 个插件帮助页面都与 Python 工具完全一致。
Creator
daffainfo
Size
1.3 MB
Stars
197
Age
1mo
Commits · 90 Days