Ayedaemon

An Information Security Engineer from India who is interested in DevOps culture and Security that isn’t based on Excel.

ELF Chronicles: Program Headers

In preceding articles, we’ve delved into the details of ELF file headers and section headers. Section headers provide insight into how data and instructions are organized based on their characteristics and grouped into distinct sections. These sections remain distinct due to variations in their types and permissions (… and few other things). Up to this point, our focus has been on the aspects of the ELF file as it resides on-disk....

October 20, 2023 · 10 min · 2040 words · ayedaemon

ELF Chronicles: Section Headers

Intro Assuming you’ve got ELF headers like Elf64_Ehdr or Elf32_Ehdr at your fingertips, and you’re armed with the know-how and tools to decipher their contents effortlessly. For this article I’ll be using the below C code to generate the ELF file. /* file: hello_world.c */ #include <stdio.h> // A macro #define HELLO_MSG1 "Hello World1" // A global variable char HELLO_MSG2[] = "Hello World2"; // main function int main() { // local variable for main char HELLO_MSG3[] = "Hello World3"; // Print messages printf("%s\n", HELLO_MSG1); printf("%s\n", HELLO_MSG2); printf("%s\n", HELLO_MSG3); return 0; } You can get the ELF binary by compiling this code....

October 19, 2023 · 18 min · 3758 words · ayedaemon

ELF Chronicles: ELF file Header

Hexdumps In the fascinating world of computers, we’re stuck conversing in binary, a rather dull language of just ones and zeros. But because we mere humans love things to be a tad more exciting and concise, we’ve come up with our own nifty number system - “hexadecimal” or “hex” for short. This system ditches the binary bore and adds a touch of flair with 16 snazzy symbols. It’s got your usual digits from 0 to 9, plus those fancy A to F letters to make data a bit more, well, hexadecimal-chic!...

October 18, 2023 · 11 min · 2175 words · ayedaemon

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