Are there good tutorials for showing how to use WinDbg?
相关问题
- Analyzing Outlook HANG dump (with GoogleCalendarSy
- How to debug static dependency loading problems?
- windbg dump command fails with error 0x8007012b
- Determining which method is holding a ReaderWriter
- Crash dump with unknown origin
相关文章
- Is my heap fragmented
- Specifying a command line for Windbg's Open Ex
- CDB command for setting a breakpoint based on a li
- Finding which function allocated a heap based on a
- Is 0x0000ffff the default load count of a dll in w
- sos.dll usage in visual studio 2013
- Debug a .NET dump using windbg
- Are there any WinDBG replacements with a better GU
Basic Tutorials & Usage Demos
Different Ways to "Start"/Attach WinDbg
Workspaces (Understanding how they work)
Cmdtree
Allows you to define a "menu" of debugger commands for easy access to frequently used commands without having to remember the terse command names. Don't have to put all the command definitions into the same cmdtree text file....you can keep them separate and load multiple ones (they then get their own window).
Startup Script
You can use the -c option on the command line to automatically run a WinDbg script when you start WinDbg.
Gives opportunity to turn on DML (Debugger Markup Language) mode, load particular extensions, set .NET exception breakpoints, set kernel flags (e.g. when kernel debugging you might need to change the DbgPrint mask so you see tracing information....ed nt!Kd_DEFAULT_Mask 0xFFFFFFFF), load cmdtrees, etc.
An example script:
Command Cheat Sheets
Extensions (extend the range of commands/features supported)
- allows transfer of symbol names between IDA and WinDbg
- assembly syntax highlighting and a driver mapping tool)
- detect antidebugging methods, vista heap visualization/emulation, track buffers in memory
- records every command you executed in your debug session so you can re-execute easily
- check heap structures for corruption, detect objects shared by threads, etc.
- (!stlpvector, !idt, !unhex, !grep, etc.)
- dumps PE file from memory
- debug UEFI firmware
- GDI/USER handle tracker to aid in leak detection
- set of commands to aid in advanced analysis/find exploits
- provides automated crash analysis and security risk assessment
- lists info about loaded modules such as if using SafeSEH, ASLR, DEP, /GS (Buffer Security Checks)
- (!wservice - list WCF service objects, !wconfig - show .config lines, !whttp - list HttpContexts, !wselect/!wfrom - support SQL like queries on arrays)
- open debugger extensions
- pass debuggee to another debugger without restarting
- a superset of SOS for assisting in debugging .NET 2.0 managed code
- a superset of SOS for assisting in debugging .NET 4 managed code
- allows Python scripting to be used
- allows Python to be used to script WinDbg
-(!valloc, !vallocrwx, !heapalloc, !heapfree, !remotecall, !remotecall64, !loaddll, !unloaddll, !close, !killthread, !adjpriv, !ret)
-legacy extension...now built into WinDbg in ext.dll
- more commands for helping to debug managed NET 2.0 or 4.0 code
- (!DumpHttpContext, !DumpASPNetRequests, !DumpSqlConnectionPools, !DumpThreadPool, etc.)
- source to a debugger extension (need an OSR Online account to access it)
- code coverage graph
- display wait chains of application threads (helps find deadlocks)
- integrates the Wireshark protocol analyser to enable VM traffic manipulation and analysis
- Tracer, WCT, heap_stat, bkb, traverse_map, traverse_vector)
- assembly language syntax highlighting
Write your own extension
Debugging Managed Code
Scripting (C#, PS, Python, and WinDbg)
- a collection of WinDbg scripts
- a collection of WinDbg scripts
- allows managed code to script the Managed Debugger (MDBG) and the DbgEng
- allows control of WinDbg via C# scripts
- allows control of WinDbg via PowerShell scripts
- allows control of WinDbg via Python scripts
- Python wrapper library around the pykd extension for WinDbg, mimicking immlib (so you can use scripts originally written for Immunity Debugger)
Debuggers/Tools that use the dbgeng.dll API/WinDbg Tools
- Python wrapper for Windows Debugging Engine
Different Ways to Generate Crash Dump Files for Post-Mortem Analysis
- includes how to generate dump from Hyper-V, VMware ESX, and XenServer VMs.
- (via Win32 API call inside your application). (Example for C# applications)
(hardware based feature to generate an NMI...usually found on high-end servers e.g. HP or you can obtain an add-in PCI card "Universal PCI Dump Switch"). Microsoft NMI technology background.
(registry info),
(how to configure a Complete (Full) Memory Dump),
(how to enable Complete Memory Dump),
(how to enable Complete Memory Dump on Windows 7 when PC has lots of memory...normally not available when more than 2 GB of memory)
Dump Analysis Tools
Dump related Tools
Kernel Debugging Virtual Machines
Videos
(plus various other ones at Pluralsight)
Blogs
Advanced Articles & Tutorial Resources
Alternative Debuggers
Other Links
- debugger and system level tools
- plugins & other debugging tools
- detailed information that you would need if you wanted to write your own debugger e.g. PDB file format, .DMP file formats, PE File structure, how to record stack traces, etc., etc.
- unpackers, IDA, OllyDBG, Immunity Debugger plugins, etc.