PDA

View Full Version : Solved: How to secure a VB6 project?



andrew93
09-02-2005, 11:29 PM
Hi
Is it possible to secure a VB6 project? I have done a search on this forum and found this thread (http://www.vbaexpress.com/forum/showthread.php?t=1268&highlight=secure+project) 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

mark007
09-03-2005, 01:41 AM
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.

:)

MOS MASTER
09-03-2005, 10:18 AM
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. :whistle:

Howard Kaikow
09-05-2005, 11:02 AM
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. :whistle:

one cannot get at the source code in a compiled vb 6 program, be it a dll or an exe.

MOS MASTER
09-05-2005, 11:07 AM
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! :yes

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....)

:whistle:

Howard Kaikow
09-05-2005, 11:14 AM
Long time no see howard! :yes

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....)

:whistle:

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.

Howard Kaikow
09-05-2005, 11:22 AM
Long time no see howard! :yes

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....)

:whistle:

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?PageFileUsageMonitor

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

MOS MASTER
09-05-2005, 11:26 AM
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. :yes

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! :giggle

Howard Kaikow
09-05-2005, 12:31 PM
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. :yes

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! :giggle

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.

MOS MASTER
09-05-2005, 12:43 PM
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??? :think: :rofl:

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!

XL-Dennis
09-05-2005, 01:44 PM
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

MOS MASTER
09-05-2005, 01:53 PM
But as I usually says, if we really want to keep things secret then a good start is to avoid computers ;)


Hi Dennis! :hi:

Indeed that's protecting it from the source! :rofl:

Howard Kaikow
09-05-2005, 09:59 PM
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??? :think: :rofl:

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.

Howard Kaikow
09-05-2005, 10:01 PM
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.

andrew93
09-06-2005, 03:58 AM
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

XL-Dennis
09-06-2005, 06:50 AM
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

mark007
09-06-2005, 07:15 AM
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.

MOS MASTER
09-06-2005, 10:33 AM
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! :yes

Perhaps someone will show his skills off.....:whistle:

andrew93
09-06-2005, 02:04 PM
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

MOS MASTER
09-06-2005, 02:06 PM
Glad you've found your answer Andrew! :hi:

Good luck on your project. :yes

Ken Puls
09-06-2005, 02:50 PM
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

Now isn't that ironic? No help in the educational version... You'd think that would be the first version to have help added! :doh:

Uh... Mark... what does "obsfuscate" mean? Maybe I missed a day in English class, but that one's new to me... :dunno

MOS MASTER
09-06-2005, 03:25 PM
Uh... Mark... what does "obsfuscate" mean? Maybe I missed a day in English class, but that one's new to me... :dunno

Something like:
http://www.devx.com/wireless/Article/28989

Ken Puls
09-06-2005, 03:27 PM
Ah! No wonder I never ran across it in English class... it's geek! :rotlaugh:

That's about what I thought, just wanted to check.

MOS MASTER
09-06-2005, 03:36 PM
Ah! No wonder I never ran across it in English class... it's geek! :rotlaugh:

That's about what I thought, just wanted to check.

Not only for geeks you silly!! :rofl: (Just wanted to show a to the point example)

It's plain english..another sample for my silly friend:
http://www.freesearch.co.uk/dictionary/obfuscate

mark007
09-06-2005, 05:24 PM
LOL