CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Jan 2003
    Location
    Bangalore, INDIA
    Posts
    180

    Obfuscated Visual Basic ?

    Hi Guys,

    Is there a way to write Obfuscated code in Visual Basic, as we do in C / C++ ?

    Kindly help.

    Thanks

    Suhaib

  2. #2
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    yes you can write obfuscated code... but it is a WHOLE bunch harder in VB because of the well defined structure and inflexibility of the language and the self-formatting VB engine. So it is a pretty stupid idea...
    Mike

  3. #3
    Join Date
    Jan 2003
    Location
    Bangalore, INDIA
    Posts
    180
    Originally posted by Pinky98
    yes you can write obfuscated code... but it is a WHOLE bunch harder in VB because of the well defined structure and inflexibility of the language and the self-formatting VB engine. So it is a pretty stupid idea...
    Stupid though it might be, please tell me how.

  4. #4
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    what do you mean "How"?

    You decide what kind of obfuscation you want and then you write it...
    It like asking how do you type a Word document? You open the editor and then you start typing. And once you are finished stop.
    Mike

  5. #5
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    say you want code that rotates a text file by 90 degrees, and if you put the original document into itself it still works...

    you would start off by writing the program, and then putting in comments such that, when flipped by 90 deg, your code is all commented out. Then put in the new code which will now become visible once flipped....

    e.g. (assume that this code would flip though 90 degrees)
    Code:
    Dim a as integer
    
    a = a+1
    ''''''''''''''''
    'D a
    'i  
    'm = 
    '  
    'a a
    '  +
    'a 1
    's
    '
    'i
    'n
    't
    'e
    'g
    'e
    'r
    Mike

  6. #6
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    make that:

    Code:
    'D a
    'i  
    'm = 
    '  
    'a a
    '  +
    'a 1
    's
    '
    'i
    'n
    't
    'e
    'g
    'e
    'r
    ''''''''''''''''
    Dim a as integer
    
    a = a+1
    Mike

  7. #7
    Join Date
    May 2002
    Location
    Montreal
    Posts
    450
    I downloaded a vb obfuscator once, but I never had time to test it out. It basically anaylses your exe then makes a new one that is supposedly obfuscated.

    Go to http://www.joryanick.com/ and look for the vb obfuscator link.

    hth
    Cheers,
    Laurent

    For an aviator, the three best things in life are a good landing, a good orgasm, and a good sh*t. A night carrier landing is one of the few opportunities to experience all three at the same time.

  8. #8
    Join Date
    Dec 2002
    Posts
    218
    Ok.... I read this post and thought this would be an interesting topic. Then I realized that I didn't have a clue as to what 'Obfuscated' code was.

    1. Could someone please define what obfuscated code is

    and

    2. What purpose does it serve?

    Based on the example provided by Pinky I don't see why you would want to do such a thing.

  9. #9
    Join Date
    Jun 2003
    Location
    Planet Earth
    Posts
    186
    by definition, obfuscated means to make something obscure or unclear, especially by making it unnecessarily complicated.

    purpose might be to make it harder for someone to figure out what you're doing in code.

  10. #10
    Join Date
    Jan 2002
    Location
    Quebec/Canada
    Posts
    124
    Search the web for Obfuscated Perl, Perl is the best language for obfuscated code. I remember an encryption code wich looked like an ascii dolphin.

    I don't think you can achieve any level of obfuscated code with VB.

  11. #11
    Join Date
    May 2002
    Location
    Montreal
    Posts
    450
    Some obfuscators i have read about even make sure to give a hacker a hard time trying to monitor variables or functions by making them look the same.

    There is an excellent article on this subject by Robert Cringely on his site:

    http://www.pbs.org/cringely/pulpit/pulpit20020613.html

    if that didn't work, go to http://www.pbs.org/cringely and look for the article titled "How Obfuscation Is Emerging as a Technology That Is Critical to .NET, Yet Somehow Not Owned by Microsoft" under the 'Old Hat' link.
    Cheers,
    Laurent

    For an aviator, the three best things in life are a good landing, a good orgasm, and a good sh*t. A night carrier landing is one of the few opportunities to experience all three at the same time.

  12. #12
    Join Date
    Aug 2001
    Posts
    1,447
    I downloaded a vb obfuscator once, but I never had time to test it out. It basically anaylses your exe then makes a new one that is supposedly obfuscated.
    no idea what you are talking about, but obfuscation is inherently a process that takes place on SOURCE code, most emphatically NOT on an EXE.
    phinds
    vs2008, 3.5SP1 Version 9.0.21022.8 RTM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured