Giter Club home page Giter Club logo

vmw_backdoor-rs's Introduction

vmw_backdoor

crates.io Documentation

A pure-Rust library for VMware host-guest protocol ("VMXh backdoor").

This library provides helpers to access and use the VMware backdoor from a guest VM. It allows bi-directional interactions with the VMWare hypervisor and host environment.

The "backdoor" protocol does not have official specifications, but it has been widely analyzed and there are multiple projects documenting it:

  1. https://github.com/vmware/open-vm-tools/blob/stable-11.0.5/open-vm-tools/lib/include/backdoor_def.h
  2. https://wiki.osdev.org/VMware_tools
  3. https://sysprogs.com/legacy/articles/kdvmware/guestrpc.shtml
  4. https://github.com/vmware/vmw-guestinfo/tree/master/bdoor
  5. https://sites.google.com/site/chitchatvmback/backdoor

Example

let is_vmw = vmw_backdoor::is_vmware_cpu();
println!("VMware CPU detected: {}.", is_vmw);

let mut guard = vmw_backdoor::access_backdoor().unwrap();
println!("Raised I/O access to reach backdoor port.");

let found = guard.probe_vmware_backdoor().unwrap_or(false);
println!("VMware backdoor detected: {}.", found);

let mut erpc = guard.open_enhanced_chan().unwrap();
let key = "guestinfo.ignition.config.data";
let guestinfo = erpc.get_guestinfo(key.as_bytes()).unwrap();

if let Some(val) = guestinfo {
    println!("Got value for key '{}':", key);
    println!("{}", String::from_utf8_lossy(&val));
};

Some more examples are available under examples.

License

Licensed under either of

at your option.

vmw_backdoor-rs's People

Contributors

lucab avatar bgilbert avatar coreosbot avatar travier avatar dependabot[bot] avatar

Stargazers

Alan Wong Yao De avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.