Support Corner: Protecting .NET MAUI Applications

Protecting .net maui applications featured image

PreEmptive has a long-standing history of working with clients building Xamarin apps. With the introduction of Multi-platform App UI (MAUI), set to replace Xamarin as the go-to solution for creating versatile apps across platforms using .NET, Dotfuscator has been adeptly updated to offer support to MAUI, alongside its existing support to Xamarin.

The Challenge: Security in MAUI Apps

MAUI apps install managed assembly files on the end user’s machine or device. Take an MSIX installer, for example; it will place .dll files into the Program Files directory (C:Program FilesWindowsApp). These files are susceptible to decompiling and reverse engineering using tools like ILSpy, posing a significant risk if your app contains trade secrets or manages sensitive data: 

The Solution: Dotfuscator Integration

This is a problem if your app contains trade secrets or handles sensitive data. The good news is this is very easy to remediate by installing and then integrating Dotfuscator directly into your application’s project file (.csproj, .vbproj): 

This will trigger Dotfuscator to run before any packaging or deployment steps of a Release build, ensuring that your binaries are secure before they are deployed:

With Xamarin, the protection process involved integrating Dotfuscator into separate Visual Studio projects for Android, iOS, and UWP. MAUI simplifies this by allowing a single Visual Studio project to build apps for Windows, Android, iOS, and Mac. This means integrating Dotfuscator just once protects your app across all these platforms.

After this basic integration, your MAUI app will be safeguarded from reverse engineering, allowing for the secure deployment of protected binaries to Android, iOS, Mac, and Windows:

Shield .NET MAUI Applications With PreEmptive

The introduction of .NET MAUI presents exciting possibilities and highlights the need for enhanced security. Dotfuscator provides a robust solution, protecting against reverse engineering and the vulnerabilities of decompiling. It supports the diversified application environment enabled by MAUI and simplifies the integration process, enabling developers to easily secure applications across different platforms with just a single integration.

If you have feedback on this topic or other topics you would like us to discuss in the Support Corner, please contact our Support Department.