Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired

    Exclamation [Article]Obfuscation[Tutorial]

    Hey VB community, doesn't it piss you off when you spend several hours on a 10,000-line project and some 10-year-old "programmer" disassembles your masterpiece, stealing your code?

    Don't worry, Mr. Laugh Out Loud Land is here!

    Protecting your work and your code is extremely important when releasing a program, because you never want to see your hard work be stolen, do you?

    To do this there are several methods of protection, but we'll be focusing on one today: Obfuscating.

    What is Obfuscation?

    Obfuscation dates back to the Roman era, where Roman soldiers would use different encryptions and codes to send messages safely with messengers, between different people and troops, in exemplar:

    The troops arrive at midnight.

    May turn into:

    The chicken laid four golden eggs.

    When it comes to software, obfuscation is used essentially the same way.

    Obfuscating software is essentially decompiling, scrambling source code into random letters and number sequences (A.K.A. encryption), and recompiling of the software, making the product close to (if not) impossible to understand.

    Why would this be important? Well here's an example of my source code for a project I disassembled with Red Gate's .NET Reflector:

    Code:
        Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs)
            Me.Label1.Text = Conversions.ToString(CDbl((Conversions.ToDouble(Me  .Label1.Text) + 1)))
            Interaction.Shell("NET START DHCP", AppWinStyle.Hide, False, -1)
            If (Me.Label1.Text = Me.TextBox1.Text) Then
                Interaction.Shell("NET STOP DHCP", AppWinStyle.Hide, False, -1)
                Me.Label1.Text = Conversions.ToString(0)
                Me.Timer1.Stop
            End If
        End Sub
    This is my exact original coding.

    But after I obfuscated it with Dotfuscator Gold...

    Code:
    <GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.Se  ttingsSingleFileGenerator", "9.0.0.0"), EditorBrowsable(EditorBrowsableState.Advanced), CompilerGenerated> _
    Friend NotInheritable Class A
        Inherits ApplicationSettingsBase
        ' Methods
        Shared Sub New()
        <DebuggerNonUserCode> _
        Public Sub New()
        Public Shared Function A() As A
        <EditorBrowsable(EditorBrowsableState.Advanced), DebuggerNonUserCode> _
        Private Shared Sub A(ByVal A_0 As Object, ByVal A_1 As EventArgs)
    
        ' Fields
        Private Shared A As A
        Private Shared A As Boolean
        Private Shared A As Object
    End Class
    
    <DesignerGenerated> _
    Public Class B
        Inherits Form
        ' Methods
        <DebuggerNonUserCode> _
        Shared Sub New()
        <DebuggerNonUserCode> _
        Public Sub New()
        <DebuggerStepThrough> _
        Private Sub A()
        <DebuggerNonUserCode> _
        Friend Overridable Function A() As Button
        <DebuggerNonUserCode> _
        Friend Overridable Function A() As Label
        <DebuggerNonUserCode> _
        Friend Overridable Function A() As TextBox
        <DebuggerNonUserCode> _
        Friend Overridable Function A() As Timer
        <DebuggerNonUserCode> _
        Protected Overrides Sub A(ByVal A_0 As Boolean) Implements Form.Dispose
        <MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
        Friend Overridable Sub A(ByVal A_0 As Button)
        <MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
        Friend Overridable Sub A(ByVal A_0 As Label)
        <MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
        Friend Overridable Sub A(ByVal A_0 As TextBox)
        <MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode> _
        Friend Overridable Sub A(ByVal A_0 As Timer)
        Private Sub A(ByVal A_0 As Object, ByVal A_1 As EventArgs)
        Private Sub B(ByVal A_0 As Object, ByVal A_1 As EventArgs)
    
        ' Fields
        Private Shared A As List(Of WeakReference)
        Private A As IContainer
        Private A As Button
        Private A As Label
        Private A As TextBox
        Private A As Timer
    End Class
    
    <StandardModule, HideModuleName, DebuggerNonUserCode, GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilde  r", "2.0.0.0"), CompilerGenerated> _
    Friend NotInheritable Class C
        ' Methods
        Friend Shared Function A() As CultureInfo
        Friend Shared Function A() As ResourceManager
        Friend Shared Sub A(ByVal A_0 As CultureInfo)
    
        ' Fields
        Private Shared A As CultureInfo
        Private Shared A As ResourceManager
    End Class
    
    <GeneratedCode("MyTemplate", "8.0.0.0"), StandardModule, HideModuleName> _
    Friend NotInheritable Class D
        ' Methods
        <DebuggerNonUserCode> _
        Shared Sub New()
        <DebuggerHidden> _
        Friend Shared Function A() As B
        <DebuggerHidden> _
        Friend Shared Function A() As C
        <DebuggerHidden> _
        Friend Shared Function A() As E
        <DebuggerHidden> _
        Friend Shared Function A() As F
        <DebuggerHidden> _
        Friend Shared Function A() As User
    
        ' Fields
        Private Shared ReadOnly A As A(Of B)
        Private Shared A As A(Of C)
        Private Shared ReadOnly A As A(Of E)
        Private Shared ReadOnly A As A(Of F)
        Private Shared ReadOnly A As A(Of User)
    
        ' Nested Types
        <ComVisible(False), EditorBrowsable(EditorBrowsableState.Never)> _
        Friend NotInheritable Class A(Of A As New)
            ' Methods
            <DebuggerHidden, EditorBrowsable(EditorBrowsableState.Never)> _
            Public Sub New()
            <DebuggerHidden> _
            Friend Function A() As A
    
            ' Fields
            <ThreadStatic, CompilerGenerated> _
            Private Shared A As A
        End Class
    
        <EditorBrowsable(EditorBrowsableState.Never), MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtoc  ol", "Create__Instance__", "Dispose__Instance__", "")> _
        Friend NotInheritable Class B
            ' Methods
            <DebuggerHidden, EditorBrowsable(EditorBrowsableState.Never)> _
            Public Sub New()
            <DebuggerHidden, EditorBrowsable(EditorBrowsableState.Never)> _
            Public Overrides Function A() As Integer Implements Object.GetHashCode
            <DebuggerHidden, EditorBrowsable(EditorBrowsableState.Never)> _
            Public Overrides Function A() As String Implements Object.ToString
            <EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden> _
            Friend Function A() As Type
            <DebuggerHidden> _
            Private Shared Function A(Of A As New)(ByVal A_0 As A) As A
            <DebuggerHidden> _
            Private Sub A(Of A)(ByRef A_0 As A)
            <DebuggerHidden, EditorBrowsable(EditorBrowsableState.Never)> _
            Public Overrides Function A(ByVal A_0 As Object) As Boolean Implements Object.Equals
        End Class
    
        <EditorBrowsable(EditorBrowsableState.Never), MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")> _
        Friend NotInheritable Class C
            ' Methods
            <EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden> _
            Public Sub New()
            <DebuggerNonUserCode> _
            Public Function A() As B
            <EditorBrowsable(EditorBrowsableState.Never)> _
            Public Overrides Function A() As Integer Implements Object.GetHashCode
            <EditorBrowsable(EditorBrowsableState.Never)> _
            Public Overrides Function A() As String Implements Object.ToString
            <EditorBrowsable(EditorBrowsableState.Never)> _
            Friend Function A() As Type
            <DebuggerHidden> _
            Private Sub A(Of A As Form)(ByRef A_0 As A)
            <DebuggerNonUserCode> _
            Public Sub A(ByVal A_0 As B)
            <EditorBrowsable(EditorBrowsableState.Never)> _
            Public Overrides Function A(ByVal A_0 As Object) As Boolean Implements Object.Equals
            <DebuggerHidden> _
            Private Shared Function A(Of A As { Form, New })(ByVal A_0 As A) As A
    
            ' Fields
            Public A As B
            <ThreadStatic> _
            Private Shared A As Hashtable
        End Class
    End Class
    
    <AttributeUsage(AttributeTargets.Assembly)> _
    Public NotInheritable Class DotfuscatorAttribute
        Inherits Attribute
        ' Methods
        Public Sub New(ByVal a As String, ByVal c As Integer, ByVal b As Boolean)
    
        ' Properties
        Public ReadOnly Property A As String
        Public ReadOnly Property B As Boolean
        Public ReadOnly Property C As Integer
    
        ' Fields
        Private a As String
        Private b As Boolean
        Private c As Integer
    End Class
    
    <GeneratedCode("MyTemplate", "8.0.0.0"), EditorBrowsable(EditorBrowsableState.Never)> _
    Friend Class E
        Inherits Computer
        ' Methods
        <EditorBrowsable(EditorBrowsableState.Never), DebuggerHidden> _
        Public Sub New()
    End Class
    
    <GeneratedCode("MyTemplate", "8.0.0.0"), EditorBrowsable(EditorBrowsableState.Never)> _
    Friend Class F
        Inherits WindowsFormsApplicationBase
        ' Methods
        <DebuggerNonUserCode> _
        Shared Sub New()
        <DebuggerStepThrough> _
        Public Sub New()
        <DebuggerStepThrough> _
        Protected Overrides Sub A() Implements WindowsFormsApplicationBase.OnCreateMainForm
        <DebuggerHidden, EditorBrowsable(EditorBrowsableState.Advanced), STAThread> _
        Friend Shared Sub A(ByVal A_0 As String())
    
        ' Fields
        Private Shared A As List(Of WeakReference)
    End Class
    
    <EditorBrowsable(EditorBrowsableState.Never), DebuggerNonUserCode, CompilerGenerated> _
    Friend NotInheritable Class G
        ' Methods
        <EditorBrowsable(EditorBrowsableState.Never)> _
        Private Sub New()
        Public Shared Function A(ByVal A_0 As IEnumerable(Of XElement)) As String
        Public Shared Sub A(ByVal A_0 As IEnumerable(Of XElement), ByVal A_1 As String)
        Public Shared Function A(ByVal A_0 As IEnumerable(Of XElement), ByVal A_1 As XName) As String
        Public Shared Function A(ByVal A_0 As XElement, ByVal A_1 As XName) As String
        <EditorBrowsable(EditorBrowsableState.Never)> _
        Public Shared Function A(ByVal A_0 As XName, ByVal A_1 As Object) As XAttribute
        <EditorBrowsable(EditorBrowsableState.Never)> _
        Public Shared Function A(ByVal A_0 As XName, ByVal A_1 As XNamespace) As XAttribute
        Public Shared Sub A(ByVal A_0 As IEnumerable(Of XElement), ByVal A_1 As XName, ByVal A_2 As String)
        Public Shared Sub A(ByVal A_0 As XElement, ByVal A_1 As XName, ByVal A_2 As String)
        <EditorBrowsable(EditorBrowsableState.Never)> _
        Public Shared Function A(ByVal A_0 As String(), ByVal A_1 As XNamespace(), ByVal A_2 As List(Of XAttribute), ByVal A_3 As IEnumerable) As IEnumerable
        <EditorBrowsable(EditorBrowsableState.Never)> _
        Public Shared Function A(ByVal A_0 As String(), ByVal A_1 As XNamespace(), ByVal A_2 As List(Of XAttribute), ByVal A_3 As Object) As Object
        <EditorBrowsable(EditorBrowsableState.Never)> _
        Public Shared Function A(ByVal A_0 As String(), ByVal A_1 As XNamespace(), ByVal A_2 As List(Of XAttribute), ByVal A_3 As XElement) As XElement
    
        ' Nested Types
        <CompilerGenerated, DebuggerNonUserCode, EditorBrowsable(EditorBrowsableState.Never)> _
        Private NotInheritable Class A
            ' Methods
            <EditorBrowsable(EditorBrowsableState.Never)> _
            Friend Sub New(ByVal A_0 As String(), ByVal A_1 As XNamespace(), ByVal A_2 As List(Of XAttribute))
            <EditorBrowsable(EditorBrowsableState.Never)> _
            Friend Function A(ByVal A_0 As Object) As Object
            <EditorBrowsable(EditorBrowsableState.Never)> _
            Friend Function A(ByVal A_0 As XElement) As XElement
    
            ' Fields
            Private ReadOnly A As String()
            Private ReadOnly A As XNamespace()
            Private ReadOnly A As List(Of XAttribute)
        End Class
    End Class
    
    <CompilerGenerated, HideModuleName, DebuggerNonUserCode, StandardModule> _
    Friend NotInheritable Class H
        ' Methods
        Friend Shared Function A() As A
    End Class
    
    
     
    Collapse Types
    I got that.

    Now do you see what obfuscation can do?

    What are some good Obfuscators?

    My favorite as I started with obfuscation (not too long ago) was Skater's .NET Obfuscator lite. It's a good free program for those wanting basic protection for their work, something small in size (2.36 MB), and completely free.

    One that I haven't tried yet (but heard good things about) is Eazfuscator.NET. It apparently offers fairly advanced protection for your work as well, and is also free.

    My very favorite, however, is Preemptive Solution's Dotfuscator. Although this product is not free, there's a download link at the bottom. This offers amazing protection for your software (seen above), with customizable settings, such as watermarks, renaming, removing, string encryption, etc. I highly recommend this product for anyone wanting extreme protection.

    How do I obfuscate my program?

    Obfuscating is very simple, with most products at least. For this tutorial, I'll show you how to obfuscate with the three products I listed above.

    *Sorry for being kinda... slow in the videos, I'm writing this tutorial after a long day

    Dotfuscator:


    Skater Lite:


    Eazfuscator:


    What have I learned?

    Hopefully by reading this tutorial you've learned a thing or two about protecting your work with obfuscation and obfuscators.

    -You've learned what obfuscating is.

    -You've learned some basic history of obfuscation.

    -You've learned how to keep your software safe from crackers, decompilers, and noobs.

    -You've learned how to use three different obfuscators.

    -You've learned what I can accomplish in an hour.

    Nextgen, put this in your signature, it's safe there.

    Thanks for reading my little tutorial.

    Download for Dotfuscator:

    Code:
    https:// ezlink. info /10Y
    NextGen1 Edit : Link Approved (remove spaces)


    I've used it: it's clean. File size is too big to scan using VirScan or Virustotal, but I assure you it's clean.

    Credits:

    Coder Never: Because he wants credit.
    Last edited by NextGen1; 02-26-2010 at 11:58 AM.

  2. The Following 15 Users Say Thank You to Lolland For This Useful Post:

    .Celtics (11-06-2010),apezwijn (02-18-2010),Blubb1337 (02-10-2010),Bombsaway707 (02-10-2010),CoderNever (02-10-2010),hopefordope (02-17-2010),MJLover (03-17-2010),mnpeepno2 (02-10-2010),MugNuf (02-11-2010),NextGen1 (02-10-2010),Sixx93 (03-15-2010),skiiiz (03-17-2010),why06 (02-12-2010),XGelite (02-11-2010),Zoom (02-10-2010)

  3. #2
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    all i can say is... THANKS!


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  4. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Very Good Job Lolland

    (Now in Sig)
    Last edited by NextGen1; 02-10-2010 at 07:13 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #4
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Very nice bro, deserves a thank

  6. #5
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,977
    Reputation
    343
    Thanks
    4,324
    My Mood
    Cheeky
    An easier way to prevent people of stealing your codens is to learn C++, which may be extremely hard seeing as most of the people on mpgh have shitty grammar.
    Ah we-a blaze the fyah, make it bun dem!

  7. The Following 2 Users Say Thank You to Hell_Demon For This Useful Post:

    MJLover (03-17-2010),NextGen1 (02-10-2010)

  8. #6
    Obama's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    The Black house
    Posts
    22,195
    Reputation
    870
    Thanks
    6,076
    My Mood
    Cool
    Outside link approved.

  9. The Following User Says Thank You to Obama For This Useful Post:

    Lolland (02-10-2010)

  10. #7
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Thanks for the approval, Obama.

    Enjoy your free dotfuscator.

    Thanks for the positive feedback too!

  11. #8
    guza44_44's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Posts
    431
    Reputation
    16
    Thanks
    310
    very nice, now we can all be safe :3 unless ur smart and still decompile the programs but ya
    [IMG]https://i304.photobucke*****m/albums/nn168/guza44/sig-1.png[/IMG]

  12. #9
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    The smart people here and can decompile are "real coders" and have to much respect for other peoples work


     


     


     



    The Most complete application MPGH will ever offer - 68%




  13. #10
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    ive used "Skaters Light" before, and i like it.

  14. #11
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Great tutorial!
    -Rest in peace leechers-

    Your PM box is 100% full.

  15. #12
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Quote Originally Posted by hejsan1 View Post
    Great tutorial!
    Thanks

    @XGelite:
    Dotfuscator>Eazfuscator>Skater light.

    So you should get Dotfuscator for some more advanced protection.

  16. #13
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Should be a sticky, now.

    Anyway, if i use this on my multitool I'm working on (i have been for a month trying different shit), can i use the ORIGINAL source code, without it being all encrypted and stuff?

  17. #14
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Quote Originally Posted by MugNuf View Post
    Should be a sticky, now.

    Anyway, if i use this on my multitool I'm working on (i have been for a month trying different shit), can i use the ORIGINAL source code, without it being all encrypted and stuff?
    Elaborate?

  18. #15
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Quote Originally Posted by lolland View Post
    Elaborate?
    Okay, you know the folder that holds all the code? Well, i want to know if it messes with that, or it just makes the program itself encrypted.

    So in a nut shell, does it encrypt the program or the source code to the project, on your computer, only you have.

    Good enough explanation o.o?

Page 1 of 2 12 LastLast

Similar Threads

  1. [Tutorial]VB.net - Obfuscator
    By aLcohoL_95 in forum Visual Basic Programming
    Replies: 12
    Last Post: 02-16-2011, 08:15 AM
  2. Warrock Hack - Tutorial
    By Dave84311 in forum WarRock - International Hacks
    Replies: 667
    Last Post: 10-09-2007, 10:10 AM
  3. Gunz Hack - Tutorial
    By Dave84311 in forum General Game Hacking
    Replies: 12
    Last Post: 01-09-2006, 08:16 PM
  4. Replies: 3
    Last Post: 01-04-2006, 09:52 PM
  5. Photoshop Tutorials
    By Dave84311 in forum Art & Graphic Design
    Replies: 3
    Last Post: 12-31-2005, 07:21 AM