Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:Squirrel.Windows package

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

Squirrel.Windows (Electron and .NET auto-updater): Setup.exe plus Update.exe, NuGet .nupkg packages (-full and -delta) and a RELEASES text index with SHA-1, file name and size; installs to %LocalAppData%\<id>\app-<version>.

Squirrel.Windows (MIT, Squirrel organisation) installs and updates apps per user without admin rights. Electron apps use it through electron-winstaller (Unverified link). Source: Squirrel/Squirrel.Windows src/Squirrel/ReleaseEntry.cs, docs/using/install-process.md, delta-packages.md, naming.md, custom-squirrel-events*.md.

Files shipped

  • Setup.exe: C++ bootstrapper; the docs say the Update.exe and the latest full package are injected into it (by the WriteZipToSetup tool). WriteZipToSetup.cpp stores that zip as a PE resource of type DATA with id 131 (IDR_UPDATE_ZIP) and optionally a FLAGS resource with id 132 holding the .NET framework version string; Setup.exe unpacks the zip into the target folder, checks that Update.exe is there and starts it as Update.exe --install . (UpdateRunner.cpp).
  • RELEASES: plain text index, one line per package: 40 hex SHA-1, a file name (or HTTP URL), the size in bytes, optionally # 25% staged-rollout percentage. Lines are matched by ^([0-9a-fA-F]{40})\s+(\S+)\s+(\d+)[\r]*$; # starts a comment.
  • <id>-<version>-full.nupkg and <id>-<version>-delta.nupkg: NuGet packages (ZIP with a .nuspec, app files under lib/net45/). A delta replaces each EXE/DLL with a bsdiff patch name.diff plus name.shasum (SHA-1 and size of the expected result); new files are stored verbatim.

On disk after install

%LocalAppData%\<id>\ contains Update.exe, packages\ (RELEASES and the downloaded .nupkg files) and one app-<version> folder per installed version. Shortcuts point to Update.exe --processStart <app>.exe, so the app runs through the updater stub. The id comes from the NuGet package id; dots in the id are discouraged.

Squirrel-aware apps and events

An executable is Squirrel-aware when the assembly metadata or the English version-info block has SquirrelAwareVersion (for example 1; see SquirrelAwareExecutableDetector.cs). Update.exe starts it with --squirrel-install x.y.z.m, --squirrel-firstrun, --squirrel-updated x.y.z.m, --squirrel-obsolete x.y.z.m and --squirrel-uninstall x.y.z.m; the app must handle them and exit quickly.

Reversing

  • Unpack Setup.exe's payload (7-Zip often lists the embedded nupkg), then unzip the -full.nupkg; the app is under lib/net45 (for Electron apps this holds the Electron runtime and an app.asar, see Technique:Bundled-runtime applications).
  • Compare the RELEASES SHA-1 with the file to detect tampering; versions are in the file names.

Code & repositories

  • https://github.com/Squirrel/Squirrel.Windows @ 51f5e2cb01add79280a53d51e8d0cfa20f8c9f9f · license: MIT
    Squirrel.Windows installer and auto-updater; ReleaseEntry.cs parses the RELEASES index and docs describe the nupkg, delta and event conventions.
    Tested on: source read, not run: source reading only · checked 2026-10-18; last activity 2024-07-24

See also

Technique:Bundled-runtime applications, Format:NSIS installer, Technique:Identifying the toolchain of a binary.