Part 49 – Hacking Post-Decrement Operator

For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/Reverse-Engineering-Tutorial

Let’s once again review our code.

  1. #include <iostream>
  2. int main(void) {
  3. int myNumber = 16;
  4. int myNewNumber = myNumber--;
  5. std::cout << myNewNumber << std::endl;
  6. std::cout << myNumber << std::endl;
  7. return 0;
  8. }

Let’s review last week’s debug.

Part 49 – Hacking Post-Decrement Operator - 图1

As we can see here the value in r1 at main+68 is 15. Let’s hack!

Part 49 – Hacking Post-Decrement Operator - 图2

Once again we have manipulated and changed program execution to our own bidding. With each of these bite-size lessons you continue to get a better grasp on the processor and how it interfaces with the binary.

I hope this series gives you a solid framework for understanding the ARM processor. This concludes the series. Thank you all for coming along on the journey!