Hack Forums
[C#] two question about crypter. load exe, replace ? asm load ? - 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#] two question about crypter. load exe, replace ? asm load ? (/showthread.php?tid=5523303)



two question about crypter. load exe, replace ? asm load ? - mfqn - Jan 14, 2017

sorry im very noob and bad english.

1st question,,,
i making crypter.
made stub.exe. In code,
ex: decrypt("<pw>");
i want replace "<pw>" to decrypt password.
load stub, encrypt with password, in stub replace
some "<>" to encrypt payload and decrypt password and more, output crypted.exe

how do replace ? good idea ?

2nd question,,,
public crypter re-fuding, stub txt + runpe dll compile.
hard for me re-fuding...already change
  • name(function, string)

  • icon

  • asm info

  • source method

  • encryption and compress
    and, in

  • some fake if()

  • fake function

  • some junk comment


crypted.exe detect 12.

i heard loading assembly some way.
i know assembly.load, appdomain.currentdomain.load .
another way ... ? Help me ; - ;

sorry very bad english...
thanks.


* - iNCEPTiON_V - Jan 14, 2017

(Jan 14, 2017 08:40 AM)mfqn Wrote:  sorry im very noob and bad english.
how do replace ? good idea ?

Code
string.Replace("<pw>", string);

Try to comment your code out
till you see improvements and then you fix them by thinking of another way to solve the problem, be creative!


* - mfqn - Jan 14, 2017

(Jan 14, 2017 10:23 AM)iNCEPTiON_V Wrote:  
Code
string.Replace("<pw>", string);

Try to comment your code out
till you see improvements and then you fix them by thinking of another way to solve the problem, be creative!

yes, i know string.Replace

Code
byte[] stub = ...skip
string str = System.Text.Encoding.UTF8.GetString(stub);
after convert, string.Replace ?


* - warpje - Jan 14, 2017

You could use reflection for this kinda things!


* - Hoody - Jan 14, 2017

Question 1: To do the method you mentioned, use string.Replace(). Here's an example
Code
string source = "source code blah blah <value>";
string value = "blah";
source = source.Replace("<value", value);
// source is now "source code blah blah blah"

But i would challenge you to be a little more... crafty with it

Question 2: Okay.. If there's too many lines in your code it becomes harder to fud. When this happens, your best bet is to switch to a loader. Loaders are meant to be minimalistic and thus easier to refud. The loader simply loads up your main stub, then you can run everything the way it already is in the stub. If its just one function thats causing the problem, look into reflecting single functions, i remember that doing well against avs.