Runtime and Post-Build code to decrypt/encrypt PE sections, by preferably using backend stored keys
this is a PoC i made in around 2 hours so please don't be too harsh about my code
- creates custom sections starting with a - instead of . (for example -nutext or -nudata)
- custom sections get encrypted by Post-Build program (post_encrypt.exe)
- section names get their - with . replaced (for example .nutext or .nudata)
- program with encrypted sections holds functions to decrypt its own sections using a key that preffereably comes from server-side
- decrypted sections can be used now (could be a problem with relocations, havent tried yet)
don't forget to turn optimisations off, not sure if thats already possible using the section creations though
it's two applications, example_project would be the production software which has a code or data section that we would want to hide.
we then wait until the user authorizes so we know if he is allowed to see such sections.
the server would then send the decrpytion key and the section gets decrypted.
the other software encrypts out sections right after we build our main project.
i added Post-Build options to this VS project to make it achieve what i want without having to start anything else than the compilation
please have a look at the code yourself, i am bad at explaining.

i included the pdb into my disassembler, that's why there are function names visible

i included the pdb into my disassembler, that's why there are function names visible