Debugging one layer deeper
summary
An instrumentation agent causes an access violation that traces all the way into the CLR: dumps from an instrumented server that crashes about once a day reveal a read at address -1+0x2c, and WinDbg with SOS shows the fault in objectnativeislockheld. The investigation uses WinDbg, reverse-engineered CLR assembly and syncblk inspection to find an -1 in m_HoldingThread inside a promoted sync block (one orphaned entry), a small repro is built that reliably reproduces the crash.
AI-written summary · about
chapters (22)
- 0:00Intro
- 1:47Debugging methodology
- 3:39What is Data Tracer
- 4:58The problem
- 5:55Finding the issue
- 9:38Analyzing the code
- 10:18Digging into the source code
- 10:51CLR source code
- 12:04Lockheed source code
- 14:40Calling convention
- 16:11Theories
- 18:37Example
- 19:33SynLock
- 21:25Programmatic
- 22:39Verifying theories
- 26:30Orchard source code
- 27:58Mapping instructions
- 33:20Verification
- 42:18Inspecting the value
- 45:55Debugging the access violation
- 48:59Wrapping things up
- 51:35Conclusion
related talks
58mDebugging one layer deeper
32mIntroduction to Windows Kernel Mode Debugging
56mD1T2 - Attacking Microsoft’s .NET Framework Through CLR
48mDPTrace: Dual Purpose Trace for Exploitability Analysis of Program Crashes
21mBattle of Windows Service: A Silver Bullet to Discover File Privilege Escalation Bugs Automatically
25mData-Only Pwning Microsoft Windows Kernel
40mCommSec D1 - The Life & Death of Kernel Object Abuse
51mAutomation Techniques in C++ Reverse Engineering
