Git Product home page Git Product logo

kernel-debug-lab-for-virtual-box's Introduction

How to set up a VirtualBox lab to debug Kernel Driver with Windbg

We consider here that on Computer A windbg is already installed and on Computer B Visual Studio, the SDK and WDK are installed.

lab

  1. Open the Host network Manager to create or set up a new Virtual Box Host-Only Ethernet adapter

  1. Create or choose a Virtual Box Host-Only Ethernet adapter and tick the Enable box for DHCP Server

  1. For Computer A and Computer B go to Settings -> Network and in Attached to select Host-Only Adapter and then select the adapter previously set up or created. For us it's VirtualBox Host-Only Ethernet Adapter. Don't forget to tick the boxes Enable Network Adapter and Cable Connected

  1. Retrieve on Computer A the IP with the ipconfig command

  1. Disable the firewall on both VMs

  1. On computer B from an administrator terminal:
  • Enable kernel debugging bcdedit /debug on
  • Setup the connection to Computer A for debug bcdedit /dbgsettings hostip:1.2.3.4 port:50005
  • Enable test signing bcdedit /set testsigning on

For the command bcdedit /dbgsettings, for hostip set the IP of your Computer A, for port choose the one you want between 50000 and 50039.

The bcdedit /dbgsettings will output a Key, KEEP IT it will be used on the windbg configuration on Computer A to establish the connection !

  1. On computer A, open Windbg, select Attach to Kernel and set the port you choose on Computer B and the key provided by the command bcdedit /dbgsettings.

  1. Now reboot Computer B. On Computer A you will see in the command prompt of windbg some data meaning that the connection is up.

  1. You can check by clicking on the button Break. If it works, Computer B should be freezed and you should see a nt!DbgBreakPointWithStatus message in the command windows of windbg

Have fun !

If you want good ressources to practice go check :

kernel-debug-lab-for-virtual-box's People

Contributors

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