SlideShare a Scribd company logo
Frame 0x06
Presenter: Dmitry Vostokov
Sponsors
Debugging.TV
• Value passing and register reuse
• Breakpoint execution commands
• WinDbg pseudo-registers and scripting
• Passing data between breakpoints
• Platform independent commands
• Logging window messages
• Module load events
Topics
© 2012 DumpAnalysis.org + TraceAnalysis.org
BOOL WINAPI GetMessage
(
__out LPMSG lpMsg, // RCX
__in_opt HWND hWnd, // RDX
__in UINT wMsgFilterMin, // R8d
__in UINT wMsgFilterMax // R9d
);
GetMessage
© 2012 DumpAnalysis.org + TraceAnalysis.org
typedef struct tagMSG {
HWND hwnd; // 64
UINT message; // 64
WPARAM wParam; // 64
LPARAM lParam; // 64
DWORD time; // 32
POINT pt; // 32, 32
} MSG, *PMSG, *LPMSG;
MSG
© 2012 DumpAnalysis.org + TraceAnalysis.org
0:000> ub 00000000`ff2d1064
notepad!WinMain+0xf5:
[...]
00000000`ff2d1051 488d4c2440 lea rcx,[rsp+40h]
00000000`ff2d1056 4533c9 xor r9d,r9d
00000000`ff2d1059 4533c0 xor r8d,r8d
00000000`ff2d105c 33d2 xor edx,edx
00000000`ff2d105e ff1524b40000 call qword ptr [notepad!_imp_GetMessageW (...)] * bp 0
0:000> u 00000000`ff2d1064
notepad!WinMain+0x182:
00000000`ff2d1064 413bc4 cmp eax,r12d * bp 1
00000000`ff2d1067 0f84b2060000 je notepad!WinMain+0x18b (00000000`ff2d171f)
[...]
0:000> bl
0 e 00000000`ff2d105e 0001 (0001) 0:**** notepad!WinMain+0x17c "r $t0 = rcx; g"
1 e 00000000`ff2d1064 0001 (0001) 0:**** notepad!WinMain+0x182 ".printf "hwnd: %p message: %p
wParam: %p lParam: %p", poi(@$t0), poi(@$t0+@$ptrsize), poi(@$t0+2*@$ptrsize),
poi(@$t0+3*@$ptrsize); .echo; g"
Event State Management
© 2012 DumpAnalysis.org + TraceAnalysis.org
.logopen
kv
u
ub
bp
bl
g
r
dp
Commands and pseudo-registers
© 2012 DumpAnalysis.org + TraceAnalysis.org
.printf
.echo
poi
$t0
$ptrsize
bc
dd
.logclose
!Ad Hardcore Technical Support Training
© 2012 DumpAnalysis.org + TraceAnalysis.org
Advanced Windows Memory Dump Analysis
Accelerated Windows Memory Dump AnalysisJanuary 18-23, 2012:
January 13, 2012:
Training Schedule
Accelerated .NET Memory Dump AnalysisJanuary 26-27, 2012:
Debugging.TV

More Related Content

PDF
Machinekit - The Python Machinetalk Bindings
PPTX
Introduction to Sublime text 2
PDF
MazuV-Debug-System
ZIP
Workshop@naha_val3
PDF
Introduction to Redis
PDF
PDF
Cilium - BPF & XDP for containers
PDF
LCA13: Common Clk Framework DVFS Roadmap
Machinekit - The Python Machinetalk Bindings
Introduction to Sublime text 2
MazuV-Debug-System
Workshop@naha_val3
Introduction to Redis
Cilium - BPF & XDP for containers
LCA13: Common Clk Framework DVFS Roadmap

What's hot (8)

PDF
PWM based motor speed control using LPC 1768
PDF
CAN interfacing on LPC1768 (ARM Cortex M3 based Micro controller)
PPTX
Qemu net netdev - nic
PDF
MOVED: The challenge of SVE in QEMU - SFO17-103
DOCX
Decoding LoRaWAN Packet
PDF
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3
 
PPTX
Crypto talk OpenValue meetup 20-3-18
PDF
Proof of x
PWM based motor speed control using LPC 1768
CAN interfacing on LPC1768 (ARM Cortex M3 based Micro controller)
Qemu net netdev - nic
MOVED: The challenge of SVE in QEMU - SFO17-103
Decoding LoRaWAN Packet
DevDay: CordaCoin A Permissionless Cryptocurrency on Corda, R3
 
Crypto talk OpenValue meetup 20-3-18
Proof of x
Ad

Similar to Debugging TV Frame 0x06 (20)

PDF
Debugging TV Frame 0x05
PDF
Debugging TV Frame 0x18
PPTX
Driver Debugging Basics
PPTX
Windows Debugging with WinDbg
PDF
Accelerated .NET Memory Dump Analysis training public slides
PDF
Debugging TV Frame 0x16
PDF
Debugging TV Frame 0x15
PPT
.NET Debugging Tips and Techniques
PPT
.Net Debugging Techniques
PPTX
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniques
PDF
Debugging TV Frame 0x02
PDF
Debugging TV Frame 0x12
PDF
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...
PPTX
Sql Bits Sql Server Crash Dump Analysis
PPTX
Advanced malware analysis training session4 anti-analysis techniques
PPTX
Windows kernel debugging workshop in florida
PDF
Accelerated Windows Debugging 3 training public slides
PDF
Crash dump analysis - experience sharing
PPT
Windows debugging sisimon
Debugging TV Frame 0x05
Debugging TV Frame 0x18
Driver Debugging Basics
Windows Debugging with WinDbg
Accelerated .NET Memory Dump Analysis training public slides
Debugging TV Frame 0x16
Debugging TV Frame 0x15
.NET Debugging Tips and Techniques
.Net Debugging Techniques
Advanced Malware Analysis Training Session 4 - Anti-Analysis Techniques
Debugging TV Frame 0x02
Debugging TV Frame 0x12
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...
Sql Bits Sql Server Crash Dump Analysis
Advanced malware analysis training session4 anti-analysis techniques
Windows kernel debugging workshop in florida
Accelerated Windows Debugging 3 training public slides
Crash dump analysis - experience sharing
Windows debugging sisimon
Ad

More from Dmitry Vostokov (20)

PDF
Debugging TV Frame 0x1C
PDF
Debugging TV Frame 0x1A
PDF
Debugging TV Frame 0x34
PDF
Debugging TV Frame 0x33
PDF
Debugging TV Frame 0x31
PDF
Debugging TV Frame 0x25
PDF
Debugging TV Frame 0x24
PDF
Debugging TV Frame 0x21
PDF
Debugging TV Frame 0x20
PDF
Debugging TV Frame 0x19
PDF
Debugging TV Frame 0x17
PDF
Debugging TV Frame 0x14
PDF
Debugging TV Frame 0x13
PDF
Debugging TV Frame 0x11
PDF
Debugging TV Frame 0x10
PDF
Debugging TV Frame 0x0F
PDF
Debugging TV Frame 0x0D
PDF
Debugging TV Frame 0x0C
PDF
Debugging TV Frame 0x0B
PDF
Debugging TV Frame 0x0A
Debugging TV Frame 0x1C
Debugging TV Frame 0x1A
Debugging TV Frame 0x34
Debugging TV Frame 0x33
Debugging TV Frame 0x31
Debugging TV Frame 0x25
Debugging TV Frame 0x24
Debugging TV Frame 0x21
Debugging TV Frame 0x20
Debugging TV Frame 0x19
Debugging TV Frame 0x17
Debugging TV Frame 0x14
Debugging TV Frame 0x13
Debugging TV Frame 0x11
Debugging TV Frame 0x10
Debugging TV Frame 0x0F
Debugging TV Frame 0x0D
Debugging TV Frame 0x0C
Debugging TV Frame 0x0B
Debugging TV Frame 0x0A

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
medical staffing services at VALiNTRY
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
history of c programming in notes for students .pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
System and Network Administraation Chapter 3
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administration Chapter 2
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Introduction to Artificial Intelligence
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
CHAPTER 2 - PM Management and IT Context
Why Generative AI is the Future of Content, Code & Creativity?
medical staffing services at VALiNTRY
Odoo POS Development Services by CandidRoot Solutions
history of c programming in notes for students .pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
How to Choose the Right IT Partner for Your Business in Malaysia
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Design an Analysis of Algorithms I-SECS-1021-03
Digital Systems & Binary Numbers (comprehensive )
System and Network Administraation Chapter 3
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administration Chapter 2
Computer Software and OS of computer science of grade 11.pptx
Introduction to Artificial Intelligence
PTS Company Brochure 2025 (1).pdf.......
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx

Debugging TV Frame 0x06

  • 1. Frame 0x06 Presenter: Dmitry Vostokov Sponsors Debugging.TV
  • 2. • Value passing and register reuse • Breakpoint execution commands • WinDbg pseudo-registers and scripting • Passing data between breakpoints • Platform independent commands • Logging window messages • Module load events Topics © 2012 DumpAnalysis.org + TraceAnalysis.org
  • 3. BOOL WINAPI GetMessage ( __out LPMSG lpMsg, // RCX __in_opt HWND hWnd, // RDX __in UINT wMsgFilterMin, // R8d __in UINT wMsgFilterMax // R9d ); GetMessage © 2012 DumpAnalysis.org + TraceAnalysis.org
  • 4. typedef struct tagMSG { HWND hwnd; // 64 UINT message; // 64 WPARAM wParam; // 64 LPARAM lParam; // 64 DWORD time; // 32 POINT pt; // 32, 32 } MSG, *PMSG, *LPMSG; MSG © 2012 DumpAnalysis.org + TraceAnalysis.org
  • 5. 0:000> ub 00000000`ff2d1064 notepad!WinMain+0xf5: [...] 00000000`ff2d1051 488d4c2440 lea rcx,[rsp+40h] 00000000`ff2d1056 4533c9 xor r9d,r9d 00000000`ff2d1059 4533c0 xor r8d,r8d 00000000`ff2d105c 33d2 xor edx,edx 00000000`ff2d105e ff1524b40000 call qword ptr [notepad!_imp_GetMessageW (...)] * bp 0 0:000> u 00000000`ff2d1064 notepad!WinMain+0x182: 00000000`ff2d1064 413bc4 cmp eax,r12d * bp 1 00000000`ff2d1067 0f84b2060000 je notepad!WinMain+0x18b (00000000`ff2d171f) [...] 0:000> bl 0 e 00000000`ff2d105e 0001 (0001) 0:**** notepad!WinMain+0x17c "r $t0 = rcx; g" 1 e 00000000`ff2d1064 0001 (0001) 0:**** notepad!WinMain+0x182 ".printf "hwnd: %p message: %p wParam: %p lParam: %p", poi(@$t0), poi(@$t0+@$ptrsize), poi(@$t0+2*@$ptrsize), poi(@$t0+3*@$ptrsize); .echo; g" Event State Management © 2012 DumpAnalysis.org + TraceAnalysis.org
  • 6. .logopen kv u ub bp bl g r dp Commands and pseudo-registers © 2012 DumpAnalysis.org + TraceAnalysis.org .printf .echo poi $t0 $ptrsize bc dd .logclose
  • 7. !Ad Hardcore Technical Support Training © 2012 DumpAnalysis.org + TraceAnalysis.org Advanced Windows Memory Dump Analysis Accelerated Windows Memory Dump AnalysisJanuary 18-23, 2012: January 13, 2012: Training Schedule Accelerated .NET Memory Dump AnalysisJanuary 26-27, 2012: