Visual SVN cracking method

The first step is to prepare the disassembly tool ildasm.exe, find the installation path of VisualSVN, and generally back up first, and operate in the backup.

Step 2: dump and get the IL file with the same name: Open the obtained file with Notepad, search for "KeyToLicenseUnsafe" and find the KeyToLicenseUnsafe method, which is about 3296 lines. Find and replace with the following code and save

.method public hidebysig static class VisualSVN.Core.Licensing.License
          KeyToLicenseUnsafe(class VisualSVN.Core.IDecoder decoder,
                             string key) cil managed
    // Code size       Sixty-nine (0x45)
    .locals init (class VisualSVN.Core.Licensing.License V_0, class VisualSVN.Core.Licensing.License V_1, class VisualSVN.Core.Licensing.License V_2)
    IL_0000: nop
    IL_0001: newobj instance void VisualSVN.Core.Licensing.License::.ctor()
    IL_0006: stloc.1
    IL_0007: ldloc.1
    IL_0008: ldsfld valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::MinValue
    IL_000d: stfld valuetype [mscorlib]System.DateTime VisualSVN.Core.Licensing.License::StartTime
    IL_0012: ldloc.1
    IL_0013: ldc.i4.1
    IL_0014: stfld valuetype VisualSVN.Core.Licensing.LicenseBinding VisualSVN.Core.Licensing.License::Binding
    IL_0019: ldloc.1
    IL_001a: ldc.i4 0x7ffffffe
    IL_001f: stfld int32 VisualSVN.Core.Licensing.License::Capacity
    IL_0024: ldloc.1
    IL_0025: ldsfld valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::MaxValue
    IL_002a: stfld valuetype [mscorlib]System.DateTime VisualSVN.Core.Licensing.License::EndTime
    IL_002f: ldloc.1
    IL_0030: ldc.i4.2
    IL_0031: stfld valuetype VisualSVN.Core.Licensing.LicenseType VisualSVN.Core.Licensing.License::Type
    IL_0036: ldloc.1
    IL_0037: ldstr "100"
    IL_003c: stfld string VisualSVN.Core.Licensing.License::PurchaseId
    IL_0041: ldloc.1
    IL_0042: call string [mscorlib]System.Environment::get_UserName()
    IL_0047: stfld string VisualSVN.Core.Licensing.License::LicensedTo
    IL_004c: ldloc.1
    IL_004d: stloc.0
    IL_004e: ldloc.0
    IL_004f: ldloc.0
    IL_0050: ldfld valuetype [mscorlib]System.DateTime VisualSVN.Core.Licensing.License::StartTime
    IL_0055: stfld valuetype [mscorlib]System.DateTime VisualSVN.Core.Licensing.License::PurchaseDate
    IL_005a: ldloc.0
    IL_005b: stloc.2
    IL_005c: br.s
    IL_005f: ret
  } // end of method LicenseConverter::KeyToLicenseUnsafe

Step 3: use the command prompt of vs2015 developer, and then overwrite it to bin directory


Use vs2015 developer command prompt to run the following code (replace with your own)

ilasm "C:\Program Files (x86)\VisualSVN\bins\" /output="C:\Program Files (x86)\VisualSVN\bins\VisualSVN.Core.L.dll" /dll

See the following interface

It indicates that the compilation is successful, and then the compiled VisualSVN.Core.L.dll is overwritten to the bin directory to complete the cracking.

Tags: C#

Posted on Mon, 02 Dec 2019 06:13:17 -0800 by rami103