Hack Forums
Self modifying code - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: Self modifying code (/showthread.php?tid=5582966)



Self modifying code - adrianovici - Mar 24, 2017

Hello! I want to create a program which modify it's own code at runtime. I need advices and, if possible, sources from where I can learn how to do it.


* - The2G - Mar 24, 2017

You should first start reading about memory management... Before starting with that hard stuff.


* - 'Axion - Mar 24, 2017

I think you are talking about a polymorphic engine, it changes the code each time it's ran but a vast knowledge about assembly and c++ or maybe c# (but not sure), to be able to achieve this. Also, a polymorphic engine is not the same thing as polymorphism.


* - suffixor - Mar 25, 2017

In windows use the function VirtualAlloc to allocate a Read Write Execute memory page, write your shellcode to this page, modify it, and then call this code.
In *nix you'll use mmap to do the same.

This isn't beginner stuff.