Skip to Content
New release 12 available 🎉
DesktopObfuscation

Obfuscation

An obfuscation project collects the assemblies to protect, their dependencies and the settings of each one. Babel Desktop shows it as a graph on a canvas or as a table in a grid and runs it with the Babel Obfuscator engine.

Babel Desktop saves projects as .babel files, the MSBuild project format the MSBuild task uses. You can build a project saved in the desktop with MSBuild, and open an existing .babel project in the desktop.

From version 12.1.1, a project saved on a machine where the MSBuild task is installed loads the task from the file of that installation, and a project that still names the task by assembly name and version is converted when you save it. See MSBuild Task.

Babel Desktop preserves the parts of a .babel file it does not edit, such as comments, custom properties and custom MSBuild tasks. It does not evaluate MSBuild imports, conditions or custom tasks: a project that depends on them must be built with MSBuild. The one exception is the UsingTask element of the Babel task, which is converted as described above.

Targets, Dependencies and Flows

A project is built from a few kinds of items. The other pages of this section use these words with the meaning below.

TermMeaning
TargetAn assembly the engine obfuscates and writes to its own output file. Each target has its own settings. It is also called a primary target.
DependencyAn assembly merged into a target, embedded in it or used only to resolve its references. A dependency belongs to one target and has no settings of its own. See Dependencies.
Map linkA connection between two targets: the first writes its XML rename map and the second reads it, so both agree on the new names of the public symbols. See Run Order.
FlowA group of targets tied together by dependencies, map links or execution order. Targets of a flow run one after another, in the order of their steps.

Creating a Project

A project takes four steps, from adding the assemblies to the first run.

Add the assemblies

Click Add assemblies on the start screen or + Add Assembly on the toolbar (Ctrl+Shift+A, Cmd+Shift+A on macOS), or drag .NET assemblies from the file manager onto the canvas. Each assembly becomes a target: a node on the canvas and a row in the grid.

Connect the dependencies

Add the assemblies that are merged into, embedded in or referenced by a target, as described in Dependencies. For a set of assemblies that are shipped together, connect the targets that use each other’s public API with map links.

Configure each target

Select a target and open the properties panel to edit its settings and XML rules, or edit several targets at once in the grid. See Target Settings and The Project Grid.

Save and run

Save the project with File > Save (Ctrl+S, Cmd+S on macOS), then click Run project (Ctrl+Enter, Cmd+Enter on macOS). See Running the Project.

The setup commands do the second and third step for the most common cases: one application with its libraries merged into it, or a set of libraries with their public symbols renamed. Typical Workflows walks through both.

Opening and Saving Projects

A project is saved as a .babel file. Most project commands are in the File menu and also have a keyboard shortcut.

ActionHow
New projectFile > New Project, Ctrl+N (Cmd+N on macOS), Project: New in the command palette or the New project button at the left of the toolbar
Open a projectFile > Open Project…, Ctrl+O (Cmd+O on macOS), the Open project… button of the start screen, or a .babel file dropped on the grid
Open a recent projectProject: Open Recent… in the command palette
SaveFile > Save, Ctrl+S (Cmd+S on macOS)
Save under another nameFile > Save As…, Ctrl+Shift+S (Cmd+Shift+S on macOS)

Save writes the open .babel file and asks for a file name only for a new project. The Open Project dialog starts in the folder of the last project you opened. If the current project has unsaved changes, Babel Desktop asks whether to discard them before it creates or opens another one, and it asks again before the window closes. Wait for a running job to finish before you open another project.

Babel Desktop also remembers, on this computer, whether you last looked at a project on the canvas or in the grid. Switching views does not change the project file.

Replacing an Input

To point a target at a new build of its assembly without losing its settings, select the target and run Assembly: Replace input and keep settings… from the command palette. Assembly: Remove selected target, or Remove target in the menu of a node or a row, removes a target with its dependencies and connections.

Pages in This Section

The pages below cover the two views of a project, how its targets are connected and ordered, their settings, the run and its results, and end with complete examples.

  • The Project Canvas: the graph view, its nodes, the node menu and how to move around.
  • Dependencies: merge, embed and reference dependencies, and merging one target into another.
  • Run Order: flows, steps, flow edges and map links.
  • The Project Grid: the table view, editing many targets at once, run order and the details of each target.
  • Target Settings: the properties panel, map files, XML rules, engine plugins, the setup commands and the protection levels.
  • Running the Project: output files, the Activity panel, warnings and flows that run in parallel.
  • Run Results: the obfuscation score and the protection statistics of each run.
  • Typical Workflows: one application, an application with merged libraries, and a set of libraries with public obfuscation.

To translate the obfuscated stack traces of a protected application back to the original names with its XML map files, use the Stack Decoder.

Last updated on