Starter guide
started by realprooxy
Here’s a good starting roadmap:
C/C++ (non-trivial projects)
- Focus on memory allocations
- Pointer arithmetic
- Bitwise operations
- String parsing
- OOP familiarity
- Stack versus heap familiarity
- Hop in the debugger
Read up on the most universal and basic instructions in x86/x86_64 assembly like mov, add, lea, xor, cmp, je, jbe, etc.
Paste little snippets of C/C++ into Godbolt (Compiler Explorer) and observe what assembly the compiler generates. This will help you quickly identify compiler-optimized code, higher-level abstractions, and so forth.
Set up an MSVC console project with MASM support enabled. Include a .asm file, write a few procedures (functions), and extern "C" them in your main.cpp. The compiler will deal with the linking that trips up beginners and lets you focus on just writing code.
Open up an old x86 program in Ghidra or IDA and pick a function to analyze. I'd go with something really simple like some old FPS game. Find the function that handles decrementing player health, go line by line, annotate the assembly, and try to reconstruct what the source likely was when written in C.
Learn about some C++ internals like RTTI, name mangling, virtual function tables, constructors and destructors, the global class initializer table, etc.
OS internals, TLS callbacks, PE/ELF binary format, IAT/GOT, ASLR/PIE, how linking is handled, memory permissions, and so on.
This isn't exhaustive, but these are some of the things that helped me get better with time.
Not sure where you're at in terms of familiarity with low-level concepts or programming at all, but some tools I recommend are Ghidra, x32dbg/x64dbg, and Frida.
Best of luck, and sorry for the long response. :P
Log in to reply.