𓆣 𝔗̶𝔢̶𝔱̶𝔰̶𝔱̶𝔞̶𝔠̶𝔨̶ 𓆣
107 subscribers
176 photos
2 videos
4 files
43 links
Download Telegram
and now we define the first header to identify the bytes

Elf64_Ehdr
As every linux binary start with magic bytes 0x7F, E, L, F
why from EI_MAG0 TO 3 it is already defined here
we use e_shnum executable section header number for dynamic memory allocation and safe disk bounds
I hate this pc so much, i can't even type with this cold
the project is close to done, now i need to test it before that make the MakeFile then after testing the Readme.md and .gitignore file before making it public
ignore the errors google cloud shell have clang installed in default and well it is blind to which c++ i am using but i can build the files so i am okay to go.
worked to well or basically missed it, modern linux there are two systems PIE (position independent executable) and ASLR (Address Space layout randomization) which randomize the stack where the assembly code for our case is executed which is 0x5a38a5f1e009 but basically the runtime would have usually started from 0x00000000 or lower fixed number.
So basically in assembly the top of the stack is the lowest address and the bottom of the stack is the highest address
𓆣 𝔗̶𝔢̶𝔱̶𝔰̶𝔱̶𝔞̶𝔠̶𝔨̶ 𓆣
So basically in assembly the top of the stack is the lowest address and the bottom of the stack is the highest address
High Addresses (e.g., 0x7FFFFFF.....)
|
|--- [Stack Bottom] (Where the stack began)
| |
| | (Grows Downward as data is pushed)
| v
|--- [Stack Top] (Where %esp / %rsp points - LOWEST address in the stack)
|
| Unallocated Shared Memory Space
|
|--- [Heap Top] (Grows Upward as memory is malloc'd)
| ^
| |
|--- [Heap Bottom]
|
Low Addresses (e.g., 0x0000000.....)