![]() |
|
#14
|
|||
|
|||
|
Quote:
Deploy.Net encrypts main assembly, and store it as resource near luncher application. in runtime it decrypts it, and load it form a byte[], one overload of System.Reflection.Assembly.Load can load an assembly from raw data stored in byte array. if you decompile deploy.net with Salamander or Reflector, you can find that decryption routin give a System.IO.MemoryStream and will decrypt it. then it convert it to byte array and pass it to System.Reflection.Assembly.Load. what we need to do is simply: - find the place of calling decryption routin, - Disassemble it with ILDASM: Code:
ildasm.exe /OUT="YourAPP.EXE.il" /TEXT /NOBAR /RAWEH /QUOTEALLNAMES /UTF8 "YourAPP.EXE" Code:
IL_00084: ldstr "c:\\decryptedAssembly.EXE"
IL_000d4: ldc.i4.2
IL_000e4: newobj instance void ['mscorlib']'System.IO'.'FileStream'::.ctor(string,
valuetype ['mscorlib']'System.IO'.'FileMode')
IL_00134: stloc.s V_21
IL_00144: ldloc.s V_20
IL_00154: ldloc.s V_21
IL_00164: callvirt instance void ['mscorlib']'System.IO'.'MemoryStream'::'WriteTo'(class ['mscorlib']'System.IO'.'Stream')
IL_001b4: ldloc.s V_21
IL_001c4: callvirt instance void ['mscorlib']'System.IO'.'Stream'::'Flush'()
IL_00214: ldloc.s V_21
IL_00224: callvirt instance void ['mscorlib']'System.IO'.'Stream'::'Close'()
Code:
class ['mscorlib']'System.IO'.'FileStream' V_21 3. Recompile IL code with ILASM : Code:
ilasm.exe /OUTPUT="YourAPP.EXE" /nologo /quiet /resource="YourAPP.EXE.res" "YourAPP.EXE.il" and you have decrypted assembly without wrapper. -ByteXorer Last edited by bytexorer; 06-02-2005 at 00:51. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sys packer | emptyHook | General Discussion | 6 | 07-24-2012 19:46 |
| Another .NET packer | SystemeD | General Discussion | 5 | 09-19-2005 22:04 |
| What packer would you use | Fade | General Discussion | 35 | 04-03-2004 12:01 |