Giter VIP home page Giter VIP logo

mythril's Introduction

mythril

A rust-based hypervisor currently requiring multiboot2 boot (e.g. grub), and VT-x/EPT.

Building and Testing

mythril should be built and tested using the provided docker image adamschwalm/hypervisor-build:docker-4. For example, to build the multiboot application, run:

docker run -v $(pwd):/src adamschwalm/hypervisor-build:docker-4 make multiboot2

This will create the multiboot2 application in target/multiboot2_target/debug/mythril_multiboot2. Similarly, unittests can be executed like:

docker run -v $(pwd):/src adamschwalm/hypervisor-build:docker-4 make test

Running the Hypervisor

After building the multiboot2 application as described above, the image can be executed with:

make qemu

Note that this has only been tested on relatively recent versions of QEMU (v4.1.0+). Older versions may contain bugs that could cause issues running the image.

Debugging

To debug mythril, first build the multiboot application as described above. Then run make qemu-debug. This will start start QEMU but not launch mythril. You can then run gdb target/multiboot2_target/debug/mythril_multiboot2 to launch gdb with the debug info from the application. You can then attach to the qemu instance with target remote localhost:1234.

Because the virtualization is hardware accelerated, remember to use hbreak instead of break in gdb. For example, to put a breakpoint at the start of kmain and start mythril, run:

(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x000000000000fff0 in ?? ()
(gdb) hbreak kmain
Hardware assisted breakpoint 1 at 0x110d54: file mythril_multiboot2/src/main.rs, line 151.
(gdb) continue
Continuing.

Breakpoint 1, kmain (multiboot_info_addr=10993664) at mythril_multiboot2/src/main.rs:151
151	   unsafe { interrupt::idt::init() };

You can then use step and other debugging functions as usual.

mythril's People

Contributors

alschwalm avatar barkera avatar dlrobertson avatar

Watchers

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