VBA Code Compilers

First point to state is the VBA SDK 6.x site, on how to upgrade Visual Basic 6 to Visual Basic 6.5 with VBA’s SDK + VB.NET. Don’t know where it came from, but looks really insteresting. You can get your own VBA system on your application.
Then, there is this book (avaliable at the archive.org library), about hardcore of Visual Basic. It really exposes harcore for VB, like raw COM creation… and other weird things like that. I get to this following this post, and before that I was pursuing the Nativecode thing that is exposed there, from the Unviewable application. Also it seems that this also shares some kind of operation.
Orlando has always get me wondering how he get’s Excel to EXE compiled, and some other nice tools.
Want to get the most on Office VBA?, then borrow this book, avaliable via the archive.org library.
Following is a recopilation of what comercial software can do right now in Excel workbook protection tools, focused on the base features of the products which affect the security and misbehavior of protected solutions.
There are other decompilers for VBA:
  • To simply unlock the xls/xlsm file, just go here.
  • https://github.com/bontchev/pcodedmp
For Visual Basic programs compiled to .NET (e.g. with Visual Studio .NET 2003 or later), see DotNetDecompilers.
  • https://www.decalage.info/vba_tools and http://decalage.info/vba_emulation
  • JosephCo wrote a decompiler called Exdec.
  • VBDis 3/4/5 by DoDi. Version 3 (for VB version 3) was the most successful, because it has the most information in the “executable” (including comments!). VBDis 3 is available from this page.
  • Decompiler Technologies (formerly Visual Basic Right Back) is a decompilation service.
  • http://www.vb-decompiler.com: VB Decompiler Forum. Even includes some specifics on building a VB5/VB6 decompiler.
  • http://www.vb-decompiler.org: decompiles pcode, “high level assembler” for native code. Proprietary software, but free (as in beer) “Lite” version is available.
  • VBDE by Iorior dumps GUI information about VB executables; some decompilation ability
  • WKTVBDebugger VB debugger by WTK
  • http://www.decompiler-vb.netVBReFormer is a decompiler for native Visual Basic applications. It shows design code data (forms, controls, etc.), allows the modification of design properties directly on the binary, can disassemble native code, and can decompile native code (as much as that is possible).
  • Another one here, http://www.vbdecompiler.co.uk/
  • VBEditor by Hexman recovers Gui Information
  • R.A.C.E. by Sarge recovers Gui Information, and P-Code opcodes.
  • P32Dasm by Darker is a P-Code decompiler which decompiles to P-Code tokens.
  • Semi VB Decompiler by vbgamer45 recovers gui information, and P-Code tokens. For VB 5 and 6. Does not recompile native code.
  • VB Parser – Recovers P-Code tokens.
  • VBRezQ recovers the project file and forms.
  • http://vbdebug.cjb.net for a Visual Basic debugger (p-code programs only) by Mr Silver and Mr Snow.
  • VB Shrink by Cute-Bits is a tool that strips non essential info from the executable, to make it more difficult to decompile
  • VB EXE Obfuscator by Jory
  • Decompiler Defeater (see DeFeater)
  • Visual Basic MAK Compiler Pro (aka make_mak) by Christian Germelmann has a check box decompDefeat; the author claims “your apps will be immune against ‘reverse engeneering'”.
  • See also http://www.riis.com/archives/19980503.html on VB decompilation. (Dead link check out archive.org if you want to view that article.)
  • See also Master the Black Art of the VB Interpreter, Ash Rofail. In Visual Basic Programmer’s Journal, Dec 1996, pp 58-64.
  • The paper Visual Basic Reversed – A decompiling approach by Andrea Geddon has lots of details about the internals of VB5 and VB6 native (machine code) compiled programs. This is not a peer reviewed academic paper, and is written from a cracking point of view.
  • decompiler.com (bad link!) had some good links on this page, now only available from archive.orghttp://www.decompiler.com/viewtopic.php?t=2 (from the Software Reviews forum, Software Listings topic). There was also other good information in forums and the like; this site was heavily Visual Basic oriented. Several tools were available for download. Offline since late 2003.
From: #13 Re: Creating an .exe
Digiwise’s Post: WhiteHatXL’s analysis:
DataSafeXL: PROS: A newbie in Excel cannot reach the content of the protected workbook. CONS: The product is programmed in vba. The tool relies on standard MS Excel protection methods like workbook/worksheet protection and vba project password plus the vba code obfuscating. You do not need to be C programmer to pass over such protection. “For maximum VBA security, use the Microsoft Excel 2007-2010 format (“.xlsm”) and add a VBA password to your file which contains random alphanumeric characters and is at least 15 characters long.” This advice from their help file just kills me! Looks like the guy who wrote this product has been learning vba programming by the way. SUMMARY: Junk. The product is on a student project level.Spreadsheet Sentry: PROS: The tool is programmed in C++, uses strong encryption to protect formulas in cells. In protected solution formulas are encrypted, stored in cells and not readable. CONS: Takes WAY too much time to encode a workbook even for middle size model. Protected solutions work veeeery sloooow. Calculation time is wasted for encryption/decryption every formula in calculation chain. The tool doesn’t protect VBA code. SUMMARY: Protection works. The tool appropriates for small workbooks without VBA macros.LockXLS: This is the most controversial product in the review. After the first glance I wanted to give “the perfect” mark, but see what I have finally found …. PROS: The tool is programmed in C++. In protected solution everything works like in original workbook. Average user cannot see formulas in cells and vba code in protected workbook. Protects xla files. Lots of features. CONS: The product uses unmodified, original workbooks in protected solutions and relies on hackers’ methods to take customer away from seeing the content of the workbook (Hooks Excel windows and blocks Excel’s COM objects methods calls). The tool is trying to stub all Excel’s security breaches, which is impossible with an unmodified, original workbook. When a protected solution has been started on an end customer computer, the spreadsheet becomes as unprotected as newborn baby. 5 lines of C code extract the original workbook from the protected solution, doesn’t matter whether it’s xls or exe file. To prove the vulnerability of LockXLS solutions, just e-mail a protected solution to WhiteHatXL at yahoo dot com , the original workbook will be returned. SUMMARY: Fake. This product is not for a workbook protection.Secure Calc (former ExcelShield): These guys have ignored my requests for a trial version, so I have evaluated the product by the simple example from their site—It may work different for complex spreadsheets. PROS: The tool uses strong encryption for formulas, removes formulas from cells, has calculation engine to evaluate protected formulas. CONS: Engine is written in .NET environment in pure managed code, which is not good for a protection tool. Source code may be reached by Reflector and reverse engineered. No VBA Protection. The calc engine is not included into protected solution and should be preinstalled on customer computer separately. Each time, after typing new data into cell, the customer has to click the ‘Calculate’ button, which is available through the main Excel menu. This is very annoying. SUMMARY: Protection works. It looks good enough, if you do not need to protect vba code.xCell Compiler: PROS: The tool is programmed in C++, compiles formulas into binary code and removes them from cells, protects vba code. Has calculation engine to evaluate protected formulas. Has a lot of features. CONS: The tool has limitations declared on their web site. A protected solution doesn’t support adding/removing columns/rows/sheets. Sorting for ranges with formulas doesn’t work. SUMMARY: Protection works. Good, if you do not use features mentioned in limitations. Excel Translator: I was unable to get the neither trial version nor example of protected workbook. Very “strong” protection! Converter XL to Exe: PROS: Free, Free, Free!!! CONS: This tool is not for a workbook protection. SUMMARY: Toy.
Other interesting links to consider:  

Leave a Reply

Your email address will not be published. Required fields are marked *