No description
Find a file
2021-02-05 07:19:12 -07:00
.github add missing logo 2021-02-05 07:19:12 -07:00
cmake fixes for CI and move IOCTL/IFMAP to hypervisor 2021-02-05 07:02:50 -07:00
docs Bareflank 3.0 Initial Upload 2021-01-29 08:01:19 -07:00
example Bareflank 3.0 Initial Upload 2021-01-29 08:01:19 -07:00
kernel fixes for CI and move IOCTL/IFMAP to hypervisor 2021-02-05 07:02:50 -07:00
loader fixes for CI and move IOCTL/IFMAP to hypervisor 2021-02-05 07:02:50 -07:00
runtime fixes for CI and move IOCTL/IFMAP to hypervisor 2021-02-05 07:02:50 -07:00
syscall Bareflank 3.0 Initial Upload 2021-01-29 08:01:19 -07:00
utils fixes for CI and move IOCTL/IFMAP to hypervisor 2021-02-05 07:02:50 -07:00
vmmctl fixes for CI and move IOCTL/IFMAP to hypervisor 2021-02-05 07:02:50 -07:00
.clang-format add missing config files 2021-01-29 08:11:15 -07:00
.clang-tidy add missing config files 2021-01-29 08:11:15 -07:00
.codecov.yml add missing config files 2021-01-29 08:11:15 -07:00
.doxygen add missing config files 2021-01-29 08:11:15 -07:00
.gitignore fixes for CI and move IOCTL/IFMAP to hypervisor 2021-02-05 07:02:50 -07:00
CMakeLists.txt Bareflank 3.0 Initial Upload 2021-01-29 08:01:19 -07:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#469) 2017-08-13 07:52:26 -06:00
CONTRIBUTING.md The Great Merge of 2018 (#604) 2018-03-02 06:16:06 -07:00
LICENSE.md Bareflank 3.0 Initial Upload 2021-01-29 08:01:19 -07:00
PreLoad.cmake Bareflank 3.0 Initial Upload 2021-01-29 08:01:19 -07:00
README.md add missing logo 2021-02-05 07:19:12 -07:00
SUPPORT.md Bareflank 3.0 Initial Upload 2021-01-29 08:01:19 -07:00

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 youve 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 employees success as well.

cross-platform

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 11+ compiler. This, however, ensures 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

TBD

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

Usage Instructions

To use the hypervisor, run the following commands:

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:

And as always, we are always looking for more 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"

Cygwin SSH Instructions

You might find it useful to setup SSH if you are using Cygwin. The instructions for setting up SSH on Cygwin are as follows:

setup-x86_64.exe -q -P getent,cygrunsrv,openssl,openssh

ssh-host-config -y
<password>
<password>

net start sshd
netsh advfirewall firewall add rule name='SSH Port' dir=in action=allow protocol=TCP localport=22

License

The Bareflank Hypervisor is licensed under the MIT License.

If youre interested in Bareflank, you might also be interested in the following hypervisor projects:

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

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

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