< All Advanced Penetration Testing Notes

bltsec | Advanced Penetration Testing | Module 12 - Exploit Development

By: bltsec | Related Course: Advanced Penetration Testing | Published: July 27, 2017 | Modified: July 27, 2017
Join Cybrary

NotepadExploit Development (Part 2) A Program in Memory

Exploit Development (Part 2) A Program in Memory:

Registers: store data in cpu for us to use and registers depend on platform ie x86 or arm. E means Extended for 32 bit. A reserved area o ed area of memory used to keep trac eep track of a program’s internal operatio perations, including functions, return addresses, passed parameters ed parameters, etc. A stack is usually maintained as a ”last in, first out” (LIFO) data s ) data structure, so that the last item added to t item added to the structure is the first item u t item used. Sometimes metimes is useful to have a regio e a region of memory for tempo r temporary storage, which does not have to be allo be allocated as ated as named variables ariables. When you use subroutines and interrupts it will be es it will be essential to tial to have such a storage region. Such region is called a alled a Stack The Stack Pointer (SP) register is used to indicate the location of the last item pu t item put onto the stack. When you PUT something ONTO the stack (PUSH onto the stack), the SP is decremented before the item is e item is placed on the stack. When you take something OFF of the stack (PULL from the stack), the SP is incremented after the item is e item is pulled from the stack. Before you can use a stack you have to initialize th itialize the SP to point to one value higher than the highest memory location in the stack. For the HC12 use a blo e a block of memory from about $3B00 to $3BFF for the stack. For this region of memory, initialize th itialize the stack pointer to $3C00. Use LDS (Load Stack Pointer) to ter) to initialize th itialize the stack pointer. The stack pointer is initialized o itialized only one time in e time in the program. 

 

 


NotepadExploit Development (Part 3) Stack Frame for Function

Exploit Development (Part 3) Stack Frame for Function:

 


NotepadExploit Development Introduction (Part 1)

Exploit Development Introduction (Part 1):

 


< All Advanced Penetration Testing Notes
Join Cybrary

Our Revolution

We believe Cyber Security training should accessible for everyone, everywhere. Everyone deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is the world's largest community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel