Government Security
Network Security Resources

Jump to content

Photo

I Am Trying To Write A Polymorphism Engine...

- - - - - windows hacking c++ polymorphism
  • Please log in to reply
No replies to this topic

#1 jeremywildsmith

jeremywildsmith

    Private

  • Members
  • 1 posts

Posted 13 May 2012 - 09:07 AM

I am currently trying to write a polymorphism engine in C++ to toy-around with a neat anti-hacking\cracking idea I have. However, writing the polymorphism engine is proving rather difficult - I haven't even established how I should go about doing it. Here are the steps I was thinking of doing and how I might do them. I am using the x86 instruction set on a windows PE executable btw.

What I have to work with:

*The images PDB file.
*Assembler & disassembler engine of which I have implemented a interface between them which allows to to relocate code etc...

1. Expand instructions
- Find simple instructions like mov, or push and replace them with a couple instructions which achieve the same end though with more instrucitons.
- I plan on doing this just by using a series of translation tables in a database. This shouldn't be very difficult to do.

2. Shuffling
- This is the part I have the most trouble with. I need to isolate the code in to functions. Then I need to establish a series of instruction dependancies trees, and then I need to relocate them based upon which one depend on the other.
- Really, this is the main part of the process I am having trouble with. I know I can run through the code and look for simple things like two mov instructions side-by-side and replace them but I was hoping to do something a bit more elaborate.

3. Compress instructions
- Compress instructions and implement a series of uncommon & obscure instructions in the process.





Also tagged with one or more of these keywords: windows, hacking, c++, polymorphism