Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Buffer Overflow Demo(1)hello.cpp -the vulnerable programReading data from the "binfile" of the root directory tostack variable "buf" by fread()Then the stack variable "buf" will be overflowedARM assembly language uses bl instruction to callfunction"str lr, [sp, #-4]! " -the first instruction of thehello() function"ldmia sp!, {pc} " -the last instruction of the hello()functionOverwriting lr register that is stored in the stack willobtain control when the function returnedPart 7/8