Library:Electron
| Developer | OpenJS Foundation / Electron maintainers |
|---|---|
| License | MIT |
| Website | https://www.electronjs.org |
| On this wiki | Facts · Code · Notes · Topics |
Framework that bundles Chromium and Node.js with an application's JavaScript (usually in resources/app.asar); Electron binaries carry a fuse wire that switches security features on or off and can be read from the executable.
Recognizing an Electron app
- The program directory holds a large executable (Chromium + Node.js, 100+ MB),
resources/app.asarorresources/app/,locales/*.pak,chrome_100_percent.pak,icudtl.dat,v8_context_snapshot.bin,ffmpeg.dll/libffmpeg.so. On macOS it is a.appwithElectron Framework.framework. - The JavaScript is in the Format:ASAR archive (Electron) and is plain text unless the author added a layer on top;
package.jsoninside names the main entry. - Versions: the source builds the default user agent from compile-time macros as the literal
Chrome/<CHROME_VERSION_STRING> Electron/<ELECTRON_VERSION_STRING>(shell/common/application_info.cc, BuildApplicationUserAgent); for an app whose product name differs from Electron it is<name>/<app version> Chrome/<chrome> Electron/<electron>. Searching the executable forElectron/orChrome/followed by digits should therefore show both versions without running it (Unverified on a real binary: the compiler may split the concatenated literal or the linker may fold it; the compile-time concatenation is read from the source). On Windows the PE version resource of the exe is NOT the Electron version: GetApplicationName/GetApplicationVersion read ProductName/ProductVersion of the exe itself (shell/common/application_info_win.cc), which electron-builder and similar packagers set to the app's own name and version (the stock electron.exe carries Electron's). At run timeprocess.versionslists electron, chrome, node and v8. The Node.js and V8 versions determine the bytecode and snapshot formats.
Fuses
Electron 12 and later contain a fuse wire inside the executable, so security options can be flipped by patching bytes instead of rebuilding. The wire is the 32-character sentinel dL7pKGdnNz796PbbjQWNKmHXBZaB9tsX followed by a version character, a length character and one state byte per fuse: 0x30 disabled, 0x31 enabled, 0x72 removed, 0x90 inherit. A universal macOS binary contains the sentinel twice. See Fact:Electron/identification/Fuse wire and Fact:Electron/enum/Fuse V1 options.
Fuse V1 indexes: 0 RunAsNode, 1 EnableCookieEncryption, 2 EnableNodeOptionsEnvironmentVariable, 3 EnableNodeCliInspectArguments, 4 EnableEmbeddedAsarIntegrityValidation, 5 OnlyLoadAppFromAsar, 6 LoadBrowserProcessSpecificV8Snapshot, 7 GrantFileProtocolExtraPrivileges, 8 WasmTrapHandlers. An analyst can read which are on (for example whether ELECTRON_RUN_AS_NODE still works, which turns the exe into a Node.js interpreter, or whether app.asar is integrity-checked) without running the app.
Related
Format:ASAR archive (Electron), Format:NSIS installer (electron-builder's default Windows installer), Format:Node.js single executable application.
Data storage: Electron apps keep IndexedDB and Local Storage in LevelDB directories, see Format:Chromium IndexedDB on LevelDB and Format:Chromium Local Storage on LevelDB. Crash reports of Electron/Chromium use Library:Crashpad and write Format:Minidump files.
ASAR integrity
When the EnableEmbeddedAsarIntegrityValidation fuse is on (macOS and Windows only), Electron hashes the header JSON string of each .asar it opens (the string read from the Pickle, not the whole file) with SHA-256 and compares it with a value stored outside the asar; a mismatch is a fatal error (LOG(FATAL)). Per-file integrity entries inside the header are then checked as files are read.
- macOS: the main bundle's Info.plist key
ElectronAsarIntegrityis a dictionary keyed by the asar path relative toContents/(for exampleResources/app.asar); each value is a dictionary{algorithm: "SHA256", hash: <hex>}. - Windows: a resource of type
Integrity(RT string name) and nameElectronAsarin the exe, whose data is JSON (Chromium JSON extensions allowed): a list of{"file": <path relative to the assets dir, matched case-insensitively>, "alg": "sha256", "value": <hex>}. A missing resource or missing entry for a validated asar kills the process. - Linux: no integrity check (the code is compiled for mac and win only).
To see what an app expects, read the plist key or extract that resource; to check, SHA-256 the header string of the asar (see Format:ASAR archive (Electron)). If you repack an asar you must update this value or turn the fuse off. See Fact:Electron/identification/ASAR integrity location.
Code & repositories
- https://github.com/electron/fuses @
42ee9430478abbba387e68b5b0c4c5d08133f4cc· license: MIT
@electron/fuses (MIT): reads and flips the fuse wire of an Electron binary; defines the sentinel and the V1 option order.
Tested on: source read, not run: Read the TypeScript source at this commit; not run. · checked 2026-10-18; last activity 2026-10-10 - https://github.com/electron/electron @
bcc5c510df7abedb85fd11843e3607e9115c0566· license: MIT
Electron source (MIT): shell/common/asar/archive*.cc (integrity location), application_info*.cc (user agent and version macros).
Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-18; Note: the latest release ships binaries; the wiki links only the source, never the binaries
Evidence & references
- electron/fuses commit 42ee9430478abbba387e68b5b0c4c5d08133f4cc (MIT):
src/constants.ts(SENTINEL, FuseState),src/config.ts(FuseV1Options order),src/index.ts(sentinel scan, one or two sentinels, wire read/write).