Reading files the hard way - Part 2 (x86 asm, linux kernel)
Reading files the hard way: Part 2
Looking at that latest mental model, it's.. a bit suspicious that every program ends up calling the same set of functions. It's almost like something different happens when calling...
Consuming Ethernet frames with the nom crate
Making our own ping: Part 9
Now that we've found the best way to find the “default network interface”… what can we do with that interface?
Well, listen for network traffic of course!
What's in a Linux executable?
Making our own executable packer: Part 1
Executables have been fascinating to me ever since I discovered, as a kid, that they were just files. If you renamed a
.exeto something else, you could open it in notepad! And if...
Running an executable without exec
Making our own executable packer: Part 2
In part 1, we've looked at three executables:
sample, an assembly program that prints “hi there” using the
entry_point, a C program that prints the...
Making our own executable packer: Part 3
In the last article, we found where code was hiding in our
samples/helloexecutable, by disassembling the whole file and then looking for syscalls.
Later on, we learned how to...
Making our own executable packer: Part 4
The last article, Position-independent code, was a mess. But who could blame us? We looked at the world, and found it to be a chaotic and seemingly nonsensical place. So, in order...
The simplest shared library
Making our own executable packer: Part 5
In our last article, we managed to load and execute a PIE (position-independent executable) compiled from the following code:
; in `elk/samples/hello.asm` global _start...
Loading multiple ELF objects
Making our own executable packer: Part 6
Up until now, we've been loading a single ELF file, and there wasn't much structure to how we did it: everyhing just kinda happened in
main, in no particular order.
But now that...
Dynamic symbol resolution
Making our own executable packer: Part 7
Let's pick up where we left off: we had just taught
elkto load not only an executable, but also its dependencies, and then their dependencies as well.
We discovered that
Dynamic linker speed and correctness
Making our own executable packer: Part 8
In the last article, we managed to load a program (
hello-dl) that uses a single dynamic library (
libmsg.so) containing a single exported symbol,
More ELF relocations
Making our own executable packer: Part 11
In our last installment of “Making our own executable packer”, we did some code cleanups. We got rid of a bunch of
unsafecode, and found a way to represent...
A no_std Rust binary
Making our own executable packer: Part 12
In Part 11, we spent some time clarifying mechanisms we had previously glossed over: how variables and functions from other ELF objects were accessed at runtime.
We saw that doing...
Making our own executable packer: Part 13
Welcome back and thanks for joining us for the reads notes… the thirteenth installment of our series on ELF files, what they are, what they can do, what does the dynamic...