2021-07-10 · 1

Getting Started with Reversing

securityreversing

This post is over 2 years old. The content may be outdated.

Reversing in CTFs

  1. Analyze the program structure
  2. Reimplement the code based on the analysis
  3. Obtain the flag through inverse operations

-> To obtain the flag, the process of analyzing and understanding the program's structure is essential.

In the end, reverse engineering improves the more you analyze.

Unlike other fields, you study it more by encountering new types than by learning techniques.

Foundational hacking knowledge

Linux - To hack, you have to be able to handle Linux.

Programming - Learning at least one language will help a lot.

In particular, you must know C to do system hacking.

Compiling source code

#include <stdio.h>

int main()
{
	printf("Hello World!!");
    return 0;
}

When you write "Hello World" code like above and compile it, it's processed as below.

Helloworld.c => Helloworld.i => Helloworld.s => helloworld.o => Helloworld

source code preprocessed source assembly source object file executable

!> ****](https://nabomhalang.tistory.com/entry/해킹-레지스터)

As above, entering "gcc -v --save-temps -o 'executable name' 'source file name'" on Ubuntu saves all the files produced during compilation, all as in the picture above. So, as above, when you open the assembly source file "helloworld.s", you can confirm it's written in assembly. ### Disassembly ![](/content- — nabomhalang.tistory.com


Original (Korean): tistory — published 2021-07-10, migrated to this blog. This translation was generated with the help of AI.

Comments

Delete this comment?

Related posts

Getting Started with Reversing · 나봄하랑