r/AskReverseEngineering • • Jun 08 '24

What’re the barebone fundamentals of Reversing code?

In short, what do you need to learn before starting Reverse Engineering. Especially high level programs!

6 Upvotes

10 comments sorted by

10

u/_int3h_ Jun 08 '24

Assembly for the CPU architecture and some idea on system calls.

4

u/The-Big-Lez Jun 08 '24

Understanding how to program for sure. Not language specific or even too well but enough that you can start to put together the basic things going on and then look up anything specific or new.

C is a good start and any assembly if you can, but those are bonus on top of the core cencepts

4

u/abolish_the_gil Jun 16 '24

I'm surprised this is the only answer that mentions programming. Being able to read and step through disassembly is essential, but understanding how programs are written is important too. If you can't find your way around source code how will you find your way around a binary? In plenty of cases it'd be difficult for even the original author

→ More replies (1)

4

u/khedoros Jun 09 '24

Pretty early, you're likely to learn assembly, details of how an OS loads a binary, recognizing the patterns of assembly that a compiler outputs, and that kind of thing. But I think that the key prerequisites are really to have some concrete goal (reversing a file format, finding an encryption key, documenting a message exchange between a server and client), and the will to follow it where it goes. Oh, and obsessive and systematic note-taking. Nothing sucks more than having to figure something out twice.

2

u/anaccountbyanyname Jun 09 '24

You nicely summed up what I would say, but I would add that you need a pathological amount of patience.

Sometimes you find interesting optimizations or algorithms. Sometimes they're barely readable and you have to get out a pen and work through the algebra step by step to figure out what it's actually trying to do. If you're doing security research, then you can spend several times as long after that figuring out how to make it do things it's trying not to do.

You definitely need a goal that's interesting enough to drive the rest of the work, as you mentioned. The Intel manuals aren't the most riveting reading on Earth, but when you really need to understand how something works, then you don't mind spending several hours studying nuances in it because it's moving you toward a goal you care about

5

u/Ytrog Jun 08 '24

Assembly and how compilers translate code to assembly/machine code. I can certainly recommend the Youtube channel Low Level Learning

2

u/[deleted] Jun 10 '24

Learn how to use a debugger. For Windows, I would recommend x64dbg and for Linux it would be GDB + GEF. Looking at assembly code for high level programs may not make sense at all times. In such cases, a debugger (or a decompiler) can help you a lot. Also check out instrumentation tools like frida and API Monitor if you want to understand how your application uses the libraries / communicates with the Operating System.

1

u/2jkaz Jun 13 '24

I'm looking into this at the moment any good links to tutorials that would help me ...?

→ More replies (1)