Skip to content

alnumdot/SectionCrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SectionCrypt

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

what it does

  1. creates custom sections starting with a - instead of . (for example -nutext or -nudata)
  2. custom sections get encrypted by Post-Build program (post_encrypt.exe)
  3. section names get their - with . replaced (for example .nutext or .nudata)
  4. program with encrypted sections holds functions to decrypt its own sections using a key that preffereably comes from server-side
  5. 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

what it achieves

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.

Preview

unencrypted

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

encrypted

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

About

Runtime and Post-Build code to decrypt/encrypt PE sections, by preferably using backend stored keys

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages