.NET source code security (source code tool is really competitive) (论) (3)

xiaoxiao2021-03-05  27

Above we show the comparison of anti-compilation technology, we clearly saw the power of three tools. From the anti-compilation result from C #, it is undoubtedly the best, it has completely eliminated your source. Exterior leakage.

But C # is just a high-level language. We hope to get a little more, I hope to read the deeper code MSIL, then let us use a variety of tools to get its MSIL code.

The MSIL code of the source file is as follows:

Private instance. Method Private Instance

String

ENCRYPT

String instr) CIL Managed

{

// Code Size: 84 byte (s)

.MAXSTACK 5

.locals

String

Text1,

Int32

Num1,

Int32

Num2,

String

TEXT2,

String

Text3,

Int32

Num3,

Int32

Num4)

L_0000: NOP

L_0001: LDSTR "a # 2151336fdaghksfges"

L_0006: STLOC.3

L_0007: ldarg.1

L_0008: Callvirt Instance

Int32

String ::

Get_length ()

L_000d: STLOC.1

L_000e: ldc.i4.0

L_000f: Stloc.s Num3

L_0011: ldc.i4.0

L_0012: LDLOC.1

L_0013: ldc.i4.1

L_0014: Sub.ovf

L_0015: STLOC.S NUM4

L_0017: STLOC.2

L_0018: Br.s l_0048

L_001a: ldloc.s text3

L_001c: ldarg.1

L_001d: ldloc.2

L_001e: ldc.i4.1

L_001f: Callvirt Instance

String

String ::

Substring

INT32,

INT32)

L_0024: ldloc.3

L_0025: ldloc.s num3

L_0027: ldc.i4.1

L_0028: Callvirt Instance

String

String ::

Substring

INT32,

INT32)

L_002d: Call

String

String ::

CONCAT

String,

String,

String)

L_0032: Stloc.s text3

L_0034: ldloc.s num3

L_0036: ldc.i4.1

L_0037: add.ovf

L_0038: STLOC.S NUM3

L_003a: ldloc.s num3

L_003c: ldc.i4.s 20

L_003e: blt.s l_0043

L_0040: ldc.i4.0

L_0041: STLOC.S NUM3

L_0043: NOP

L_0044: LDLOC.2

L_0045: ldc.i4.1

L_0046: add.ovf

L_0047: STLOC.2

L_0048: ldloc.2

L_0049: ldloc.s num4

L_004b: ble.s l_001a

L_004d: ldloc.s text3

L_004f: ​​STLOC.0

L_0050: Br.s l_0052

L_0052: LDLOC.0

L_0053: Ret

}

Private instance. Method Private Instance

String

REGISTER

String instr) CIL Managed

{

// Code Size: 44 byte (s)

.MAXSTACK 5

.locals

[

Mscorlib]

System.text.asciiencoding

ENCODING1,

[

Mscorlib]

System.security.cryptography.rsacryptoserviceProviderProvider1,

String

TEXT1)

L_0000: NOP

L_0001: Newobj Instance

Void [

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider ::

.ctor ()

L_0006: STLOC.1

L_0007: Newobj Instance

Void [

Mscorlib]

System.text.asciiencoding ::

.ctor ()

L_000c: STLOC.0

L_000d: ldloc.0

L_000e: ldloc.1

L_000f: ldloc.0

L_0010: ldarg.0

L_0011: ldarg.1

L_0012: Callvirt Instance

String

TestRegister.form1 ::

ENCRYPT

String)

L_0017: Callvirt Instance

Unsigned int8 [] []

Mscorlib]

System.text.Encoding ::

Gettes

String)

L_001c: ldc.i4.0

L_001d: Callvirt Instance

Unsigned int8 [] []

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider ::

ENCRYPT

Unsigned int8 [],

BOOL)

L_0022: Callvirt Instance

String [

Mscorlib]

System.text.asciiencoding ::

GetString

unsigned int8 [])

L_0027: STLOC.2

L_0028: Br.s l_002a

L_002a: ldloc.2

L_002b: Ret

}

Dotfuscator Community Edition MSIL

Private instance. Method Private Instance

String

b (

String a_0) CIL Managed

{

// Code Size: 84 byte (s)

.MAXSTACK 5

.locals

String

Text1,

Int32

Num1,

Int32

Num2,

String

TEXT2,

String

Text3,

Int32

Num3,

Int32

Num4)

L_0000: NOP

L_0001: LDSTR "a # 2151336fdaghksfges"

L_0006: STLOC.3

L_0007: ldarg.1

L_0008: Callvirt Instance

Int32

String ::

Get_length ()

L_000d: STLOC.1

L_000e: ldc.i4.0

L_000f: Stloc.s Num3

L_0011: ldc.i4.0

L_0012: LDLOC.1

L_0013: ldc.i4.1

L_0014: Sub.ovf

L_0015: STLOC.S NUM4

L_0017: STLOC.2

L_0018: Br.s l_0048

L_001a: ldloc.s text3

L_001c: ldarg.1

L_001d: ldloc.2

L_001e: ldc.i4.1

L_001f: Callvirt Instance

String

String ::

Substring

INT32,

INT32)

L_0024: ldloc.3

L_0025: ldloc.s num3

L_0027: ldc.i4.1

L_0028: Callvirt InstanceString

String ::

Substring

INT32,

INT32)

L_002d: Call

String

String ::

CONCAT

String,

String,

String)

L_0032: Stloc.s text3

L_0034: ldloc.s num3

L_0036: ldc.i4.1

L_0037: add.ovf

L_0038: STLOC.S NUM3

L_003a: ldloc.s num3

L_003c: ldc.i4.s 20

L_003e: blt.s l_0043

L_0040: ldc.i4.0

L_0041: STLOC.S NUM3

L_0043: NOP

L_0044: LDLOC.2

L_0045: ldc.i4.1

L_0046: add.ovf

L_0047: STLOC.2

L_0048: ldloc.2

L_0049: ldloc.s num4

L_004b: ble.s l_001a

L_004d: ldloc.s text3

L_004f: ​​STLOC.0

L_0050: Br.s l_0052

L_0052: LDLOC.0

L_0053: Ret

}

Private instance. Method Private Instance

String

a

String a_0) CIL Managed

{

// Code Size: 44 byte (s)

.MAXSTACK 5

.locals

[

Mscorlib]

System.text.asciiencoding

ENCODING1,

[

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider

Provider1,

String

TEXT1)

L_0000: NOP

L_0001: Newobj Instance

Void [

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider ::

.ctor ()

L_0006: STLOC.1

L_0007: Newobj Instance

Void [

Mscorlib]

System.text.asciiencoding ::

.ctor ()

L_000c: STLOC.0

L_000d: ldloc.0

L_000e: ldloc.1

L_000f: ldloc.0

L_0010: ldarg.0

L_0011: ldarg.1

L_0012: Callvirt Instance

String

C ::

b (

String)

L_0017: Callvirt Instance

Unsigned int8 [] []

Mscorlib]

System.text.Encoding ::

Gettes

String)

L_001c: ldc.i4.0

L_001d: Callvirt Instance

Unsigned int8 [] []

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider ::

ENCRYPT

Unsigned int8 [],

BOOL)

L_0022: Callvirt Instance

String [

Mscorlib]

System.text.asciiencoding ::

GetString

unsigned int8 [])

L_0027: STLOC.2

L_0028: Br.s l_002a

L_002a: ldloc.2

L_002b: Ret

}

Evaluation:

Still, as the source code is basically ... I don't know what it means to give us this kind of thing.

2. Xeoncode MSIL

Private instanceString

X246B032720DD4C0D (

String x96c91b85a03f00b0) CIL Managed

{

// Code Size: 105 byte (s)

.MAXSTACK 6

.locals

String

Text1,

Int32

Num1,

Int32

Num2,

String

TEXT2,

String

Text3,

Int32

Num3,

Int32

Num4)

L_0000: LDSTR "/ UEC3B / UF2FA / UFA06 / U0102 / U0803 / U0EFC / U15FB / U1CF8 / U23F8 / U2B25 / U3220 / U391A / U401D / U471B / U4E1B / U5520 / U5C10 / U630E / U6A09 / U7114"

L_0005: ldc.i4 281144282

L_000a: Call

String

X2715EFF98365D956.X1110BDD110CDCEA4 ::

_D574BB1A8F3E9CBC (

String,

INT32)

L_000f: Call

String

String ::

INTERN

String)

L_0014: STLOC.3

L_0015: ldarg.1

L_0016: Callvirt Instance

Int32

String ::

Get_length ()

L_001b: STLOC.1

L_001c: ldc.i4.0

L_001d: stloc.s Num3

L_001f: br.s l_0043

L_0021: Stloc.s text3

L_0023: ldloc.s num3

L_0025: Br.s l_0030

L_0027: ldc.i4.s 20

L_0029: blt.s l_0038

L_002b: ldc.i4.0

L_002c: STLOC.S NUM3

L_002e: Br.s l_0038

L_0030: ldc.i4.1

L_0031: add.ovf

L_0032: STLOC.S NUM3

L_0034: ldloc.s num3

L_0036: Br.s l_0027

L_0038: ldloc.2

L_0039: ldc.i4.1

L_003a: add.ovf

L_003b: STLOC.2

L_003c: ldloc.2

L_003d: ldloc.s num4

L_003f: ble.s l_004c

L_0041: Br.s l_0066

L_0043: ldc.i4.0

L_0044: LDLOC.1

L_0045: ldc.i4.1

L_0046: Sub.ovf

L_0047: STLOC.S NUM4

L_0049: STLOC.2

L_004a: Br.s l_003c

L_004c: ldloc.s text3

L_004e: ldarg.1

L_004f: ​​ldloc.2

L_0050: ldc.i4.1

L_0051: Callvirt Instance

String

String ::

Substring

INT32,

INT32)

L_0056: LDLOC.3

L_0057: ldloc.s num3

L_0059: ldc.i4.1

L_005a: Callvirt Instance

String

String ::

Substring

INT32,

INT32)

L_005f: Call

String

String ::

CONCAT

String,

String,

String)

L_0064: Br.s l_0021

L_0066: ldloc.s text3

L_0068: Ret

}

Private instance. Method Private Instance

String

X2A0CB95AB84BA877 (

String X5B3E4CBA383DEDD9) CIL Managed

{

// Code Size: 39 byte (s)

.MAXSTACK 6

.locals

[

Mscorlib]

System.text.asciiencoding

ENCODING1,

[

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider

Provider1,

String

TEXT1)

L_0000: Newobj Instance

Void [

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider ::

.ctor ()

L_0005: STLOC.1

L_0006: Newobj Instance

Void [

Mscorlib]

System.text.asciiencoding ::

.ctor ()

L_000b: STLOC.0

L_000c: ldloc.0

L_000d: ldloc.1

L_000e: ldloc.0

L_000f: ldarg.0

L_0010: ldarg.1

L_0011: Callvirt Instance

String

X9324A7F62E6A3AE4.XAA4F033827D75B4D ::

X246B032720DD4C0D (

String)

L_0016: Callvirt Instance

Unsigned int8 [] []

Mscorlib]

System.text.Encoding ::

Gettes

String)

L_001b: ldc.i4.0

L_001c: Callvirt Instance

Unsigned int8 [] []

Mscorlib]

System.security.cryptography.rsacryptoserviceProvider ::

ENCRYPT

Unsigned int8 [],

BOOL)

L_0021: Callvirt Instance

String [

Mscorlib]

System.text.asciiencoding ::

GetString

unsigned int8 [])

L_0026: Ret

}

Evaluation:

There is a little flower ordered, but in the MSIL state, the logic of the source code is undoubted, and you can read it, not ideal.

3. Maxtocode MSIL

Private instance. Method Private Instance

String

ENCRYPT

String instr) CIL Managed

{

}

Private instance. Method Private Instance

String

REGISTER

String instr) CIL Managed

{

}

Evaluation:

I still can't see the code, I am afraid that it is more than the bottom MSIL. It should be safe.

The above comparison allows you to know more about who is more perfect for your intellectual property protection.

Exclude factors on the code level, let's take a look at other aspects.

to be continued. . .

转载请注明原文地址:https://www.9cbs.com/read-35831.html

New Post(0)