13.1 — What is reverse engineering?

📘 Chapter 13⏱ about 2 min read✍️ Beginner friendly
Read one box at a time. No rush.

Working backwards#

So far, you've gone forwards: write C++ → compile → get a program.

Reverse engineering (RE for short) goes backwards. You start with a finished program — with no source code — and work out how it works.

It's like taking apart a clock to see how the gears fit together.

Who does this?#

  • Security researchers find bugs in programs before attackers do.
  • Malware analysts take apart viruses to learn how to stop them.
  • Developers debug crashes in code they don't have the source for, or make old file formats work again.
  • CTF players solve reversing puzzles in security competitions — for fun and prizes.
Key idea

Learning RE also makes you a better C++ programmer. When you see what your code really turns into, pointers, references and classes suddenly make much more sense.

Reverse engineering is a normal skill, but what you reverse matters.

Only reverse things you're allowed to
  • ✅ Programs you wrote yourself (that's most of this chapter).
  • ✅ Practice programs made to be reversed: crackmes and CTF challenges (13.9 — Where to practise legally).
  • ✅ Open-source software, or software whose licence allows it.
  • ❌ Cracking paid software, removing copy protection, or cheating in online games.
  • ❌ Getting into systems or accounts that aren't yours.

Many software licences forbid RE, and in many countries breaking copy protection is illegal. When in doubt, don't.

What you need to know first#

This chapter uses ideas from earlier chapters. It's best to have finished up to at least chapter 10, especially:

Finished reading? Tick it off. Your progress is saved in this browser.

Tip: press ← / → to move between lessons, / to search.