Cracking .NETZ executables

.NETZ is a free open source tool that compresses and packs the Microsoft .NET Framework executable (EXE, DLL) files in order to make them smaller. Smaller executables consume less disk space and load faster because of fewer disk accesses.

Today we are going to show you how to extract assemblies from them, so we can crack them!

First, we use reflector to save the resources to a folder. Right-click on the zip.dll and choose Save As… Then do the same for the guid resource.

Saving resource from reflector

Then, in reflector, we find the unzip method. It’s in the namespace netz.NetzStarter.Unzip(data() as byte)

So we copy that code to the clipboard, and fire up Visual Studio and make a new console app.

Paste the unzip code to the module, and add namespaces at the top:

Imports System.IO
Imports ICSharpCode.SharpZipLib.Zip.Compression.Streams

Then we add the following code to the Main() sub.

Sub Main()
    Dim folder As String = "C:\Cracked\Files"
    ' This is the name of the resource we took from
    ' reflector.
    Dim bFile As String = _
    	System.IO.Path.Combine(folder, "A6C24BF5-3690-4982-887E-11E1B159B249")
    Dim b() As Byte = My.Computer.FileSystem.ReadAllBytes(bFile)

    ' Attach a .exe to the end of the string
    bFile += ".exe"
    ' write the bytes to the file.
    Using ms As MemoryStream = UnZip(b)
        Dim outBytes() As Byte = ms.GetBuffer
        My.Computer.FileSystem.WriteAllBytes(bFile, outBytes, False)
    End Using
End Sub

And run it. It should make an executable file in the same folder… Happy cracking!



kick it on DotNetKicks.com
6. March 2009 11:11 by Rick | Comments (2) | Permalink

Comments

About Rick

Rick lives in North Las Vegas. He loves his wife, kids, dog, motorcycle, music and programming. There ain't nothing else. Oh yeah, mountain dew!



Programming interests are geared towards multimedia. Platforms are asp.net, windows forms, and WPF.

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

RecentComments

Comment RSS