Skip to content

securely wrap execution - #8451

Merged
ryan-willis merged 13 commits into
developfrom
sec/securely-wrap-execution
Mar 25, 2025
Merged

securely wrap execution#8451
ryan-willis merged 13 commits into
developfrom
sec/securely-wrap-execution

Conversation

@ryan-willis

@ryan-willis ryan-willis commented Mar 13, 2025

Copy link
Copy Markdown
Contributor

resolves INS-5048

what this does:

  • builds the normal Electron executable into insomnia.dll (so that it can be code-signed)
  • builds a wrapper into Insomnia.exe (also code-signed)
  • when the wrapper runs, makes a copy of insomnia.dll called insomnia-$VERSION.exe and executes it with custom Windows process mitigation policies
  • when Insomnia exits, the wrapper deletes the insomnia-$VERSION.exe file
  • standard output is piped directly

this is meant to be a stop-gap for CVE-2025-1353 and will very likely be superseded by other measures (NSIS/MSI installing into protected directories, etc)

to test locally, run ./build-secure-wrapper.sh from a bash-like shell on Windows with MSYS2/MinGW installed, then run packages/insomnia/dist/squirrel-windows/Insomnia.Core-X.X.X.exe to install Insomnia.
everything should run normally when launching/installing/uninstalling

this installer launches cleanly on a fresh Windows 11 as well

references:
https://chromium.googlesource.com/chromium/src.git/+/master/docs/security/faq.md#why-arent-physically_local-attacks-in-chromes-threat-model

https://learn.microsoft.com/en-us/windows/security/threat-protection/overview-of-threat-mitigations-in-windows-10#table-4functions-available-to-developers-for-building-mitigations-into-apps

@ryan-willis
ryan-willis force-pushed the sec/securely-wrap-execution branch from 8ba2f72 to ba928b2 Compare March 15, 2025 02:30
@ryan-willis
ryan-willis marked this pull request as ready for review March 15, 2025 02:58

@marckong marckong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We tested it together in a call and the fix seems to behave as expected.

@ryan-willis
ryan-willis merged commit 05d15b4 into develop Mar 25, 2025
@ryan-willis
ryan-willis deleted the sec/securely-wrap-execution branch March 25, 2025 15:57
cwangsmv pushed a commit that referenced this pull request Apr 21, 2025
* test using a wrapper that sets security context before invoking the main application

* add build step to pr ci

* try with diff ver string

* statically link the standard libraries for portability

* more static linking

* prior version string

* remove pr substring from version

* try using a different version string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants