All Projects → Bareflank → Hypervisor

Bareflank / Hypervisor

Licence: other
lightweight hypervisor SDK written in C++ with support for Windows, Linux and UEFI

Programming Languages

cxx
24 projects

Projects that are alternatives of or similar to Hypervisor

Cpu Internals
Intel / AMD CPU Internals
Stars: ✭ 510 (-45.4%)
Mutual labels:  hypervisor
Hyperdbg
The Source Code of HyperDbg Debugger 🐞
Stars: ✭ 658 (-29.55%)
Mutual labels:  hypervisor
Assimp
The official Open-Asset-Importer-Library Repository. Loads 40+ 3D-file-formats into one unified and clean data structure.
Stars: ✭ 7,309 (+682.55%)
Mutual labels:  stl
Ami
AMI Medical Imaging (AMI) JS ToolKit
Stars: ✭ 569 (-39.08%)
Mutual labels:  stl
Hvpp
hvpp is a lightweight Intel x64/VT-x hypervisor written in C++ focused primarily on virtualization of already running operating system
Stars: ✭ 637 (-31.8%)
Mutual labels:  hypervisor
Vm
💻☁📦 The (official) Nextcloud VM (virtual machine appliance), Home/SME Server and scripts for RPi (4).
Stars: ✭ 716 (-23.34%)
Mutual labels:  hypervisor
Openastrotracker
3D printed DSLR tracking mount
Stars: ✭ 434 (-53.53%)
Mutual labels:  stl
Whistler Wire Mesh
🏂 🎿 Whistler, BC
Stars: ✭ 5 (-99.46%)
Mutual labels:  stl
Solo5
A sandboxed execution environment for unikernels
Stars: ✭ 659 (-29.44%)
Mutual labels:  hypervisor
Runv
Hypervisor-based Runtime for OCI
Stars: ✭ 798 (-14.56%)
Mutual labels:  hypervisor
Hypervisor From Scratch
Source code of a multiple series of tutorials about the hypervisor. Available at: https://rayanfam.com/tutorials
Stars: ✭ 623 (-33.3%)
Mutual labels:  hypervisor
Frakti
The hypervisor-based container runtime for Kubernetes.
Stars: ✭ 630 (-32.55%)
Mutual labels:  hypervisor
Geom
2D/3D geometry toolkit for Clojure/Clojurescript
Stars: ✭ 759 (-18.74%)
Mutual labels:  stl
Stdgpu
stdgpu: Efficient STL-like Data Structures on the GPU
Stars: ✭ 531 (-43.15%)
Mutual labels:  stl
Android 3d Model Viewer
Android OpenGL 2.0 application to view 3D models. Published on Play Store
Stars: ✭ 809 (-13.38%)
Mutual labels:  stl
Hvmi
Hypervisor Memory Introspection Core Library
Stars: ✭ 438 (-53.1%)
Mutual labels:  hypervisor
Ksm
A fast, hackable and simple x64 VT-x hypervisor for Windows and Linux. Builtin userspace sandbox and introspection engine.
Stars: ✭ 673 (-27.94%)
Mutual labels:  hypervisor
Hyperplatform
Intel VT-x based hypervisor aiming to provide a thin VM-exit filtering platform on Windows.
Stars: ✭ 925 (-0.96%)
Mutual labels:  hypervisor
30 Seconds Of Cpp
30 Seconds of C++ (STL in C++). Read More about 30C++ here 👉
Stars: ✭ 815 (-12.74%)
Mutual labels:  stl
Cadquery
A python parametric CAD scripting framework based on OCCT
Stars: ✭ 764 (-18.2%)
Mutual labels:  stl

Bareflank

Description

Warning: The master branch is under heavy development as we work to complete Bareflank 3.0. For now, you might want to consider one of our offical releases until Bareflank 3.0 is complete .

The Bareflank Hypervisor is an open source hypervisor Software Development Toolkit (SDK), led by Assured Information Security, Inc. (AIS), that provides the tools needed to rapidly prototype and create your own hypervisor.

Most people think that hypervisors are meant to virtualize servers and provide a means to run Windows on a Mac, but there is a whole field of research where hypervisors are used without guest virtual machines. Since a hypervisor is capable of controlling the host OS running underneath it (so-called "ring -1"), host-only hypervisors support introspection, reverse engineering, anti-virus, containerization, diversity, and even architectural research like MoRE. All of these use cases start the same way, by spending months standing up the hypervisor itself before you can start working on your actual project. Existing open source hypervisors are burdened with legacy support, only support a single operating system or contain unnecessary complexity that make them painful to work with when conducting hypervisor research.

Instead, Bareflank uses a layered, modular approach, that lets you pick just how much complexity you need in your project:

  • BSL: provides a header-only, AUTOSAR compliant implementation of a subset of the C++ Standard Library, used to implement Bareflank's C++ components ensuring Bareflank and projects built using Bareflank can support critical systems applications like Automotive.
  • LLVM: provides our custom implementation of the LLVM Clang compiler and associated tools including additional static analysis checks in Clang Tidy to ensure compliance with AUTOSAR.
  • PAL: provides auto-generated intrinsics APIs for Intel, AMD and ARM on any combination of OS (e.g., Windows and Linux), ABI (e.g., SysV and MS64) and programming language (e.g., C, C++ and Python).
  • hypervisor: provides the base SDK including the loader, the Bareflank microkernel and support applications. If all you need is host-only hypervisor support, this is the project to start with.
  • MicroV: provides support for guest VMs, allowing the user to create an execute additional virtual machines. If you need guest VM support, this is the project to start with.

To support Bareflank's ecosystem, the hypervisor SDK is licensed under MIT, specifically enabling users of the project to both contribute back to the project, but also create proprietary, closed source products that use the Bareflank SDK as their foundation. Feel free to use Bareflank to create your commercial products. All we ask is that if you find a bug or add a feature to the SDK that you consider contributing your changes back to the project.

Quick start

GitHub release (latest by date)

Get the latest version of the Bareflank Hypervisor SDK from GitHub:

git clone https://github.com/bareflank/hypervisor
mkdir bsl/build && cd bsl/build
cmake -DCMAKE_CXX_COMPILER="clang++" ..
make

Enjoy:

make driver_quick
make start
make dump
make stop

Interested In Working For AIS?

Check out our Can You Hack It?® challenge and test your skills! Submit your score to show us what you’ve got. We have offices across the country and offer competitive pay and outstanding benefits. Join a team that is not only committed to the future of cyberspace, but to our employee’s success as well.

ais

Demo

Check out the latest demo for how to compile and use the Bareflank Hypervisor on Ubuntu 20.04:

Additional Videos

Check out our YouTube Channel for more great content as well as the following videos at CppCon below:

CppCon 2019 CppCon 2017 CppCon 2016

Build Requirements

Currently, the Bareflank hypervisor only supports the Clang/LLVM 10+ compiler. This, however, ensures that the hypervisor can be natively compiled on Windows including support for cross-compiling. Support for other C++20 compilers can be added if needed, just let us know if that is something you need.

Windows

To compile the BSL on Windows, you must first disable UEFI SecureBoot and enable test signing mode. Note that this might require you to reinstall Windows (you have been warned). This can be done from a command prompt with admin privileges:

bcdedit.exe /set testsigning ON
<reboot>

Next, install the following:

Visual Studio is needed as it contains Windows specific libraries that are needed during compilation. Instead of using the Clang/LLVM project that natively ships with Visual Studio, we use the standard Clang/LLVM binaries provided by the LLVM project which ensures we get all of the tools including LLD, Clang Tidy and Clang Format. Also note that you must put Ninja somewhere in your path (we usually drop into CMake's bin folder). Finally, make sure you follow all of the instructions when installing the WDK. These instructions change frequently, and each step must be installed correctly and in the order provided by the instructions. Skipping a step, or installing a package in the wrong order will result in a WDK installation that doesn't work.

To compile the BSL, we are going to use Bash. There are many ways to start Bash including opening a CMD prompt and typing "bash". Once running bash, make sure you add the following to your PATH:

  • MSBuild
  • devcon
  • certmgr

For example, in your .bashrc, you might add the following (depending on where Visual Studio put these files):

export PATH="/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin:/c/Program Files (x86)/Windows Kits/10/Tools/x64:/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64:$PATH"

Finally, run the following from Bash:

git clone https://github.com/bareflank/bsl
mkdir bsl/build && cd bsl/build
cmake -DCMAKE_CXX_COMPILER="clang++" -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
ninja info
ninja

Ubuntu Linux

To compile the BSL on Ubuntu (20.04 or higher) you must first install the following dependencies:

sudo apt-get install -y clang cmake lld

To compile the BSL, use the following:

git clone https://github.com/bareflank/bsl
mkdir bsl/build && cd bsl/build
cmake -DCMAKE_CXX_COMPILER="clang++" -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
make info
make

UEFI

To compile for UEFI, simply follow the steps for your OS above, but add the following to the cmake:

-DHYPERVISOR_BUILD_EFI=ON

You can then build the hypervisor as normal and the UEFI loader will be compiled for you automatically. Once the kernel, extensions and UEFI loader are compiled, you can copy them to your UEFI FS0 partition. Note that all binaries must be copied to your FS0 partition, and on some systems, this might be a USB stick. To aid in this copy process, the build system includes the following command:

make copy_to_efi_partition

By default this uses the EFI partition, but it can be relocated using:

-DHYPERVISOR_EFI_FS0=<path to FS0>

Some systems require you to provide the UEFI shell, and so Bareflank contains a copy of this shell which will be copied along with the kernel, extensions and UEFI loader. Once you have rebooted into the UEFI shell, you can start the hypervisor using

start_bareflank.efi

Note that by default, the hypervisor is not able to boot an OS. You must either use a non-default example that provides more complete UEFI support, or provide your own extension that is capable of successfully booting an OS. Finally, we currently do not provide any of the other vmmctl functions like stop or dump.

Usage Instructions

To use the hypervisor, run the following commands (on Windows, replace make with ninja):

make driver_quick
make start

to get debug information, use the following:

make dump

to reverse this:

make stop
make driver_unload

Resources

Join the chat

The Bareflank Support Library provides a ton of useful resources to learn how to use the library including:

If you have any questions, bugs, or feature requests, please feel free to ask on any of the following:

If you would like to help:

Testing

Build Status codecov

The Bareflank hypervisor leverages the following tools to ensure the highest possible code quality. Each pull request undergoes the following rigorous testing and review:

  • Static Analysis: Clang Tidy
  • Dynamic Analysis: Google's ASAN and UBSAN
  • Code Coverage: Code Coverage with CodeCov
  • Coding Standards: AUTOSAR C++14 and C++ Core Guidelines
  • Style: Clang Format
  • Documentation: Doxygen

Serial Instructions

On Windows, serial output might not work, and on some systems (e.g. Intel NUC), the default Windows serial device may prevent Bareflank from starting at all. If this is the case, disable the default serial device using the following:

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Serial" /f /v "start" /t REG_DWORD /d "4"

License

The Bareflank Hypervisor is licensed under the MIT License.

Related

If you’re interested in Bareflank, you might also be interested in the following projects:

MoRE:
https://github.com/ainfosec/MoRE

SimpleVisor:
https://github.com/ionescu007/SimpleVisor

HyperPlatform:
https://github.com/tandasat/HyperPlatform

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].