Magic files are security files that when placed next to a protected application (in the same directory where they are executed) allow you to execute functions or bypass protections. In addition, they will also work so that the exceptions produced by the application can be deobfuscated without the need of any key.
⚠️ Magic files are sensitive and publishing them together with your application may cause unwanted security issues. Avoid this action.
The magic files have the following name: shield.bytehide.magic
They are generated each time an application is protected, and each magic file will only work with a specific application.
To get the magic file there are two options:
- Add the CopyMagicKey option with the value true in the Shield configuration file. This will make the bytehide.shield.magic file appear in the same directory where the protected application will be saved (NOT recommended for CI/CD or builds that automatically publish the code, like Xamarin, Maui, packages (nupkg) or installers.
- Go to the control panel, go to your particular project/application, and in the history get the file, by clicking on the “actions” in the history.
For the moment, adding the .magic file in the same folder as the application will cause the anti-debugger to be disabled.