Hack Forums
[C] Junk code generator | Great for crypters - 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] Junk code generator | Great for crypters (/showthread.php?tid=6057143)



Junk code generator | Great for crypters - stringsnstuff - Mar 15, 2020

Hello I've made a junk code generator in C++. It uses curl includes/libraries. This grabs junk code from junkcode.gehaxelt.in. The reason this is good is so you don't have to manually create text files and paste the junk code in. This program automatically downloads junk code and pastes the code into a text file.

Source: mega.nz/#!3IEmiKZZ!dxYrxK48keu36JIGgSIBvdYHMYuDz7zAnoJDzU6ONjI
Password: forhf

Compiled using Visual Studio 2019 (v142) 10.0.18362.0

Youtube video: /watch?v=MyFH0YSPQu8


RE: Junk code generator | Great for crypters - morph - Mar 15, 2020

"Great for crypters"
idk about that man


RE: Junk code generator | Great for crypters - stringsnstuff - Mar 15, 2020

(Mar 15, 2020 09:01 AM)morph Wrote:  "Great for crypters"
idk about that man
Heuristic analysis is what throws the majority of code into the 'virus' state. If a crypter utilizes junk code properly and their junk code has usable functions, which this does, then their stub will have a higher chance to pass the heuristic analysis detection and also makes the signature unique from other 'viruses' if the junk code has usable functions and statements throughout the main function and runpe/loadpe function.


RE: Junk code generator | Great for crypters - morph - Mar 15, 2020

(Mar 15, 2020 09:09 AM)stringsnstuff Wrote:  Heuristic analysis is what throws the majority of code into the 'virus' state. If a crypter utilizes junk code properly and their junk code has usable functions, which this does, then their stub will have a higher chance to pass the heuristic analysis detection and also makes the signature unique from other 'viruses' if the junk code has usable functions and statements throughout the main function and runpe/loadpe function.

It's not useless, but I would rather not just paste it in the project and rebuild each time. A metamorphic engine with some methods of throwing of heuristic analysis would better suit the purpose IMO


RE: Junk code generator | Great for crypters - Goku - Mar 15, 2020

(Mar 15, 2020 09:58 AM)morph Wrote:  It's not useless, but I would rather not just paste it in the project and rebuild each time. A metamorphic engine with some methods of throwing of heuristic analysis would better suit the purpose IMO

This reminds me how similar real life viruses are with the viruses you guys create 🙃


RE: Junk code generator | Great for crypters - morph - Mar 15, 2020

(Mar 15, 2020 10:01 AM)Goku Wrote:  This reminds me how similar real life viruses are with the viruses you guys create 🙃

actually, I'm not going to use mine for viruses, only game cheats :p


RE: Junk code generator | Great for crypters - Goku - Mar 15, 2020

(Mar 15, 2020 10:12 AM)morph Wrote:  actually, I'm not going to use mine for viruses, only game cheats :p

haha, I should have put 'virus' between quotes.

Nonetheless, I can appreciate the adroitness 😆


RE: Junk code generator | Great for crypters - stringsnstuff - Mar 15, 2020

(Mar 15, 2020 10:12 AM)morph Wrote:  It's not useless, but I would rather not just paste it in the project and rebuild each time. A metamorphic engine with some methods of throwing of heuristic analysis would better suit the purpose IMO
No doubt a polymorphic crypter would pass heuristic analysis. I never said it wouldn't. What your doing is this, I'm giving out $1, and your saying $1 million dollars is worth more than $1. Of course it is. Not everyone is going to have access to top of the line programs with polymorphic engines.


RE: Junk code generator | Great for crypters - HFDone - Mar 15, 2020

184M to download string and write it to text
why using curl lib when you can simply using URLDownloadToFile


RE: Junk code generator | Great for crypters - stringsnstuff - Mar 15, 2020

(Mar 15, 2020 12:43 PM)HFDone Wrote:  184M to download string and write it to text
why using curl lib when you can simply using URLDownloadToFile

In this situation curl offers more flexibility because URLDownloadToFile only downloads the web page and there isn't any room for editing. If you look at the source code on junkcode.gehaxelt.in you can see that HTML isn't supporting the brackets and quotes and they have to use dereferencing variables to support the brackets and quotations. So I have to download the information using cURL then edit the parts that are not supporting brackets and different characters and replace them with correct information.

Code
                findAndReplaceAll(contents, "&lt;", "<");
                findAndReplaceAll(contents, "&gt;", ">");
                findAndReplaceAll(contents, "&quot;", " \" ");
                findAndReplaceAll(contents, "</pre></code>", " ");
                findAndReplaceAll(contents, "<code><pre>", " ");
                findAndReplaceAll(contents, "</pre></code><br><br><code><pre>", " ");
                findAndReplaceAll(contents, "<br><br>", " ");

URLDownloadToFile is a one way street and doesn't offer enough flexibility for what I need in order to accomplish the task.

findAndReplaceAll function
Code
void findAndReplaceAll(std::string& data, std::string toSearch, std::string replaceStr)
{
    // Get the first occurrence
    size_t pos = data.find(toSearch);

    // Repeat till end is reached
    while (pos != std::string::npos)
    {
        // Replace this occurrence of Sub String
        data.replace(pos, toSearch.size(), replaceStr);
        // Get the next occurrence from the current position
        pos = data.find(toSearch, pos + replaceStr.size());
    }
}



RE: Junk code generator | Great for crypters - HFDone - Mar 15, 2020

i thought you would understand that you better download the text file then html string (replace it) and write to text file
put your code in junkcode.gehaxelt.in/junkcode.txt and use URLDownloadToFile


RE: Junk code generator | Great for crypters - stringsnstuff - Mar 15, 2020

(Mar 15, 2020 01:51 PM)HFDone Wrote:  i thought you would understand that you better download the text file then html string (replace it) and write to text file
put your code in junkcode.gehaxelt.in/junkcode.txt and use URLDownloadToFile
There are a variety of different ways I could have done the task, but I picked curl. If you don't like it then don't download it.


RE: Junk code generator | Great for crypters - HFDone - Mar 15, 2020

why you think im wasting my time to reply
Hint 184M
with URLDownloadToFile 2K
good luck


RE: Junk code generator | Great for crypters - Klonopin - Mar 16, 2020

(Mar 15, 2020 08:57 AM)stringsnstuff Wrote:  Hello I've made a junk code generator in C++. It uses curl includes/libraries. This grabs junk code from junkcode.gehaxelt.in. The reason this is good is so you don't have to manually create text files and paste the junk code in. This program automatically downloads junk code and pastes the code into a text file.

Source: mega.nz/#!3IEmiKZZ!dxYrxK48keu36JIGgSIBvdYHMYuDz7zAnoJDzU6ONjI
Password: forhf

Compiled using Visual Studio 2019 (v142) 10.0.18362.0

Youtube video: /watch?v=MyFH0YSPQu8

Made one years ago heres the link if you wanna check it out! https://repl.it/@Eyesoftware/junkiecodie

its pretty bad lmfao but it used to work well.