Note that there are some explanatory texts on larger screens.

plurals
  1. POI need help developing a polymorphism engine - instruction dependency trees
    primarykey
    data
    text
    <p>I am currently trying to write a polymorphism engine in C++ to toy-around with a neat anti-hacking stay-alive checking idea I have. However, writing the polymorphism engine is proving rather difficult - I haven't even established how I should go about doing it. The idea is to stream executable code to the user (that is the application I am protecting) and occasionally send them some code that runs some checksums on the memory image and returns it to the server. The problem is that I don't want someone to simply hijack or programatically crack the stay-alive check; instead each one would be generated on the server working off of a simple stub of code and running it through a polymorphism engine. Each stay-alive check would return a value dependant on the check-sum of the data and a random algorithm sneaked inside of the stay-alive check. If the stub returns incorrectly, I know that the stay-alive check has been tampered with.</p> <p>What I have to work with:</p> <p>*The executable images PDB file. *Assembler &amp; disassembler engine of which I have implemented a interface between them which allows to to relocate code etc...</p> <p>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</p> <p>Steps I plan on taking(My problem is with step 2):</p> <ol> <li><p>Expand instructions</p> <ul> <li>Find simple instructions like mov, or push and replace them with a couple instructions which achieve the same end though with more instructions. In this step I'll also add loads of junk-code.</li> <li>I plan on doing this just by using a series of translation tables in a database. This shouldn't be very difficult to do. </li> </ul></li> <li><p>Shuffling</p> <ul> <li>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. I can find functions by parsing the pdb files, but creating instruction dependancy trees is the tricky part I am totally lost on.</li> </ul></li> <li><p>Compress instructions</p> <ul> <li>Compress instructions and implement a series of uncommon &amp; obscure instructions in the process. And, like the first step, do this by using a database of code signatures.</li> </ul></li> </ol> <p>To clarify again, I need help performing step number 2 and am unsure how I should even begin. I have tried making some diagrams but they become very confusing to follow.</p> <p>OH: And obviously the protected code is not going to be very optimal - but this is just a security project I wanted to play with for school.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload