All Projects → memflow → Memflow

memflow / Memflow

Licence: mit
physical memory introspection framework

Programming Languages

rust
11053 projects
introspection
24 projects

Projects that are alternatives of or similar to Memflow

Vol3xp
Volatility Explorer Suit
Stars: ✭ 31 (-79.19%)
Mutual labels:  analysis, memory
knime-r
KNIME Interactive R Statistics Integration
Stars: ✭ 18 (-87.92%)
Mutual labels:  analysis, machine
zAnalysis
zAnalysis是基于Pascal语言编写的大型统计学开源库
Stars: ✭ 52 (-65.1%)
Mutual labels:  analysis, machine
l1vm
L1VM - a tiny virtual machine with a 64 bit core
Stars: ✭ 112 (-24.83%)
Mutual labels:  machine, virtual
redis-key-dashboard
This tool allows you to do a small analysis of the amount of keys and memory you use in Redis. It allows you to see overlooked keys and notice overuse.
Stars: ✭ 42 (-71.81%)
Mutual labels:  analysis, memory
Jeelizglassesvtowidget
JavaScript/WebGL glasses virtual try on widget. Real time webcam experience, robust to all lighting conditions, high end 3D PBR rendering, easy to integrate, fallback to server-side rendering
Stars: ✭ 134 (-10.07%)
Mutual labels:  virtual
Go Ethereum Code Analysis
No description or website provided.
Stars: ✭ 2,032 (+1263.76%)
Mutual labels:  analysis
Awesome Single Cell
Community-curated list of software packages and data resources for single-cell, including RNA-seq, ATAC-seq, etc.
Stars: ✭ 1,937 (+1200%)
Mutual labels:  analysis
Jhtalib
Technical Analysis Library Time-Series
Stars: ✭ 131 (-12.08%)
Mutual labels:  analysis
Qt Virt Manager
Qt Virtual machines manager
Stars: ✭ 146 (-2.01%)
Mutual labels:  virtual
Rustig
A tool to detect code paths leading to Rust's panic handler
Stars: ✭ 145 (-2.68%)
Mutual labels:  analysis
Idaobjctypes
A collection of types & functions definitions useful for Objective-C binaries analysis.
Stars: ✭ 138 (-7.38%)
Mutual labels:  analysis
Dxr
DXR is a Unity package for rapid prototyping of immersive data visualizations in augmented, mixed, and virtual reality (AR, MR, VR) or XR for short.
Stars: ✭ 134 (-10.07%)
Mutual labels:  virtual
Osvvm
OSVVM Utility Library: AlertLogPkg, CoveragePkg, RandomPkg, ScoreboardGenericPkg, MemoryPkg, TbUtilPkg, TranscriptPkg, ...
Stars: ✭ 140 (-6.04%)
Mutual labels:  memory
Openimu
Open Source Analytics & Visualisation Software for Inertial Measurement Units
Stars: ✭ 133 (-10.74%)
Mutual labels:  analysis
Mrcl
Code for the NeurIPS19 paper "Meta-Learning Representations for Continual Learning"
Stars: ✭ 147 (-1.34%)
Mutual labels:  machine
Ed4
Computational Cognitive Neuroscience, Fourth Edition
Stars: ✭ 133 (-10.74%)
Mutual labels:  memory
Networm
Python network worm that spreads on the local network and gives the attacker control of these machines.
Stars: ✭ 135 (-9.4%)
Mutual labels:  machine
Go Cache
This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresql
Stars: ✭ 143 (-4.03%)
Mutual labels:  memory
Mmat
An automatically testing and analysis hprof library for android app (自动分析Android内存泄漏)
Stars: ✭ 137 (-8.05%)
Mutual labels:  memory

memflow

Crates.io build and test codecov MIT licensed Discord

physical memory introspection framework

memflow is a library that allows live memory introspection of running systems and their snapshots. Due to its modular approach it trivial to support almost any scenario where Direct Memory Access is available.

The very core of the library is a PhysicalMemory that provides direct memory access in an abstract environment. This object can be defined both statically, and dynamically with the use of the inventory feature. If inventory is enabled, it is possible to dynamically load libraries that provide Direct Memory Access.

Through the use of OS abstraction layers, like memflow-win32, users can gain access to virtual memory of individual processes by creating objects that implement VirtualMemory.

Bridging the two is done by a highly throughput optimized virtual address translation function, which allows for crazy fast memory transfers at scale.

The core is architecture-independent (as long as addresses fit in 64-bits), and currently, both 32, and 64-bit versions of the x86 family are available to be used.

For non-rust libraries, it is possible to use the FFI to interface with the library.

In the repository, you can find various examples available (which use the memflow-win32 layer)

Building from source

To build all projects in the memflow workspace:

cargo build --release --workspace

To build all examples:

cargo build --release --workspace --examples

Run all tests:

cargo test --workspace

Execute the benchmarks:

cargo bench

Documentation

Extensive code documentation can be found at docs.rs.

An additional getting started guide as well as a higher level explanation of the inner workings of memflow can be found at memflow.github.io.

If you decide to build the latest documentation you can do it by issuing:

cargo doc --workspace --no-deps --open

Basic usage

You can either run one of the examples with cargo run --release --example. Pass nothing to get a list of examples.

Some connectors like qemu_procfs will require elevated privileges. See the Connectors section of this Readme for more information.

To simplify running examples, tests, and benchmarks through different connectors we added a simple cargo runner script for Linux to this repository. Simply set any of the following environment variables when running the cargo command to elevate privileges:

  • RUST_SUDO will start the resulting binary via sudo.
  • RUST_SETPTRACE will enable PTRACE permissions on the resulting binary before executing it.

Alternatively, you can run the benchmarks via cargo bench (can pass regex filters). Win32 benchmarks currently work only on Linux.

Running Examples

All examples support the memflow connector inventory system. You will have to install at least one connector to use the examples.

To install a connector just use the memflowup utility, or, head over to the corresponding repository and install them via the install.sh script.

You will find a folder called memflow in any of the following locations:

/opt
/lib
/usr/lib/
/usr/local/lib
/lib32
/lib64
/usr/lib32
/usr/lib64
/usr/local/lib32
/usr/local/lib64

On Windows, you can put the connector DLL in a folder named memflow that is either in your current PATH or put it in C:\Users\{Username}\.local\lib\memflow. Additionally connectors can be placed in the working directory of the process as well.

Now you can just run the examples by providing the appropriate connector name:

Run memflow_win32/read_keys example with a procfs connector:

RUST_SETPTRACE=1 cargo run --example read_keys -- -vv -c qemu_procfs -a [vmname]

Run memflow_win32/read_bench example with a coredump connector:

cargo run --example read_bench --release -- -vv -c coredump -a coredump_win10_64bit.raw

Note: In the examples above the qemu_procfs connector requires 'CAP_SYS_PTRACE=ep' permissions. The runner script in this repository will set the appropriate flags when the RUST_SETPTRACE environment variable is passed to it.

Compilation support

target build tests benches compiles on stable
linux x86_64 ✔️ ✔️ ✔️ ✔️
mac x86_64 ✔️ ✔️ ✔️ ✔️
win x86_64 ✔️ ✔️ ✔️ ✔️
linux aarch64 ✔️ ✔️ ✔️ ✔️
no-std ✔️ ✔️ ✔️

Target support

memflow-win32 is tested on the latest Windows 10 versions all the way down to Windows NT 4.0. If you found a version that does not work please submit an issue with the major/minor version as well as the build number.

Connectors

All examples provided in this repository are using the inventory to dynamically load a connector at runtime. When using the library programmatically it is possible to just statically link a connector into the code.

Some connectors also require different permissions. Please refer to the individual connector repositories for more information.

These are the currently officially existing connectors:

In case you write your own connector please hit us up with a merge request so we can maintain a list of third-party connectors as well.

Road map / Future Development

  • Provide a rust native connector for PCILeech based hardware
  • Provide a UEFI Demo
  • Linux target support

Acknowledgements

  • CasualX for his wonderful pelite crate
  • ufrisk for his prior work on the subject and many inspirations

Contributing

Please check CONTRIBUTE.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].