System Programming Blog
2023-02-07 09:31:00
This blog is dedicated to low level programming in Assembler and C/C++ (although, C++ is unwelcome) in either *Nix or Windows based operating systems.
March 6, 2012
A couple of days ago, I saw that someone was looking for a way to load and use fake KERNEL32.dll and I realized that this information has not yet been covered here. There is no source code for this article as I am a bit short on time to write it, but I will do my best to provide as much information as possible so, those who would want to try it would have no problem doing that.
December 9, 2011
I have recently come across the need to build dynamic link libraries with custom ordinal base (different from 1). After searching the net and seeing lots of people writing their own export macros, I came to a conclusion that Occam's Razor principle still works here and decided to make simple modifications to the original export macro provided with FASM package. The modifications are marked with red.
November 26, 2011
In this article I am going to cover such a trivial (as it may seem) subject as DLL
injection. For some reason, most of the tutorials on the web only give us a brief coverage of the topic,
mostly limited to invocation of LoadLibraryA/W Windows API function in the address space of another
process. While this is not bad at all, it gives us the least flexible solution. Meaning that all the logic
MUST be hardcoded in the DLL we want to inject. On the other hand, we may incorporate all the configuration
management (loading config files, parsing thereof, etc) into our DLL. This is better, but still fills it
with code which is only going to run once.
October 4, 2011
At good old times, memory was an expensive resource and developers had to take care of the size of the programs they create. Imagine how hard they had to work before there were high level languages (like C), before compilers became smart enough to handle all size optimization issues. Speed was also among the concerns, as the hardware was not as fast as it is now. Another headache was the need to interact with the underlying operating system. Or, to be more precise, the need to implement the interfaces (at pre-libc times). Modern operating systems provide a built-in mechanism for that. This mechanism is called API - Application Programming Interface. This mechanism is a blessing and curse in one. On one hand it greatly simplifies the interaction with the OS, on the other hand it just makes your software more vulnerable to hackers and/or malware. In some cases the usage of APIs just gets exaggerated.