Tradecraft Garden
Simple Loader
This project is the "Hello World" of Tradecraft Garden projects. It's a simple DLL loader created by refactoring Stephen Fewer's ReflectiveDLLInjection project.
Project Files
Notes
The loader.c file is the core logic of the project and a good starting place for writing other loaders.
tcg.h is a header for the Tradecraft Garden Library. This library contains functions for DLL loading, PICO running, resolving functions by walking the Export Address Table, and printf()-style debugging.
This project's loader.spec is a good baseline for most projects. It:
- uses
make pic +gofirstto put thego()function at the beginning of the program. - opts the PIC program into Dynamic Function Resolution with the
dfrcommand. This feature has Crystal Palace dynamically insert code to callresolvein loader.c when aMODULE$Function(or GetProcAddress, LoadLibraryA) reference is found. - uses
fixptrswith x86 PIC to fix incomplete pointers--giving us access to linked resources and strings without any special tricks.
License
This project is licensed under the BSD License.