2
I need to store a file, no matter its extension (it’s mainly an Executable) within another executable.
It’s just, I’m compiling with Codedom an executable that inside it there is a file "special" and encrypted, when executing the executable all magic is done. But the problem with this magic is the way I’m saving bytes
of the magic archive m within the executable x.
I want to put the bytes in the file m inside the archive x literally.
I did the following, in the pre-Compiler, I made a method static which already automatically returns the file bytes m, but to have done so, it was necessary to insert byte per byte within the code, I did a huge scam to do this, but it worked. For example, I wrote a program of Hello World in C# and took the bytes of this file and compiled inside another executable, like a container of files.
When I decompiled the output executable, I got a huge list of encrypted bytes, and I’m not sure that’s good practice. Follow the image of how it looked:
It’s kind of a constant thing, no?
Summary of the question
I wonder, if there is any way to implement bytes of a file without using literal values, or not declaring a variable to store huge amounts of bytes, as I did in the example above.
If you can’t do that, those lists have limits on how many bytes I can put in them?
To get an idea, that method returned about 200MB.
Interesting fact: Why do you want to ship a file inside a executable? What problem are you trying to solve with this?
– Thiago Lunardi
I am creating a way to place an encrypted executable inside the executable container, when running the file, the original executable is decrypted and runs. It’s a decompile bypass strategy.
– CypherPotato
But for this there is the technique of obfuscation. Does not meet?
– Thiago Lunardi
Not exactly. Because I need to create an instance of Assembly container.
– CypherPotato