Lollercaust in Philadelphia

This is an excerpt of a trip report I made for a business trip to Pottstown, PA in 2006. I really wish I had pictures to go along with this, but I think the prose does a decent job at documenting the insanity of it all.

C++ Functor to C Function Pointer Conversion

Pop quiz hotshot: You're on a bus with no Internet connection. You absolutely need to interface some new C++ code with a shoddy old C interface based on function pointers. The new C++ code makes heavy use of functors to carry state between call invocations. The C code must call these C++ functors by way of a function pointer, and only a function pointer. Your function pointer prototype cannot take any additional arguments for the class type. What do you do? What do you do...


The point of this project was to write platform independent stack overflow shellcode using only a C compiler and no asm. I succeeded, almost. The compiled autocode.c file disassembles itself, and outputs working shellcode. However, the major drawback is that on x86 it doesn't seem possible to eliminate the 0's from the resulting instructions. I attempted to fix this by adding an XOR encoder, but the problem is even that contained 0's when it attempted to obtain EIP through the usual call mechanism. The offset to the relative call instruction contained 0s.. Oh well. It was a fun exercise.

Strange Attractors

This is another project inspired by the PosterChildren. I was listening to their song by the same name, and decided I felt like coding a visualization program for the Lorentz Strange Attractors. I also wanted to brush up on my NDE skillz, and so I implemented a vectorized 4th-order Runge-Kutta solver to plot the thing. This was actually a pretty ridiculous idea. I think I was on drugs or something.

Syndicate content