All Projects → 0xqoob → sonar

0xqoob / sonar

Licence: MIT license
A Type-1 hypervisor aimed to implement kernel hotswapping

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to sonar

Mythril
A hypervisor written in rust
Stars: ✭ 43 (+86.96%)
Mutual labels:  hypervisor
Hyperstart
The tiny Init service for HyperContainer
Stars: ✭ 135 (+486.96%)
Mutual labels:  hypervisor
Shadow Box For X86
Shadow-Box: Lightweight and Practical Kernel Protector for x86 (Presented at BlackHat Asia 2017/2018, beVX 2018 and HITBSecConf 2017)
Stars: ✭ 178 (+673.91%)
Mutual labels:  hypervisor
Zpp hypervisor
A very simple hypervisor for learning experience.
Stars: ✭ 78 (+239.13%)
Mutual labels:  hypervisor
Diosix
A lightweight, secure, multiprocessor bare-metal hypervisor written in Rust for RISC-V
Stars: ✭ 116 (+404.35%)
Mutual labels:  hypervisor
Kvm Vmi
KVM-based Virtual Machine Introspection
Stars: ✭ 153 (+565.22%)
Mutual labels:  hypervisor
Freertos Cell
FreeRTOS for Jailhouse Cells
Stars: ✭ 31 (+34.78%)
Mutual labels:  hypervisor
Invtero.net
inVtero.net: A high speed (Gbps) Forensics, Memory integrity & assurance. Includes offensive & defensive memory capabilities. Find/Extract processes, hypervisors (including nested) in memory dumps using microarchitechture independent Virtual Machiene Introspection techniques
Stars: ✭ 237 (+930.43%)
Mutual labels:  hypervisor
Napoca
Lightweight type-1 hypervisor offering a foundation for building advanced security-focused functionality.
Stars: ✭ 135 (+486.96%)
Mutual labels:  hypervisor
Hyperd
HyperContainer Daemon
Stars: ✭ 1,980 (+8508.7%)
Mutual labels:  hypervisor
Hyperwin
A native hypervisor designed for the Windows operating system
Stars: ✭ 80 (+247.83%)
Mutual labels:  hypervisor
Jailhouse
Linux-based partitioning hypervisor
Stars: ✭ 1,324 (+5656.52%)
Mutual labels:  hypervisor
Simplesvmhook
SimpleSvmHook is a research purpose hypervisor for Windows on AMD processors.
Stars: ✭ 159 (+591.3%)
Mutual labels:  hypervisor
Unidbg
Allows you to emulate an Android ARM32 and/or ARM64 native library, and an experimental iOS emulation
Stars: ✭ 1,168 (+4978.26%)
Mutual labels:  hypervisor
Vsock
Package vsock provides access to Linux VM sockets (AF_VSOCK) for communication between a hypervisor and its virtual machines. MIT Licensed.
Stars: ✭ 181 (+686.96%)
Mutual labels:  hypervisor
Svm kernel
x86_64 AMD kernel optimized for performance & hypervisor usage
Stars: ✭ 32 (+39.13%)
Mutual labels:  hypervisor
Simplesvm
A minimalistic educational hypervisor for Windows on AMD processors.
Stars: ✭ 152 (+560.87%)
Mutual labels:  hypervisor
rust os
My hobby operating system microkernel written in Rust
Stars: ✭ 33 (+43.48%)
Mutual labels:  osdev
Noirvisor
Hardware-Accelerated Hypervisor solution for complex functions and purposes.
Stars: ✭ 186 (+708.7%)
Mutual labels:  hypervisor
Hdk
(unofficial) Hyper-V® Development Kit
Stars: ✭ 166 (+621.74%)
Mutual labels:  hypervisor

sonar

Sonar is a 64 bit Type-1 hypervisor aimed to implement kernel hotswapping. It should allow kernels to be easily tested by swapping them out and passing the saved state of the previous kernel to the current one.

Project Map

Source Directory Structure

src
├── boot        : code that loads the kernel 
├── drivers     : kernel drivers
├── fs          : filesystems
├── lib         : kernel library routines
├── mm          : kernel memory management
├── net         : networking
├── ospm        : OS power management
├── protos      : boot protocols
├── sec         : OS security
├── sys         : architecture specific code
├── thirdparty  : libraries that need to be compiled with the kernel
└── virt        : virtualization code

Build Directory Structure

The tree below outlines an example structure of the build directory, which contains the binaries for sonar and its dependencies.

build
├── deps
│   ├── bddisasm
│   └── limine
└── kernels
    ├── sonar
    │   └── objects
    └── test
        └── objects

Scripts

src
├── gensyms.sh  : generates the kernel's symbol table for debugging

Building

Building sonar is fairly simple. It only depends on a couple tools, most of which are provided by default in a Linux environment. They are as follows:

  • git
  • make
  • mkfs
  • clang
  • nasm

Building and Running

There are two possible methods for building:

  1. Creating a full hard disk image
  2. Creating the standalone Sonar kernel

1. Creating the Full Image

This approach lets one create a full hard drive image, complete with sonar, the limine bootloader, and a test kernel. One can simply copy this image to a drive (flash drive, hard drive, etc) and then boot off this medium.

Once the image (sonar.img) has been created, one can mount it then add/remove files and tweak the limine configuration to suit specific needs. The sonar.img file is generated like so:

make

The make command will automatically clone the dependencies and launch qemu.

2. Building the Standalone Kernel

Before building the standalone kernel, be sure to clone and compile the dependencies first with

make deps

If the standalone sonar kernel image needs to be built for whatever reason (for use with a different bootloader, a different sized image, etc), it can be generated with the following command:

make sonar-kernel

The above command will compile a file called ksonar.elf in the sonar build directory, which can then be distributed.

In addition, one can easily rebuild the test kernel only by executing the test-kernel rule. This will compile a file called ktest.elf in the test kernel build directory, which can then be copied into a hard disk image and loaded by sonar.

make test-kernel

Cleaning Up

If, for whatever reason, the codebase needs to be rebuilt, it's often a better idea to only rebuilt the parts that need to be. Because of this, rules are provided to clean subprojects and dispose of remaining object files. They are as follows:

make clean-all

make clean-kernels
make clean-deps

make clean-sonar
make clean-test

make clean-limine
make clean-bddisasm
make clean-lai

Dependencies

License

Copyright (c) 2021 Shreyas Lad

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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