View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
TJ Walls TJ Walls is offline
external usenet poster
 
Posts: 19
Default VBA Code Security

Hi Frank,

While this would be my first solution also (C is my "native" language),
I'm almost done with the VBA stuff ... I'm also not used to Windows(tm)
programming (I was raised on Linux Tcl/Tk and gcc).

I have no idea how to even start compiling(?) this Workbook as a DLL ...

-TJ

On Thu, 13 May 2004 21:46:51 +0200, Frank Kabel wrote:

Hi
the most secure way (IMHO) would be to create a COM Addin (e.g. in C++
or any other language) for your high-level code. Not much chaqnce using
VBA for this (it's not an hour it takes about 1-2 minutes to remove the
password)

--
Regards
Frank Kabel
Frankfurt, Germany


TJ Walls wrote:
Hello All,

I have been reading the newsgroups in earnest, and there doesn't
seem to
be a clear answer for this (even dating back to Office 97!).

I am writing a VBA for Excel application and would like to
distribute it
openly (thus, I don't care about controling distribution, etc...).

But
there is a way I do certain things that I don't want the general
public to
see. I am competent in security but still new to Excel and VBA.

I know the trivial answer is the "Lock Project From Viewing" option
in
VBE, but I have also read that this password (along with all Excel
internal passwords) are _trivial_ to crack (brute force under an hour
on a
modern workstation is trivial to me). The code I'm trying to protect
is in
a Workbook that has no purpose except to be a container for the VBA
code
which will open the Workbooks that the user can interact with.

So I have two questions I can't seem to sort out from previous
posts:

1) What is the best (most secure / easiest to implement) way to
supply
code to users in Office Applications while protecting the "high

level"
code. Again, I have no problem handing out compiled code. I

understand
that anyone who can read Hex can reverse engineer my code, but this
level
of security is sufficient for me to slept at night. I am mostly
concenered
with keeping out relatively mature script kiddies.

2) From my reading, I think the answer to (1) is to create a DLL

(or
EXE?). If so, is this possible with just the Office '97 package? Can
someone please help get me started on how to create / load a DLL
from my VBA code?

Thanks,
TJ Walls
Ph.D. Candidate - Dept. of Physics, Stony Brook University