Giter Site home page Giter Site logo

bdump's Introduction

bdump

A windbg-js plugin to dump the cpu state.

Usage

Only tested with Hyper-V. You'll probably want the VM to have 1 vCPU. Sometimes kd gets confused about which CPU scripts run on. Additionally, once you hit your bp you should verify that GSBASE and KERNEL_GSBASE are different:

kd> rdmsr c0000101
msr[c0000101] = 0x41414141
kd> rdmsr c0000102
msr[c0000102] = 0x42424242

If they are the same, youll need to hit the bp again. I have no idea why this happens.

kd> .scriptload c:\path\to\bdump.js
kd> !bdump "c:\\path\\to\\dump"

This will create two files:

  • dump\mem.dmp is a standard windows dumpfile. Note that this is not a minidump!
  • dump\regs.json is a JSON object containing all the register values encoded as hex strings. E.g
{"rax": "0x41414141", "rbx": "0x42424242", ... }

There is also a cpu-jtoy.py script which converts the registers from JSON to YAML. This file is vanilla YAML and is used to allow hex encoding of integers and avoid the 53-bit limitation in some JSON implementations. Hopefully with BigInt support in more JS engines soon I can drop this...

This script will also add in the AVX register state with all values zeroed.

Caveats

  • doesn't currently capture xmm/ymm/zmm register states
  • doesn't currently capture mxcsr_mask
  • capturing segments (especially tr and es) is kinda sketchy

bdump's People

Contributors

yrp604 avatar 0vercl0k avatar ch4rli3kop avatar richinseattle avatar wumb0 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.