Intro to RE: C : part-4

When an operating system (OS) runs a program, the program is first loaded into main memory. Memory is utilized for both program’s machine instructions and program’s data…this includes parameters, dynamic variables, (un)initialized variables, and so on. Most computers today use paged memory allocations, which allow the amount of memory assigned to a program to increase/decrease as the needs of the application change. Memory is allocated to the program and reclaimed by the operating system in fixed-size chunks known as pages....

May 1, 2023 · 14 min · 2938 words · ayedaemon

Eudyptula Task 7

This is Task 07 of the Eudyptula Challenge ------------------------------------------ Great work with that misc device driver. Isn't that a nice and simple way to write a character driver? Just when you think this challenge is all about writing kernel code, this task is a throwback to your second one. Yes, that's right, building kernels. Turns out that's what most developers end up doing, tons and tons of rebuilds, not writing new code....

May 1, 2023 · 9 min · 1826 words · ayedaemon

Intro to RE: C : A Simple Calculator

We covered a wide range of topics in earlier articles that were helpful in comprehending how many lower-level processes operate. This blog will concentrate on applying those ideas to recreate C program after reverse engineering a simple calculator binary. It is always a good idea to observe how the target software responds to various inputs. This gives you a sense of the internal logic that might be operating. If we run this program without any arguments, we will get an error message stating that we need to pass more arguments as well as the usage guide is printed....

April 3, 2023 · 16 min · 3378 words · ayedaemon

Intro to RE: C : part-3

In the previous blog, I discussed some of the basic C program’s disassembly structures, concentrating on the variables and their memory layouts. This article, a follow-up to the previous one, focuses on basic operations and functions in C programs. In the previous blogs, we have seen what an empty C program looks like void main() {} Disassembly: main: push rbp mov rbp, rsp nop pop rbp ret Arithmatic operators Now if we want to work with operations, we’ll have to add 2 local variables to the function....

April 1, 2023 · 24 min · 4930 words · ayedaemon

Intro to RE: C : part-2

Reverese engineering is a powerful tool for any software developer. However, as with any tool, it is only as good as the person using it. Understanding reverse engineering and how to use it is essential for both novices and seasoned developers. According to wikipedia, Reverse engineering, also called back engineering, is the process by which a man-made object is deconstructed to reveal its designs, architecture, or to extract knowledge from the object; similar to scientific research, the only difference being that scientific research is about a natural phenomenon....

March 19, 2023 · 16 min · 3306 words · ayedaemon