![]() |
|
[C] Best method to generate a lot of random if else and other statements in each build? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] Best method to generate a lot of random if else and other statements in each build? (/showthread.php?tid=6095130) |
Best method to generate a lot of random if else and other statements in each build? - Tr0jandog - Jul 15, 2020 Hello all, Lets say i have written a c/c++ code, i want to build thousands of different versions of this that have a lot of junk code inside them (Currently i compile it using VS but i can move to other compilers if needed) basically i want to insert a lot of random junk but complex code into each of them for example insert an if else statement with random values that i know only one branch is going to execute, and the other branch calls a lot of junk APIs that will never get executed (therefore the IAT changes for each build too) and each of these API calls and values for the if else stuff and their placement need to change each build (therefore making it a complex USG) or insert a switch statement with random cases and values that only one of them going to get executed is there any open-source/leaked project that has implemented this? i have collected a lot of leaked source codes for different crypters over the years and i assume some of the complex USG ones do implement this, anyone has any suggestion? i just want to look at some c/c++ code or even different languages that have implemented something like this Thanks! RE: Best method to generate a lot of random if else and other statements in each build? - spiderfruit - Jul 15, 2020 something like https://github.com/xoreaxeaxeax/movfuscator good luck with 'your' crypter RE: Best method to generate a lot of random if else and other statements in each build? - Xora - Jul 16, 2020 I whipped this up in around 15 mins for you and anyone else who might want to use it. It generates quite a lot of junk code, although it is not that diverse in what the junk does. You open cmd.exe, drag the jnk_gen.exe file into it and give it a number, which will be the number of junk blocks to generate. It will create a junk.h file in the same folder as the jnk_gen.exe file and it will contain macros for different junk code blocks in the format __JUNK_CODE0__, __JUNK_CODE1__, etc. Only add it once at the beginning of a function. Also, if you call that function frequently, it will definitely slow it down a bit. Here is the source and .exe: https://github(dot)com/xora12345/JunkCodeGenerator Also, remember, any kind of junk code will really only stop beginners, especially since they won't be able to decompile your functions in IDA. RE: Best method to generate a lot of random if else and other statements in each build? - Tr0jandog - Jul 17, 2020 (Jul 16, 2020 03:15 AM)Xora Wrote: I whipped this up in around 15 mins for you and anyone else who might want to use it. It generates quite a lot of junk code, although it is not that diverse in what the junk does. Wow thank you for sharing. the code gave me some good ideas also do you know any good leaked USG crypter with source code that does stuff like this too? i have collected a lot of crypter source codes over the years but its hard to check which of them have a good USG RE: Best method to generate a lot of random if else and other statements in each build? - Xora - Jul 18, 2020 (Jul 17, 2020 11:52 PM)Tr0jandog Wrote: Wow thank you for sharing. the code gave me some good ideas I have no clue what USG is. |