Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Useful scripts for WinDbg using the debugger data model

Notifications You must be signed in to change notification settings

Reghpc/WinDbg_Scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinDbg_Scripts

Useful scripts for WinDbg using the debugger data model

Usage, examples, explanations and general rants (also available in PDF form here):

https://medium.com/@yardenshafir2/windbg-the-fun-way-part-1-2e4978791f9b
https://medium.com/@yardenshafir2/windbg-the-fun-way-part-2-7a904cba5435

Useful Commands and Syntax

  • __iserror(x)
    Returns true if a statement throws an error.
dx @$curprocess.Io.Handles.Where(h => !__iserror(h.Type == "File") && h.Type == "File")
  • SelectMany
    Flattens a nested collection, for example runs a query on all threads in all processes and flattens the results
dx @$cursession.Processes.SelectMany(p => p.Threads.Select(t => t.KernelObject.ThreadName))
  • Conditional Operations
dx @$curthread.KernelObject.ActiveImpersonationInfo != 0 ? @$curthread.KernelObject.ClientSecurity.ImpersonationLevel : "Not Impersonating"
  • Executing a Legacy Command
dx @$printSecurityDescriptor = (sd => Debugger.Utility.Control.ExecuteCommand("!sd " + ((__int64)sd).ToDisplayString("x") + " 1"))
  • Cast Pointer to Function Address
dx @$curprocess.Threads.Select(t => (void(*)())t.KernelObject.StartAddress)

About

Useful scripts for WinDbg using the debugger data model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%