Skip to main content

Crate vmaware

Crate vmaware 

Source
Expand description

VMAware – Rust VM Detection Library

A faithful port of the VMAware C library. Provides a simple API for detecting virtual machine environments.

§Quick-start

use vmaware::{detect, brand, percentage};

if detect(None) {
    println!("Running inside a VM: {}", brand(None).as_str());
    println!("Confidence: {}%", percentage(None));
}

Re-exports§

pub use types::Flagset;
pub use types::HyperXState;
pub use types::Technique;
pub use types::VMBrand;

Modules§

core
Detection engine – mirrors vmaware_core.c.
cpu
CPU identification utilities: CPUID wrapper, brand string, databases, vmid template, stepping extraction.
memo
Global memoisation layer – mirrors vmaware_memo.c.
techniques
Technique modules.
types
util
Utility helpers – mirrors vmaware_util.c.

Functions§

brand
Returns the most likely VM brand.
check
Run a single technique and return whether it fired.
conclusion
Human-readable conclusion string.
detect
Returns true when the current environment is detected as a virtual machine.
detected_count
Returns the number of techniques that returned a positive result.
hyperx
Hyper-X environment classification.
multi_brand
Returns all brands that contributed at least one point.
percentage
Returns the VM confidence as a percentage (0–100).