Post Memory Corruption Memory Analysis - Archive ouverte HAL
Communication Dans Un Congrès Année : 2011

Post Memory Corruption Memory Analysis

Jonathan Brossard

Résumé

In this presentation, we introduce a new exploitation methodology of invalid memory reads and writes, based on dataflow analysis after a memory corruption bug has occurred inside a running process. We will expose a methodology which shall help writting a reliable exploit out of a PoC triggering an invalid memory write, in presence of security defense mechanisme such as compiler enhancements (full RELRO, SSP...), or kernel anti exploitation features (ASLR, NX...). We will demonstrate how to find all the function pointers inside a running process, how to determine which ones would have been de-referenced after the crash, which ones are truncable (in particular with 0x00000000). In case all of the above fail, how to test for specific locations overwrites in order to indirectly trigger a second vulnerability allowing greater control and eventually control flow hijacking. All of the above without source code, indeed. In the case of invalid memory reads, we will exemplify how indirectly influence the control flow of execution by reading arbitrary values, how to trace all the unaligned memory access and how to test if an invalid read can be turned into an invalid write or used to infer the mapping of the binary. We will also introduce a new debugging technique which allows for very effective testing of all of the above by forcing the debugged process to fork(). Automatically. And with a rating of the best read/write location based on probabilities of mapping addresses (because of ASLR). Finally, since overwriting function pointers doesn't allow direct shellcode execution because of W^X mappings, we introduce a new exploitation technique which works even in the most hardcore kernels such as grsecurity. IT is called "stack desynchronization" and allows frame faking inside the stack itself. Those techniques are implemented in the form of a proof of concept tool running under x86 GNU/Linux available as open source.
Jonathan_Brossard_HITB_2011_PMCMA.pdf (281.84 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)
Licence

Dates et versions

hal-04672224 , version 1 (17-08-2024)

Licence

Identifiants

  • HAL Id : hal-04672224 , version 1

Citer

Jonathan Brossard. Post Memory Corruption Memory Analysis. HITB Conference Kuala-Lumpur 2011, HITB, Oct 2011, Kuala Lumpur, Malaysia. ⟨hal-04672224⟩
16 Consultations
5 Téléchargements

Partager

More