windbg - Byakugan

2024-05-31 01:58
文章标签 windbg byakugan

本文主要是介绍windbg - Byakugan,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1. Install Byakugan

lab:bin/ $ pwd
/home/someone/metasploit-framework/external/source/byakugan/bin
lab:bin/ $ tree
.
├── Vista
│   ├── byakugan.dll
│   ├── detoured.dll
│   └── injectsu.dll
├── Win7
│   ├── byakugan.dll
│   ├── detoured.dll
│   └── injectsu.dll
├── WinXP
│   ├── byakugan.dll
│   ├── detoured.dll
│   └── injectsu.dll
└── XPSP2├── byakugan.dll├── detoured.dll└── injectsu.dll

Place byakugan.dll and injectsu.dll under the windbg application folder (not under winext !), and put detoured.dll under c:\windows\system32 What can you do with byakugan.dll ?

copy byakugan.dll C:\Program Files\Debugging Tools for Windows (x86)\
copy injectsu.dll C:\Program Files\Debugging Tools for Windows (x86)\
copy detoured.dll c:\windows\system32\

2. Usage

Everybody knows that ollydbg has numerous plugins (I’ll talk about these plugins later). Windbg also has a framework/API for building plugins/extension. MSEC was just one example… Metasploit has built & released their own windbg plugin about a year ago, called byakugan.
Pre-compiled binaries for WIndows XP SP2, SP3, Vista and Windows 7 can be found in the framework3 folder (get latest trunk via svn), under \external\source\byakugan\bin Place byakugan.dll and injectsu.dll under the windbg application folder (not under winext !), and put detoured.dll under c:\windows\system32 What can you do with byakugan.dll ?

2.1 load plugin

    !load byakugan

2.2 byakugan functions

  1. jutsu : set of tools to track buffers in memory, determining what is controlled at crash time, and discover valid return addresses

  2. pattern_offset

  3. mushishi : framework for anti-debugging detection and defeating anti-debugging techniques

  4. tenketsu : vista heap emulator/visualizer.

    !load byakugan!pattern_offset 2000

2.2.1 jutsu functions

The jutsu component offers the following functions :

  1. identBuf / listBuf / rmBuf : find buffers (plain ascii, metasploit patterns, or data from file) in memory…

  2. memDiff : compare data in memory with a pattern and mark the changes. This will help you determining whether e.g. shellcode has been changed/corrupted in memory, whether certain ‘bad characters’ need to be excluded from shellcode, etc

  3. hunt:

  4. findReturn : search for the addresses that point to a usable function to return to.

  5. searchOpcode : converts assembler instruction to opcode, AND it lists all executable opcode sequence addresses at the same time.

  6. searchVtptr

  7. trackVal

    !jutsu searchOpcode pop esi | pop ebx | ret!jutsu memDiff file 1520 C:\exploit.bin 0x0012e858!jutsu identBuf file ShellCode c:\exploit.bin!jutsu identBuf msfpattern MSFBuffer 1500!jutsu listBuf!jutsu hunt!jutsu findReturn

operation demo

0:000> !load byakugan
[Byakugan] Successfully loaded!
0:000> !jutsu identBuf msfpattern MSFBuffer 200
[J] Creating buffer MSFBuffer.
0:000> !jutsu listBuf
[J] Currently tracked buffer patterns:Buf: MSFBuffer  Pattern: Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7......2Ag3Ag4Ag5Ag0:000> !jutsu hunt
[J] Found buffer MSFBuffer @ 0x0012e858

2.2.2 tenketsu functions
    !tenketsu!tenketsu listHeaps!tenketsu listChunks
0:000> !tenketsu
Byakugan - Increase your Sight
Pusscat / Lin0xx

Tenketsu Commands:
1. model - Load tenketsu heap visualization libraries and begin modeling
2. log - Load tenketsu heap visualization libraries and begin logging
3. listHeaps - List all currently tracked heaps and their information
4. listChunks - List all chunks associated with a givend heap
5. validate - check the chunk chain and find corrupted chunk headers


References

  1. https://github.com/Rendered79/metasploit/tree/master/external/source/byakugan
  2. https://www.corelan.be/index.php/2009/09/05/exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-basic-exploit-development/
  3. http://www.codeproject.com/Articles/6084/Windows-Debuggers-Part-A-WinDbg-Tutorial
  4. http://blog.opensecurityresearch.com/2013/12/getting-started-with-windbg-part-1.html
    http://blog.opensecurityresearch.com/2013/12/getting-started-with-windbg-part-2.html
    http://blog.opensecurityresearch.com/2013/12/getting-started-with-windbg-part-3.html

这篇关于windbg - Byakugan的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1017227

相关文章

第三十二篇:Windbg中USB2.0调试环境的搭建

2011年的时候,为了开发USB Mass storage -- UASP (USB attached SCSI Protocol)的设备驱动程序,从米国买了两个USB2.0的调试小设备(如下图,每个似乎80美刀,贼贵的东西)。 主要是用来替代串口115200波特率的响应速度慢,以便解决调试效率的问题。 当时,根据WINDBG的HELP文档,而且也GOOGLE了一些网上的相关参考内容,硬

第三十一篇:!pci of WinDbg

刚刚在看WinDbg在硬件调试方面有哪些扩展命令的时候,让我回想起一个工作中的实际事务。 在xHCI USB3.0/3.1 IP项目开发过程中,需要得到类似实际产品的PCIe配置空间信息,以作对比参考。 当时的做法是,将类似产品的xHCI host controller通过PCIe口接到SoC系统中, 通过编写ARM SoC的Bare metal代码来读取每一个产口的PCIe配置空间。

第三十篇:Windbg的基础知识

Windbg是一个非常强大的工具. 刚刚开始,是为了替代SoftICE调试自己开发的AVStream/BDA驱动程序,以及分析由此驱动软件产生的Kernel Dump. 之后,参与xHCI USB3.0/3.1 IP的开发,Windbg主要用来分析该硬件产生的Kernel Dump. 第二篇:欲善其事,先利其器-USB3.0 Kernel debug extension 第五

VirtualKD 双机调试 Win10 无法弹出 Windbg 解决方法

虚拟机里 msconfig -> 引导 -> VirtualKD启动项 -> 高级选项 -> 调试端口,将 1394 改成 com1 感谢群友 @Neil_360 提供的解决方法   Windbg 无法接收打印的信息 进入注册表 在 计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\ 路径下

windbg配置符号

转载:https://blog.csdn.net/nui111/article/details/51893019 安装与配置windbg的symbol(符号) 第一步 是从 http://www.microsoft.com/ddk/debugging 下载最新版本的 WinDBG, 因为符号服务器二进制文件是由 WinDBG 小组开发的。您将需要检查是否有 WinDBG 更新版本,因为该小

通过windbg查看dump文件中某个方法内的某个对象的变量的值

使用 WinDbg 和 SOS 扩展来查看 C# 应用程序生成的 dump 文件中某个方法中的某个对象的变量的值。以下是大致的步骤: 打开 WinDbg,并用它打开你的 dump 文件。你可以使用 File → Open Crash Dump 来实现。 在命令行中,加载 SOS 扩展。一般来说这可以通过 .loadby sos clr 来完成。如果这个不工作的话,你可能需要全路径来加载 SO

windbg - Getting Started with WinDBG - Part3

In this series of blog posts we’ve walked you through getting WinDBG installed, setup, and got you started by attaching to a process and setting breakpoints. Our next step is the actual debugging part

windbg - Getting Started with WinDBG - Part 2

This is a multipart series walking you through using WinDBG - we’ve gotten you off the ground with our last blog post, and now we’ll focus on it’s core functionality so that you can start debugging pr

windbg 调试

cdb.exe -srcpath  [source file path] -y [.pdb file path] -z [dump file] -lines -lines 用于加载对应的源文件位置

CLR探索应用程序域世界(上):Windbg SOS剖析揭示域世界

来源:lbq1221119  http://www.cnblogs.com/lbq1221119/archive/2007/12/12/992167.html 在CLR的世界中,有一系列的令人Amazing的技术和架构。其中,CLR对应用程序在内存中内存分配,执行模型,程序之间的交互等一系列的技术,值得每一个致力于DotNet平台的技术人员深究。编程人员在开发的过程中,如果把程序集的加载(As