PreEmptive logo

Protecting VSTO Add-Ins

PreEmptive-Add-Ins

Visual Studio Tools for Office (VSTO) has enabled .NET developers to extend the functionality of Office applications like Word, Outlook, and Excel since 2003.  VSTO Add-Ins are deployed directly to the end user’s machine and triggered when the Office application starts.  Because of this, VSTO Add-Ins can be easily decompiled and reverse-engineered like other .NET applications. As many developers can attest, this is an easy access point for hackers to gain control of your applications.

Most application hardening techniques are quite cumbersome for VSTO Add-Ins. After application hardening, the Mage tool must manually create or update the VSTO application manifest (.manifest) and deployment manifest (.vsto). The assembly and manifest files must also be signed separately

Protecting VSTO Add-Ins

Fortunately, protecting VSTO Add-Ins is made simple with PreEmptive’s Dotfuscator.  We have to edit the project file (.csproj, .vbproj) to add tags that call Dotfuscator.

vkznghN1TDrGbtEYM6c0qputIk3YX88jXg7h2jh rWxW2xIBnTjEChj0r6bS4 fUy6CAe2ta rTRhl WyGOLpUFvr0dNgW nlDIH9vHUrJp72j6WZao90pH7ACv xipx7rY2g8HS 1

This will trigger Dotfuscator to run before our build’s packaging steps, so protected binaries are automatically packaged for deployment. This works whether we’ve created an installer or are using ClickOnce. No additional steps are required, and developers can implement it relatively easily.

Example of VSTO Add-In

A simple VSTO Add-In with Dotfuscator integration can be downloaded here.  A release build automatically generates obfuscated binaries, and double-clicking the .vsto manifest installs the Word Add-In.

Although VSTO Add-Ins are being phased out in favor of the new Office Add-in, several VSTO applications are still in production and could benefit from Dotfuscator’s simple integration. If you have questions on this or other topics you would like us to discuss in the Support Corner, please contact our Support Department

In This Article:

Start a Free Trial of PreEmptive Today