Git Product home page Git Product logo

oxgenpdb's Introduction

Introduction

  • oxygenPdb lib是一个纯内核没有R3程序的windows内核Pdb解析库,它可以完成从服务器自动下载当前操作系统版本的PDB文件并进行解析

  • oxygenPdb lib is a Windows kernel Pdb parsing library that running purely in kernel mode without any R3 programs. It can automatically download the PDB file of the current operating system version from the server and parse it.

  • 它使用非常简单,仅需要引入一个lib文件和头文件即可,vs的解决方案中的drvTest这个项目演示了如何使用。

  • It's very easy to use; you just need to include one lib file and a header file. The 'drvTest' project in the Visual Studio solution demonstrates how to use it

How to use

  • 首先直接编译lib库(或者直接找到演示项目drv test的include目录),得到oxygen,然后找到和.sln同目录的oxygenPdb.h这个头文件;
  • First, compile the lib library (or directly locate the demo project drv test's include directory) to obtain oxygen. Then find the oxygenPdb.h header file in the same directory as the .sln.

image-20230807190214163

  • 然后在你的项目中引入oxygenPdb.libNetIo.lib,引入oxygenPdb.h头文件
  • Then, in your project, include both oxygenPdb.lib and NetIo.lib, and also include the oxygenPdb.h header file

image-20230807190501205

Demonstration

  • 在引入头文件和库之后,使用如下代码
  • After including the header file and library, use the following code:
#include "oxygenPdb.h"

#define printk(...)do{DbgPrintEx(77,0,__VA_ARGS__);}while(0)
EXTERN_C auto DriverEntry(PDRIVER_OBJECT drv, PUNICODE_STRING) {

  drv->DriverUnload = [](PDRIVER_OBJECT)->void {

  };

  oxygenPdb::Pdber ntos(L"ntoskrnl.exe");
  ntos.init();

  auto p = ntos.GetPointer("ZwCreateThread");
  auto p2 = ntos.GetPointer("PsActiveProcessHead");
  auto o = ntos.GetOffset("_KTHREAD", "PreviousMode");

  printk("p->%p p2->%p o->%x\r\n", p, p2, o);
  return STATUS_SUCCESS;
}

win buildnumber 1903

image-20230807191504875

win buildnumber 19044

image-20230807191730749

win 11 22h2

image-20230807192044716

Thanks

I must extend my gratitude to the eminent air14 for his project https://github.com/Air14/SymbolicAccess. My Pdb parsing is largely based on his work.In fact, he has already perfectly accomplished the same functionality as my project. However, using SymbolicAccess is somewhat cumbersome。

I also want to thank the official LLVM website for providing some documentation about the pdb structure.

I am grateful to wbenny for his project https://github.com/wbenny/KSOCKET/issues, which enabled me to use kernel sockets for HTTP GET requests to download PDB files.

oxgenpdb's People

Contributors

oxygen1a1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oxgenpdb's Issues

Improvement of Windows Version Update File Check

  1. windows10 19044 C:\Windows\Temp\ntkrnlmp.pdb download
  2. ntkrnlmp.pdb file check symbol load
  3. but windows10 19045 update
  4. 19045 old ntkrnlmp.pdb file load -> offset diff -> bsod

p->FFFFF8032B1F9620 p2->FFFFF8032BA1E060 o->232 ->19044
p->FFFFF8032B1F6F40 p2->FFFFF8032BA1E070 o->232 ->19045

Windows updates, it is essential to check for discrepancies between the pdb files and the current Windows version in the folder. Failure to do so may result in a blue screen error

遇到2个问题,想请教下

1.自测过程中:虚拟机可以成功解析符号地址、偏移,但是真机获取到的均为0,不知是否与系统版本相关(虚拟机:1909 18363.418;真机:21H2 19044.2728)?
2.自测过程中:尝试解析win32kfull.sys,但在init阶段必蓝屏;

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.