SlideShare a Scribd company logo
1 of 79
Using Immunity Debugger to Write Exploits ,[object Object],Dave Aitel, Nicolas Waisman [email_address] [email_address]
Who am I? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Software vendors now understand the value of security ,[object Object],[object Object],[object Object]
Immunity Debugger is a strategic answer to defensive advances ,[object Object],[object Object],[object Object],[object Object]
But attackers have their own resources ,[object Object],[object Object],[object Object],[object Object]
Attackers will defeat the current generation of defensive technologies through profound and rapid tool innovation ,[object Object],[object Object],[object Object],[object Object]
Better interfaces save valuable time WinDBG-like commandline Pure-Python Graphing Usable GUI
Python integration offers useful analysis ,[object Object],[object Object],[object Object],[object Object]
Existing toolsets are also in Python ,[object Object],[object Object],[object Object],[object Object],[object Object]
Hackers already work in teams... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Two examples of how Immunity Debugger changes assessment and exploitation ,[object Object],[object Object]
SQL Injection/File Include ,[object Object],[object Object],[object Object],[object Object],[object Object]
Heap overflows are dead, long live heap overflows ,[object Object],[object Object]
And so... heap protection has been introduced ,[object Object],[object Object],[object Object],[object Object]
XP SP2 makes our work hard ,[object Object],[object Object],blink  =  chunk ->blink flink  =  chunk ->flink if  blink ->flink ==  flink ->blink and  blink ->flink ==  chunk
and harder... ,[object Object],[object Object],Chunk been unlinked
XP SP2 ( and Vista) introduced more heap protections ,[object Object],[object Object],subsegment  =  chunk ->subsegmentcode subsegment  ^= RtlpLFHKey subsegment  ^= Heap subsegment  ^=  chunk >> 3
Vista heap algorithm changes make unlink() unlikely ,[object Object],[object Object],*(chunk)  ^=  HEAP->EncodingKey checksum   =  (char) *(  chunk  + 1) checksum   ^=  (char) *(  chunk  ) checksum   ^=  (char) *( chunk  + 2) if  checksum  ==  chunk ->Checksum
Checksum makes it hard to predict and control the header  ,[object Object],[object Object],0 1 2 3 Xor against  HEAP->EncodingKey
Other protections in Vista are not heap specific ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A lot of excellent work has been done to bypass heap protections ,[object Object],[object Object],[object Object]
We no longer use heap algorithms to get write4 primitives ,[object Object],[object Object],[object Object],[object Object]
We have been working on this methodology for years ,[object Object],[object Object],[object Object],[object Object]
Previous exploits already carefully crafted the heap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
The heap, piece by piece ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A quick look at the lookaside ,[object Object],0 1 2 3 4 5 8 bytes 8 bytes 24 bytes Note:  24 bytes is the total size. The actual data size is: 24 - 8 = 16 byes
A quick look at the FreeList data structure ,[object Object],0 1 2 3 24 bytes 24 bytes 4 n n*8 bytes 1600 bytes 2000 bytes 5 Where n < 128
Chunk coalescing: contiguous free chunks are joined to minimize fragmentation ptr Back_chunk PSize= *( ptr +2) Back_chunk  =   ptr - (PSize*8) if  Back_chunk  is not BUSY: unlink( Back_chunk )
Chunks are split into two chunks when necessary ,[object Object],[object Object]
The life-cycle of a heap overflow ,[object Object],[object Object],[object Object],[object Object],[object Object],} Might be the same
An alternate heap overflow lifecycle that requires emphasis on surviving with a broken heap ,[object Object],[object Object],[object Object],[object Object],[object Object]
Heaps do not all start in the same layout ,[object Object],[object Object],[object Object]
Heap Holes ,[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”); Chunk is part of the FreeList[97]
Heap Holes ,[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”);
Heap Holes ,[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”);
Heap Holes ,[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”);
Heap Holes ,[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”);
Two types of memory leaks are used in heap exploitation ,[object Object],[object Object],[object Object],[object Object]
Several bad coding practises lead to hard memleaks  ,[object Object],[object Object],[object Object],[object Object]
Soft memory leaks are almost as useful to exploit writers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
We correct our heap layout with memory leaks ,[object Object],[object Object],[object Object],[object Object],} Both have the same objective: to allow us to have consecutive chunks
Heap Rule #1: Force and control the layout ,[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”);
[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”); Heap Rule #1: Force and control the layout Calculating size: 768 + 8 = 776 776/8 =  entry 97
[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”); Heap Rule #1: Force and control the layout
[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”); Heap Rule #1: Force and control the layout
[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”); Heap Rule #1: Force and control the layout
[object Object],Vulnerable(function) A = Allocate(0x300); B = Allocate(0x300); [...] Overwrite(A); fn_ptr = B[4]; fn_ptr(“hello world”); Heap Rule #1: Force and control the layout
Good exploits are the result of Intelligent Debugging ,[object Object],[object Object]
Immunity Debugger is the first debugger specifically for vulnerability development ,[object Object],[object Object],[object Object]
Immunity Debugger's specialized heap analysis tools ,[object Object],[object Object],[object Object],[object Object]
Immunity Debugger ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Searching the heap using Immlib ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Comparing a heap before and after you break it ,[object Object],[object Object],[object Object],[object Object],[object Object]
Heap Fingerprinting ,[object Object],[object Object]
Heap Fingerprinting ,[object Object],[object Object],[object Object],[object Object],[object Object]
 
Automated data type discovery using Immlib ,[object Object],[object Object],[object Object]
Immunity Debugger offers simple runtime analysis of heap data to find data types ,[object Object],[object Object],[object Object],[object Object]
Data Discovery ,[object Object],[object Object]
 
Data Discovery can be scripted easily ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Heap Fuzzing helps you discover a way to obtain the correct layout ,[object Object],[object Object]
Heap Fuzzing ,[object Object],[object Object],[object Object],[object Object]
Heap Fuzzing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Inject Hook ,[object Object],[object Object],[object Object],[object Object]
Inject Hooks into the target process speeds things up ,[object Object],[object Object]
Inject Hook process VirtualAllocEx mapped mem
Inject Hook process InjectHooks mapped mem
Inject Hook process Redirect Function mapped mem RtlAllocateHeap RtlFreeHeap
Inject Hook process Run the program mapped mem RtlAllocateHeap RtlFreeHeap
Inject Hook process Inspect the result mapped mem
Inject Hook ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The future ,[object Object],[object Object],[object Object]
Automating exploitation ,[object Object],[object Object],[object Object],[object Object]
Conclusions ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Carol McDonald
 
Ani hilate this week
Ani hilate this weekAni hilate this week
Ani hilate this week
UltraUploader
 
I mage encryption using rc5
I mage encryption using rc5I mage encryption using rc5
I mage encryption using rc5
Suramrit Singh
 

What's hot (20)

Attackboard slides dac12-0605
Attackboard slides dac12-0605Attackboard slides dac12-0605
Attackboard slides dac12-0605
 
Secured algorithm for gsm encryption & decryption
Secured algorithm for gsm encryption & decryptionSecured algorithm for gsm encryption & decryption
Secured algorithm for gsm encryption & decryption
 
Modern Cryptography
Modern CryptographyModern Cryptography
Modern Cryptography
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
 
Ch07
Ch07Ch07
Ch07
 
22 multi threading iv
22 multi threading iv22 multi threading iv
22 multi threading iv
 
Outsourced database
Outsourced databaseOutsourced database
Outsourced database
 
Ani hilate this week
Ani hilate this weekAni hilate this week
Ani hilate this week
 
Python multithreading
Python multithreadingPython multithreading
Python multithreading
 
Python multithreading
Python multithreadingPython multithreading
Python multithreading
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
Fast, Private and Verifiable: Server-aided Approximate Similarity Computation...
Fast, Private and Verifiable: Server-aided Approximate Similarity Computation...Fast, Private and Verifiable: Server-aided Approximate Similarity Computation...
Fast, Private and Verifiable: Server-aided Approximate Similarity Computation...
 
An effective RC4 Stream Cipher
An effective RC4 Stream CipherAn effective RC4 Stream Cipher
An effective RC4 Stream Cipher
 
Information and network security 18 modern techniques block ciphers
Information and network security 18 modern techniques block ciphersInformation and network security 18 modern techniques block ciphers
Information and network security 18 modern techniques block ciphers
 
Symmetric encryption
Symmetric encryptionSymmetric encryption
Symmetric encryption
 
I mage encryption using rc5
I mage encryption using rc5I mage encryption using rc5
I mage encryption using rc5
 
Software Security
Software SecuritySoftware Security
Software Security
 
Introduction to Python for Security Professionals
Introduction to Python for Security ProfessionalsIntroduction to Python for Security Professionals
Introduction to Python for Security Professionals
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
 
An Introduction of SQL Injection, Buffer Overflow & Wireless Attack
An Introduction of SQL Injection, Buffer Overflow & Wireless AttackAn Introduction of SQL Injection, Buffer Overflow & Wireless Attack
An Introduction of SQL Injection, Buffer Overflow & Wireless Attack
 

Similar to Debugging With Id

Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworks
phanleson
 
DefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO RoutersDefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO Routers
Michael Smith
 
Secure Coding Practices for Middleware
Secure Coding Practices for MiddlewareSecure Coding Practices for Middleware
Secure Coding Practices for Middleware
Manuel Brugnoli
 

Similar to Debugging With Id (20)

Buffer overflow attacks
Buffer overflow attacksBuffer overflow attacks
Buffer overflow attacks
 
Buffer overflow attacks
Buffer overflow attacksBuffer overflow attacks
Buffer overflow attacks
 
Lab 1 Essay
Lab 1 EssayLab 1 Essay
Lab 1 Essay
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinar
 
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual MachineForensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual Machine
 
AntiRE en Masse
AntiRE en MasseAntiRE en Masse
AntiRE en Masse
 
BSides IR in Heterogeneous Environment
BSides IR in Heterogeneous EnvironmentBSides IR in Heterogeneous Environment
BSides IR in Heterogeneous Environment
 
Buffer overflow attacks
Buffer overflow attacksBuffer overflow attacks
Buffer overflow attacks
 
Linux Assignment 3
Linux Assignment 3Linux Assignment 3
Linux Assignment 3
 
Return oriented programming (ROP)
Return oriented programming (ROP)Return oriented programming (ROP)
Return oriented programming (ROP)
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworks
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitation
 
Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0
 
The genesis of clusterlib - An open source library to tame your favourite sup...
The genesis of clusterlib - An open source library to tame your favourite sup...The genesis of clusterlib - An open source library to tame your favourite sup...
The genesis of clusterlib - An open source library to tame your favourite sup...
 
Virtual Machines Security Internals: Detection and Exploitation
 Virtual Machines Security Internals: Detection and Exploitation Virtual Machines Security Internals: Detection and Exploitation
Virtual Machines Security Internals: Detection and Exploitation
 
DefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO RoutersDefCon 2012 - Rooting SOHO Routers
DefCon 2012 - Rooting SOHO Routers
 
Secure Coding Practices for Middleware
Secure Coding Practices for MiddlewareSecure Coding Practices for Middleware
Secure Coding Practices for Middleware
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
The Veil-Framework
The Veil-FrameworkThe Veil-Framework
The Veil-Framework
 
Automatisez la détection des menaces et évitez les faux positifs
Automatisez la détection des menaces et évitez les faux positifsAutomatisez la détection des menaces et évitez les faux positifs
Automatisez la détection des menaces et évitez les faux positifs
 

Recently uploaded

Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pillsMifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Dipal Arora
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
Renandantas16
 

Recently uploaded (20)

Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pillsMifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
Yaroslav Rozhankivskyy: Три складові і три передумови максимальної продуктивн...
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 

Debugging With Id

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Better interfaces save valuable time WinDBG-like commandline Pure-Python Graphing Usable GUI
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. Chunk coalescing: contiguous free chunks are joined to minimize fragmentation ptr Back_chunk PSize= *( ptr +2) Back_chunk = ptr - (PSize*8) if Back_chunk is not BUSY: unlink( Back_chunk )
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.  
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.  
  • 59.
  • 60.
  • 61.
  • 62.  
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.  
  • 68.
  • 69.
  • 70. Inject Hook process VirtualAllocEx mapped mem
  • 71. Inject Hook process InjectHooks mapped mem
  • 72. Inject Hook process Redirect Function mapped mem RtlAllocateHeap RtlFreeHeap
  • 73. Inject Hook process Run the program mapped mem RtlAllocateHeap RtlFreeHeap
  • 74. Inject Hook process Inspect the result mapped mem
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.