Consulting

Page 1 of 2 1 2 LastLast
Results 1 to 20 of 25

Thread: Solved: How to secure a VB6 project?

  1. #1
    VBAX Regular andrew93's Avatar
    Joined
    Aug 2005
    Location
    Auckland, New Zealand
    Posts
    68
    Location

    Solved: How to secure a VB6 project?

    Hi
    Is it possible to secure a VB6 project? I have done a search on this forum and found this thread which touches on COM add-ins but I'm not sure if that is applicable to a stand-alone VB6 application (by stand-alone I mean that it doesn't require any office appliation to run) plus it gives me the impression that VBA (I'm using VB6) is not very secure. I want to have users running my stand-alone application without access to the source code whatsoever. Is this possible?

    TIA
    Andrew

  2. #2
    BoardCoder
    Licensed Coder
    VBAX Expert mark007's Avatar
    Joined
    May 2004
    Location
    Leeds, UK
    Posts
    622
    Location
    A VB6 application is compiled to native code so although you 'could' theoretically reverse engineer it, it would be very difficult and is certainly something that very few will be able to do. Also, the sort of person who could reverse engineer your app however is unlikely to be someone wanting to steal your code.

    "Computers are useless. They can only give you answers." - Pablo Picasso
    Mark Rowlinson FIA | The Code Net

  3. #3
    Administrator
    VP-Knowledge Base VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    True VBA projects are not very well protected and easy to break.

    VB6 is compiled in some format: DLL/OCX/ActiveX ...etc These can be broken like Mark explained but that would take a very knowledgeable person and against those person's there is no protection that would work.
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  4. #4
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by MOS MASTER
    True VBA projects are not very well protected and easy to break.

    VB6 is compiled in some format: DLL/OCX/ActiveX ...etc These can be broken like Mark explained but that would take a very knowledgeable person and against those person's there is no protection that would work.
    one cannot get at the source code in a compiled vb 6 program, be it a dll or an exe.

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by Howard Kaikow
    one cannot get at the source code in a compiled vb 6 program, be it a dll or an exe.
    Long time no see howard!

    No like I said its very unlikely that would happen.
    But I know people can reverse engineer Dll's and stuff and I'm not that sure I would say nobody can! (There's always someone smarter....)

    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  6. #6
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by MOS MASTER
    Long time no see howard!

    No like I said its very unlikely that would happen.
    But I know people can reverse engineer Dll's and stuff and I'm not that sure I would say nobody can! (There's always someone smarter....)

    It is NOT possible to recreate the original source from a compiled VB 6 project.
    VBA is easy to break, but then VBA is not compiled.

    There are techniques for examining (most) any compiled VB 6 program and figuring out what's being done, but there is no way to reproduce the original source code.

  7. #7
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by MOS MASTER
    Long time no see howard!

    No like I said its very unlikely that would happen.
    But I know people can reverse engineer Dll's and stuff and I'm not that sure I would say nobody can! (There's always someone smarter....)

    The proof is in the doing.

    Challenge those people to RECREATE the source code I used in the very simple VB 6 .exe at

    http://www.standards.com/index.html?...leUsageMonitor

    "RECREATE" means the exact code I used, not a logical equivalent.

  8. #8
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by Howard Kaikow
    The proof is in the doing.
    Hmmzz yeah. well I doubt if people being capable of doing that would like to show off in this manner. But I love to see someone do it.

    Me I'm not capable of doing that but I'm a open minded guy so I'll leave the option open that someone more knowledgeable would be able to.

    So I'll forfeit this dare!
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  9. #9
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by MOS MASTER
    Hmmzz yeah. well I doubt if people being capable of doing that would like to show off in this manner. But I love to see someone do it.

    Me I'm not capable of doing that but I'm a open minded guy so I'll leave the option open that someone more knowledgeable would be able to.

    So I'll forfeit this dare!
    The question is easily resolved by asking the question in the appropriate VB 6 forums, i.e., the MSFT newsgroups.

    This question has been oft raised over the years.

  10. #10
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by Howard Kaikow
    The question is easily resolved by asking the question in the appropriate VB 6 forums, i.e., the MSFT newsgroups.

    This question has been oft raised over the years.
    Well now you're confusing me Howard...first you say it can't be done and add a dare to it....

    and now you say it can be easily resolved???

    And yes I've seen a lot of these questions too but never seen a "hacker" come out in the open to show of his skills!
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  11. #11
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    In addition, VB.NET and the use of Strong Names may be a better solution if we want to protect things.

    But as I usually says, if we really want to keep things secret then a good start is to avoid computers

    Kind regards,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  12. #12
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by XL-Dennis
    But as I usually says, if we really want to keep things secret then a good start is to avoid computers
    Hi Dennis!

    Indeed that's protecting it from the source!
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  13. #13
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by MOS MASTER
    Well now you're confusing me Howard...first you say it can't be done and add a dare to it....

    and now you say it can be easily resolved???

    And yes I've seen a lot of these questions too but never seen a "hacker" come out in the open to show of his skills!
    I put out the dare because the task cannot be done.

    By "solved", I meant that asking the quetion in the appropriate forum will get evidence that VB 6 cannot be uncompiled back to the source.

  14. #14
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by XL-Dennis
    In addition, VB.NET and the use of Strong Names may be a better solution if we want to protect things.

    But as I usually says, if we really want to keep things secret then a good start is to avoid computers

    Kind regards,
    Dennis
    VB .NET can be decompiled.

  15. #15
    VBAX Regular andrew93's Avatar
    Joined
    Aug 2005
    Location
    Auckland, New Zealand
    Posts
    68
    Location

    Convert project to exe?

    Wow!

    I haven't visited my post for a couple of days and thanks for all of the replies! This gives me some confidence that my VB6 project will be secure. I was thinking of upgrading it to VB.Net when I'm finished but now I'm not so sure.....that can be the subject of another thread later.

    Given I am new to VB (and I don't have any manuals - I'm learning at the keyboard), how do I create an exe? I created a new project and from the initial choice of three options on the new project wizard (i.e. Standard exe, VBA wizard & VB working model edition controls) I chose 'standard exe'. I have created some forms and code and am currently testing my 'application'.

    If I share the VB6 directory on my development PC, jump onto another PC on my network and browse to the VB6 directory, where exactly do I find this executable file? It's not where I would expect it to be - I can't see an exe file with a similar name. Have I missed a step or am I looking in the wrong place? I have looked under the menu commands for converting a project to an exe file but can't find anything there either. How do I create an exe file from my project?

    TIA, Andrew
    Last edited by andrew93; 09-06-2005 at 04:01 AM. Reason: speling (sic)

  16. #16
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    I was thinking of upgrading it to VB.Net when I'm finished but now I'm not so sure.....that can be the subject of another thread later.
    All solutions based on VB.NET require that .NET Framework is installed. The distributable version of the framework is about 18 MB and is only available on Windows XP with SP-2.

    How do I create an exe file from my project?
    You need to manually create the exe-file by choosing the command File | Make xxx.exe... where xxx is the name of Your project.

    Kind regards,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  17. #17
    BoardCoder
    Licensed Coder
    VBAX Expert mark007's Avatar
    Joined
    May 2004
    Location
    Leeds, UK
    Posts
    622
    Location
    I was thinking of upgrading it to VB.Net when I'm finished
    If you're going to do it in VB.Net you would be much better off starting it in VB.Net. Upgrading would be hard going depsite the tools available. personally I love .Net and would recommend it!

    "RECREATE" means the exact code I used, not a logical equivalent.
    I think you've kind of missed the point Howard - a logical equivalent is just as good in my eyes!

    VB .NET can be decompiled.
    True, but you can obsfuscate it to make it harder to do so. At the end of the day all you can do is make it harder. If a hacker really wants to break your app they will do no matter how it was created.

    There are tools to turn MSIL into native code out there too.

    More often than not the idea of an app is worth more than the implementation anyway.
    "Computers are useless. They can only give you answers." - Pablo Picasso
    Mark Rowlinson FIA | The Code Net

  18. #18
    Administrator
    VP-Knowledge Base VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by Howard Kaikow
    I put out the dare because the task cannot be done.

    By "solved", I meant that asking the quetion in the appropriate forum will get evidence that VB 6 cannot be uncompiled back to the source.
    Ok my bad thanks for clarifying!

    Perhaps someone will show his skills off.....
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  19. #19
    VBAX Regular andrew93's Avatar
    Joined
    Aug 2005
    Location
    Auckland, New Zealand
    Posts
    68
    Location
    Thanks again for your input everyone.

    Denis - no wonder I couldn't find the 'make exe' command - I've just worked out I'm using an education edition of the software and that option isn't available. Hence the lack of online help in my version of VB....thanks anyway.

    I've got VB.net on another PC (with XP, SP2, .net framework etc.) so it might be time to migrate my project now....

    Thanks again
    Andrew
    Last edited by andrew93; 09-06-2005 at 02:08 PM. Reason: speling (sic)

  20. #20
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Glad you've found your answer Andrew!

    Good luck on your project.
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

Posting Permissions

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