SlideShare a Scribd company logo
Dmitry Vostokov
Software Diagnostics ServicesFacebook LinkedIn Twitter
Prerequisites
 Working C or C++ knowledge
 Basic assembly language knowledge
© 2013 Software Diagnostics Services
Audience
 Novices
Learn x64 assembly language
 Experts
Learn the new pattern approach
© 2013 Software Diagnostics Services
Pattern-Oriented RDR
 Complex crashes and hangs (victimware
analysis)
 Malware analysis
 Studying new products
© 2013 Software Diagnostics Services
Training Goals
 Review fundamentals
 Learn patterns and techniques
© 2013 Software Diagnostics Services
Training Principles
 Talk only about what I can show
 Lots of pictures
 Lots of examples
 Original content and examples
© 2013 Software Diagnostics Services
Course Idea
 Implicit memory leak resulted from wrong
API call parameter
 www.Debugging.tv episode 0x31
© 2013 Software Diagnostics Services
Schedule Summary
Day 1
 Theory
 Exercise R1
Day 2
 Exercises R2 – R4
Day 3
 Exercises R5 – R6
 Q&A
© 2013 Software Diagnostics Services
Part 1: Theory
© 2013 Software Diagnostics Services
Computation
© 2013 Software Diagnostics Services
CPU
Data Code
Memory Changes
Disassembly
© 2013 Software Diagnostics Services
Data/Code numbers
Data/Code symbolic
488d0d2cce0000 lea rcx,[CPUx64+0xe2f8 (00000001`3f85e2f8)] ; "Hello World!"
Annotated Disassembly memory analysis pattern
The Problem of Reversing
 Compilation to Machine LanguageM
Language1 LanguageM Language2
 Decompilation
LanguageM ?
© 2013 Software Diagnostics Services
The Solution to Reversing
 Memory LanguageM Semantics
Language1 LanguageM Language2
 Decompilation
Understanding of LanguageM
© 2013 Software Diagnostics Services
The Reversing Tool
© 2013 Software Diagnostics Services
RSP
8
10
18
20
28
30
38
40
48
50
RAX
Memory Cell Diagrams
Re(De)construction
 Time dimension: sequence diagrams
 Space dimension: component diagrams
How does it work temporally and
structurally?
© 2013 Software Diagnostics Services
ADDR Patterns
 Accelerated
 Disassembly patterns
 De(Re)construction patterns
 Reversing patterns
© 2013 Software Diagnostics Services
ADDR Patterns (II)
 Accelerated
 Disassembly patterns
 Decompilation patterns
 Reconstruction patterns
© 2013 Software Diagnostics Services
ADDR Schemas
 Function Prologue -> Function Epilogue
 Call Prologue -> Function Call -> Call Epilogue
 Potential Functionality -> Call Skeleton -> Call
Path
 Call Parameter -> Function Parameter -> Local
Variable
© 2013 Software Diagnostics Services
ADDR Implementations
© 2013 Software Diagnostics Services
ADDR Pattern Catalogue
Windows Mac OS X Linux
Pattern Catalogues
 Elementary Software Diagnostics Patterns
 Memory Analysis Patterns
 Trace and Log Analysis Patterns
 Unified Debugging Patterns
 ADDR Patterns
© 2013 Software Diagnostics Services
Pattern Orientation
 Pattern-Driven ADDR
 Pattern-Based ADDR
© 2013 Software Diagnostics Services
Part 2: Practice Exercises
© 2013 Software Diagnostics Services
Links
 Memory dumps:
Not available in preview version
 Exercise Transcripts:
Not available in preview version
© 2013 Software Diagnostics Services
Exercise 0
 Goal: Install Debugging Tools for Windows and learn how to
set up symbols correctly
© 2013 Software Diagnostics Services
Main CPU Registers
© 2013 Software Diagnostics Services
Illustrated on memory cell diagrams in ADDRMCD-R1.xlsx
 RAX ⊃ EAX ⊃ AX ⊇ {AH, AL}
 ALU: RAX, RDX
 Counter: RCX
 Memory copy: RSI (src), RDI (dst)
 Stack: RSP
 Next instruction: RIP
 New: R8 – R15, Rx(D|W|B)
Exercise R1
 Goal: Review x64 assembly fundamentals; learn how to
reconstruct stack trace manually
 ADDR Patterns: Universal Pointer, Symbolic Pointer S2,
Interpreted Pointer S3, Context Pyramid
 Memory Cell Diagrams: Register, Pointer, Stack Frame
© 2013 Software Diagnostics Services
Stack Reconstruction
© 2013 Software Diagnostics Services
1. Top frame from the current RIP1, RSP1 (r)
2. Disassemble around the current RIPn (u[f] RIPn)
3. Find out the beginning of the function prologue
4. Check RSPn usage (sub, push) and count offsets
5. Get RIPn+1 for the next frame (dps @rspn + offset
6. Get RSPn+1 for the next frame (RSPn+8)
7. ++n
8. goto #2
Exercise R2
 Goal: Learn how to map source code to disassembly
 ADDR Patterns: Potential Functionality, Function Skeleton,
Function Call, Call Path, Local Variable, Static Variable,
Pointer Dereference
 Memory Cell Diagrams: Pointer Dereference
© 2013 Software Diagnostics Services
Exercise R3
 Goal: Learn a function structure and associated memory
operations
 ADDR Patterns: Function Prologue, Function Epilogue,
Variable Initialization, Memory Copy
 Memory Cell Diagrams: Function Prologue, Function
Epilogue
© 2013 Software Diagnostics Services
Exercise R4
 Goal: Learn how to recognize call and function parameters
and track their data flow
 ADDR Patterns: Call Prologue, Call Parameter, Call
Epilogue, Call Result, Control Path, Function Parameter,
Structure Field
© 2013 Software Diagnostics Services
Exercise R5
 Goal: Master memory cell diagrams as an aid to
understanding complex disassembly logic
 ADDR Patterns: Last Call, Loop, Memory Copy
 Memory Cell Diagrams: Memory Copy
© 2013 Software Diagnostics Services
Exercise R6
 Goal: Learn how to to map code to execution residue and
reconstruct past behaviour; recognise previously introduced
ADDR patterns in the context of compiled C++ code
 ADDR Patterns: Separator Frames, Virtual Call
 Memory Cell Diagrams: Virtual Call
© 2013 Software Diagnostics Services
Live Debugging Techniques
 ADDR Patterns: Component Dependencies, API Trace,
Fibre Bundle (trace analysis pattern)
 Some dependencies can be learnt from crash dump stack
traces (example)
 Debugging.TV / YouTube
 Live debugging training: Accelerated Windows Debugging3
© 2013 Software Diagnostics Services
Custom Tracing
 WinDbg logging extension
 www.Debugging.tv episode 0x8 YouTube
© 2013 Software Diagnostics Services
Resources
 WinDbg Help / WinDbg.org (quick links)
 DumpAnalysis.org
 Debugging.TV / DebuggingTV YouTube Channel
 Windows Debugging: Practical Foundations
 x64 Windows Debugging: Practical Foundations
 Software Diagnostics Library
 Memory Dump Analysis Anthology
© 2013 Software Diagnostics Services
x86 disassembly/reversing:
Hackers Disassembly Uncovered by Kris Kaspersky
Q&A
Please send your feedback using the contact
form on PatternDiagnostics.com
© 2013 Software Diagnostics Services
Thank you for attendance!
© 2013 Software Diagnostics Services

More Related Content

Similar to Accelerated Disassembly, Reconstruction and Reversing training public slides

Ase06.ppt
Ase06.pptAse06.ppt
Accelerated Linux Core Dump Analysis training public slides
Accelerated Linux Core Dump Analysis training public slidesAccelerated Linux Core Dump Analysis training public slides
Accelerated Linux Core Dump Analysis training public slides
Dmitry Vostokov
 
Accelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slidesAccelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slides
Dmitry Vostokov
 
Resume
ResumeResume
Cascon06 tooldemo.ppt
Cascon06 tooldemo.pptCascon06 tooldemo.ppt
Cascon06 tooldemo.ppt
Ptidej Team
 
Accelerated Windows Malware Analysis with Memory Dumps
Accelerated Windows Malware Analysis with Memory DumpsAccelerated Windows Malware Analysis with Memory Dumps
Accelerated Windows Malware Analysis with Memory Dumps
Dmitry Vostokov
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
lienhard
 
Webinar on radar
Webinar on radarWebinar on radar
Webinar on radar
Deepak Shankar
 
Introduction to computer architecture .pptx
Introduction to computer architecture .pptxIntroduction to computer architecture .pptx
Introduction to computer architecture .pptx
Fatma Sayed Ibrahim
 
Lect05 Prog Model
Lect05 Prog ModelLect05 Prog Model
Lect05 Prog Model
anoosdomain
 
Hardware Design engineer
Hardware Design engineerHardware Design engineer
Hardware Design engineer
Narasimha Reddy
 
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Databricks
 
Performance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL ModelsPerformance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL Models
Space Codesign
 
Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
Pantech ProLabs India Pvt Ltd
 
RamachandraParlapalli_RESUME
RamachandraParlapalli_RESUMERamachandraParlapalli_RESUME
RamachandraParlapalli_RESUME
parlapalli ramachandra
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
David Solivan
 
unit 5-ERTS.pptx
unit 5-ERTS.pptxunit 5-ERTS.pptx
unit 5-ERTS.pptx
Manikandan813397
 
Malware Narratives
Malware NarrativesMalware Narratives
Malware Narratives
Dmitry Vostokov
 
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLABIRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
IRJET Journal
 
Replay Solutions CFD
Replay Solutions CFDReplay Solutions CFD
Replay Solutions CFD
kilroy440
 

Similar to Accelerated Disassembly, Reconstruction and Reversing training public slides (20)

Ase06.ppt
Ase06.pptAse06.ppt
Ase06.ppt
 
Accelerated Linux Core Dump Analysis training public slides
Accelerated Linux Core Dump Analysis training public slidesAccelerated Linux Core Dump Analysis training public slides
Accelerated Linux Core Dump Analysis training public slides
 
Accelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slidesAccelerated Windows Debugging 3 training public slides
Accelerated Windows Debugging 3 training public slides
 
Resume
ResumeResume
Resume
 
Cascon06 tooldemo.ppt
Cascon06 tooldemo.pptCascon06 tooldemo.ppt
Cascon06 tooldemo.ppt
 
Accelerated Windows Malware Analysis with Memory Dumps
Accelerated Windows Malware Analysis with Memory DumpsAccelerated Windows Malware Analysis with Memory Dumps
Accelerated Windows Malware Analysis with Memory Dumps
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
Webinar on radar
Webinar on radarWebinar on radar
Webinar on radar
 
Introduction to computer architecture .pptx
Introduction to computer architecture .pptxIntroduction to computer architecture .pptx
Introduction to computer architecture .pptx
 
Lect05 Prog Model
Lect05 Prog ModelLect05 Prog Model
Lect05 Prog Model
 
Hardware Design engineer
Hardware Design engineerHardware Design engineer
Hardware Design engineer
 
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
Deploying and Monitoring Heterogeneous Machine Learning Applications with Cli...
 
Performance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL ModelsPerformance Verification for ESL Design Methodology from AADL Models
Performance Verification for ESL Design Methodology from AADL Models
 
Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
 
RamachandraParlapalli_RESUME
RamachandraParlapalli_RESUMERamachandraParlapalli_RESUME
RamachandraParlapalli_RESUME
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
unit 5-ERTS.pptx
unit 5-ERTS.pptxunit 5-ERTS.pptx
unit 5-ERTS.pptx
 
Malware Narratives
Malware NarrativesMalware Narratives
Malware Narratives
 
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLABIRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
 
Replay Solutions CFD
Replay Solutions CFDReplay Solutions CFD
Replay Solutions CFD
 

More from Dmitry Vostokov

Accelerated .NET Memory Dump Analysis training public slides
Accelerated .NET Memory Dump Analysis training public slidesAccelerated .NET Memory Dump Analysis training public slides
Accelerated .NET Memory Dump Analysis training public slides
Dmitry Vostokov
 
Debugging TV Frame 0x1C
Debugging TV Frame 0x1CDebugging TV Frame 0x1C
Debugging TV Frame 0x1C
Dmitry Vostokov
 
Debugging TV Frame 0x1A
Debugging TV Frame 0x1ADebugging TV Frame 0x1A
Debugging TV Frame 0x1A
Dmitry Vostokov
 
Debugging TV Frame 0x34
Debugging TV Frame 0x34Debugging TV Frame 0x34
Debugging TV Frame 0x34
Dmitry Vostokov
 
Debugging TV Frame 0x33
Debugging TV Frame 0x33Debugging TV Frame 0x33
Debugging TV Frame 0x33
Dmitry Vostokov
 
Debugging TV Frame 0x31
Debugging TV Frame 0x31Debugging TV Frame 0x31
Debugging TV Frame 0x31
Dmitry Vostokov
 
Debugging TV Frame 0x25
Debugging TV Frame 0x25Debugging TV Frame 0x25
Debugging TV Frame 0x25
Dmitry Vostokov
 
Debugging TV Frame 0x24
Debugging TV Frame 0x24Debugging TV Frame 0x24
Debugging TV Frame 0x24
Dmitry Vostokov
 
Debugging TV Frame 0x21
Debugging TV Frame 0x21Debugging TV Frame 0x21
Debugging TV Frame 0x21
Dmitry Vostokov
 
Debugging TV Frame 0x20
Debugging TV Frame 0x20Debugging TV Frame 0x20
Debugging TV Frame 0x20
Dmitry Vostokov
 
Debugging TV Frame 0x19
Debugging TV Frame 0x19Debugging TV Frame 0x19
Debugging TV Frame 0x19
Dmitry Vostokov
 
Debugging TV Frame 0x18
Debugging TV Frame 0x18Debugging TV Frame 0x18
Debugging TV Frame 0x18
Dmitry Vostokov
 
Debugging TV Frame 0x17
Debugging TV Frame 0x17Debugging TV Frame 0x17
Debugging TV Frame 0x17
Dmitry Vostokov
 
Debugging TV Frame 0x16
Debugging TV Frame 0x16Debugging TV Frame 0x16
Debugging TV Frame 0x16
Dmitry Vostokov
 
Debugging TV Frame 0x15
Debugging TV Frame 0x15Debugging TV Frame 0x15
Debugging TV Frame 0x15
Dmitry Vostokov
 
Debugging TV Frame 0x14
Debugging TV Frame 0x14Debugging TV Frame 0x14
Debugging TV Frame 0x14
Dmitry Vostokov
 
Debugging TV Frame 0x13
Debugging TV Frame 0x13Debugging TV Frame 0x13
Debugging TV Frame 0x13
Dmitry Vostokov
 
Debugging TV Frame 0x12
Debugging TV Frame 0x12Debugging TV Frame 0x12
Debugging TV Frame 0x12
Dmitry Vostokov
 
Debugging TV Frame 0x11
Debugging TV Frame 0x11Debugging TV Frame 0x11
Debugging TV Frame 0x11
Dmitry Vostokov
 
Debugging TV Frame 0x10
Debugging TV Frame 0x10Debugging TV Frame 0x10
Debugging TV Frame 0x10
Dmitry Vostokov
 

More from Dmitry Vostokov (20)

Accelerated .NET Memory Dump Analysis training public slides
Accelerated .NET Memory Dump Analysis training public slidesAccelerated .NET Memory Dump Analysis training public slides
Accelerated .NET Memory Dump Analysis training public slides
 
Debugging TV Frame 0x1C
Debugging TV Frame 0x1CDebugging TV Frame 0x1C
Debugging TV Frame 0x1C
 
Debugging TV Frame 0x1A
Debugging TV Frame 0x1ADebugging TV Frame 0x1A
Debugging TV Frame 0x1A
 
Debugging TV Frame 0x34
Debugging TV Frame 0x34Debugging TV Frame 0x34
Debugging TV Frame 0x34
 
Debugging TV Frame 0x33
Debugging TV Frame 0x33Debugging TV Frame 0x33
Debugging TV Frame 0x33
 
Debugging TV Frame 0x31
Debugging TV Frame 0x31Debugging TV Frame 0x31
Debugging TV Frame 0x31
 
Debugging TV Frame 0x25
Debugging TV Frame 0x25Debugging TV Frame 0x25
Debugging TV Frame 0x25
 
Debugging TV Frame 0x24
Debugging TV Frame 0x24Debugging TV Frame 0x24
Debugging TV Frame 0x24
 
Debugging TV Frame 0x21
Debugging TV Frame 0x21Debugging TV Frame 0x21
Debugging TV Frame 0x21
 
Debugging TV Frame 0x20
Debugging TV Frame 0x20Debugging TV Frame 0x20
Debugging TV Frame 0x20
 
Debugging TV Frame 0x19
Debugging TV Frame 0x19Debugging TV Frame 0x19
Debugging TV Frame 0x19
 
Debugging TV Frame 0x18
Debugging TV Frame 0x18Debugging TV Frame 0x18
Debugging TV Frame 0x18
 
Debugging TV Frame 0x17
Debugging TV Frame 0x17Debugging TV Frame 0x17
Debugging TV Frame 0x17
 
Debugging TV Frame 0x16
Debugging TV Frame 0x16Debugging TV Frame 0x16
Debugging TV Frame 0x16
 
Debugging TV Frame 0x15
Debugging TV Frame 0x15Debugging TV Frame 0x15
Debugging TV Frame 0x15
 
Debugging TV Frame 0x14
Debugging TV Frame 0x14Debugging TV Frame 0x14
Debugging TV Frame 0x14
 
Debugging TV Frame 0x13
Debugging TV Frame 0x13Debugging TV Frame 0x13
Debugging TV Frame 0x13
 
Debugging TV Frame 0x12
Debugging TV Frame 0x12Debugging TV Frame 0x12
Debugging TV Frame 0x12
 
Debugging TV Frame 0x11
Debugging TV Frame 0x11Debugging TV Frame 0x11
Debugging TV Frame 0x11
 
Debugging TV Frame 0x10
Debugging TV Frame 0x10Debugging TV Frame 0x10
Debugging TV Frame 0x10
 

Recently uploaded

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 

Recently uploaded (20)

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 

Accelerated Disassembly, Reconstruction and Reversing training public slides

  • 1. Dmitry Vostokov Software Diagnostics ServicesFacebook LinkedIn Twitter
  • 2. Prerequisites  Working C or C++ knowledge  Basic assembly language knowledge © 2013 Software Diagnostics Services
  • 3. Audience  Novices Learn x64 assembly language  Experts Learn the new pattern approach © 2013 Software Diagnostics Services
  • 4. Pattern-Oriented RDR  Complex crashes and hangs (victimware analysis)  Malware analysis  Studying new products © 2013 Software Diagnostics Services
  • 5. Training Goals  Review fundamentals  Learn patterns and techniques © 2013 Software Diagnostics Services
  • 6. Training Principles  Talk only about what I can show  Lots of pictures  Lots of examples  Original content and examples © 2013 Software Diagnostics Services
  • 7. Course Idea  Implicit memory leak resulted from wrong API call parameter  www.Debugging.tv episode 0x31 © 2013 Software Diagnostics Services
  • 8. Schedule Summary Day 1  Theory  Exercise R1 Day 2  Exercises R2 – R4 Day 3  Exercises R5 – R6  Q&A © 2013 Software Diagnostics Services
  • 9. Part 1: Theory © 2013 Software Diagnostics Services
  • 10. Computation © 2013 Software Diagnostics Services CPU Data Code Memory Changes
  • 11. Disassembly © 2013 Software Diagnostics Services Data/Code numbers Data/Code symbolic 488d0d2cce0000 lea rcx,[CPUx64+0xe2f8 (00000001`3f85e2f8)] ; "Hello World!" Annotated Disassembly memory analysis pattern
  • 12. The Problem of Reversing  Compilation to Machine LanguageM Language1 LanguageM Language2  Decompilation LanguageM ? © 2013 Software Diagnostics Services
  • 13. The Solution to Reversing  Memory LanguageM Semantics Language1 LanguageM Language2  Decompilation Understanding of LanguageM © 2013 Software Diagnostics Services
  • 14. The Reversing Tool © 2013 Software Diagnostics Services RSP 8 10 18 20 28 30 38 40 48 50 RAX Memory Cell Diagrams
  • 15. Re(De)construction  Time dimension: sequence diagrams  Space dimension: component diagrams How does it work temporally and structurally? © 2013 Software Diagnostics Services
  • 16. ADDR Patterns  Accelerated  Disassembly patterns  De(Re)construction patterns  Reversing patterns © 2013 Software Diagnostics Services
  • 17. ADDR Patterns (II)  Accelerated  Disassembly patterns  Decompilation patterns  Reconstruction patterns © 2013 Software Diagnostics Services
  • 18. ADDR Schemas  Function Prologue -> Function Epilogue  Call Prologue -> Function Call -> Call Epilogue  Potential Functionality -> Call Skeleton -> Call Path  Call Parameter -> Function Parameter -> Local Variable © 2013 Software Diagnostics Services
  • 19. ADDR Implementations © 2013 Software Diagnostics Services ADDR Pattern Catalogue Windows Mac OS X Linux
  • 20. Pattern Catalogues  Elementary Software Diagnostics Patterns  Memory Analysis Patterns  Trace and Log Analysis Patterns  Unified Debugging Patterns  ADDR Patterns © 2013 Software Diagnostics Services
  • 21. Pattern Orientation  Pattern-Driven ADDR  Pattern-Based ADDR © 2013 Software Diagnostics Services
  • 22. Part 2: Practice Exercises © 2013 Software Diagnostics Services
  • 23. Links  Memory dumps: Not available in preview version  Exercise Transcripts: Not available in preview version © 2013 Software Diagnostics Services
  • 24. Exercise 0  Goal: Install Debugging Tools for Windows and learn how to set up symbols correctly © 2013 Software Diagnostics Services
  • 25. Main CPU Registers © 2013 Software Diagnostics Services Illustrated on memory cell diagrams in ADDRMCD-R1.xlsx  RAX ⊃ EAX ⊃ AX ⊇ {AH, AL}  ALU: RAX, RDX  Counter: RCX  Memory copy: RSI (src), RDI (dst)  Stack: RSP  Next instruction: RIP  New: R8 – R15, Rx(D|W|B)
  • 26. Exercise R1  Goal: Review x64 assembly fundamentals; learn how to reconstruct stack trace manually  ADDR Patterns: Universal Pointer, Symbolic Pointer S2, Interpreted Pointer S3, Context Pyramid  Memory Cell Diagrams: Register, Pointer, Stack Frame © 2013 Software Diagnostics Services
  • 27. Stack Reconstruction © 2013 Software Diagnostics Services 1. Top frame from the current RIP1, RSP1 (r) 2. Disassemble around the current RIPn (u[f] RIPn) 3. Find out the beginning of the function prologue 4. Check RSPn usage (sub, push) and count offsets 5. Get RIPn+1 for the next frame (dps @rspn + offset 6. Get RSPn+1 for the next frame (RSPn+8) 7. ++n 8. goto #2
  • 28. Exercise R2  Goal: Learn how to map source code to disassembly  ADDR Patterns: Potential Functionality, Function Skeleton, Function Call, Call Path, Local Variable, Static Variable, Pointer Dereference  Memory Cell Diagrams: Pointer Dereference © 2013 Software Diagnostics Services
  • 29. Exercise R3  Goal: Learn a function structure and associated memory operations  ADDR Patterns: Function Prologue, Function Epilogue, Variable Initialization, Memory Copy  Memory Cell Diagrams: Function Prologue, Function Epilogue © 2013 Software Diagnostics Services
  • 30. Exercise R4  Goal: Learn how to recognize call and function parameters and track their data flow  ADDR Patterns: Call Prologue, Call Parameter, Call Epilogue, Call Result, Control Path, Function Parameter, Structure Field © 2013 Software Diagnostics Services
  • 31. Exercise R5  Goal: Master memory cell diagrams as an aid to understanding complex disassembly logic  ADDR Patterns: Last Call, Loop, Memory Copy  Memory Cell Diagrams: Memory Copy © 2013 Software Diagnostics Services
  • 32. Exercise R6  Goal: Learn how to to map code to execution residue and reconstruct past behaviour; recognise previously introduced ADDR patterns in the context of compiled C++ code  ADDR Patterns: Separator Frames, Virtual Call  Memory Cell Diagrams: Virtual Call © 2013 Software Diagnostics Services
  • 33. Live Debugging Techniques  ADDR Patterns: Component Dependencies, API Trace, Fibre Bundle (trace analysis pattern)  Some dependencies can be learnt from crash dump stack traces (example)  Debugging.TV / YouTube  Live debugging training: Accelerated Windows Debugging3 © 2013 Software Diagnostics Services
  • 34. Custom Tracing  WinDbg logging extension  www.Debugging.tv episode 0x8 YouTube © 2013 Software Diagnostics Services
  • 35. Resources  WinDbg Help / WinDbg.org (quick links)  DumpAnalysis.org  Debugging.TV / DebuggingTV YouTube Channel  Windows Debugging: Practical Foundations  x64 Windows Debugging: Practical Foundations  Software Diagnostics Library  Memory Dump Analysis Anthology © 2013 Software Diagnostics Services x86 disassembly/reversing: Hackers Disassembly Uncovered by Kris Kaspersky
  • 36. Q&A Please send your feedback using the contact form on PatternDiagnostics.com © 2013 Software Diagnostics Services
  • 37. Thank you for attendance! © 2013 Software Diagnostics Services