Skip to content

Replace the ps2exe wrapper with a native launcher (v1.123.0) - #108

Merged
TheAbider merged 1 commit into
masterfrom
launcher-host
Sep 9, 2026
Merged

Replace the ps2exe wrapper with a native launcher (v1.123.0)#108
TheAbider merged 1 commit into
masterfrom
launcher-host

Conversation

@TheAbider

Copy link
Copy Markdown
Owner

What

RackStack.exe is now a small C# launcher (dist/launcher/) that starts Windows PowerShell's own console host and runs the monolithic script from an embedded plain-text resource. CI compiles it with the csc.exe that ships inside Windows; nothing is downloaded or installed to produce the binary.

Why

Every release through v1.122.4 was built with ps2exe. Its script-host wrapper is widely reused by malware droppers, so heuristic engines scored each build as a packed script host regardless of what the script did. A hash Microsoft had cleared on 2026-08-12 was re-flagged by the winget validation pipeline on 2026-09-08, and the same file drifted from 8 to 19 VirusTotal detections without changing a byte. Per-hash disputes were a treadmill.

Also in this change

  • Self-destruct cleanup task runs a readable script file from a SYSTEM/Administrators-only directory (owner verified first) instead of a base64 -EncodedCommand.
  • Elevation from the EXE relaunches the executable itself; the old path passed an empty script path to powershell.exe when $PSCommandPath was unset.
  • Run-Tests Section 209 pins the new build: no ps2exe, in-box compiler by fixed path, nothing downloaded during compile, UAC manifest present, version resource populated and matching RackStack.psd1. Mutation-verified three ways.
  • Docs and comments updated.

Verification

  • 5511/5511 structural tests, PSSA 0 errors.
  • Built locally with the exact CI command: version resource TheAbider / RackStack / 1.123.0.0, requireAdministrator manifest present, embedded resource byte-identical to the monolithic, Defender (1.459.111.0, cloud on) clean.
  • Behaviour, parameters, elevation, self-update, and package-manager installs are unchanged; $PSCommandPath is empty inside the script exactly as it was under ps2exe.

RackStack.exe is now a small C# host that starts Windows PowerShell's own
console host and runs the monolithic script from an embedded plain-text
resource. It is compiled in CI with the csc.exe that ships inside Windows,
so nothing is downloaded or installed to produce the shipped binary.

Every release through v1.122.4 was produced by ps2exe. Its script-host
wrapper is widely reused by malware droppers, so heuristic engines scored
each build as a packed script host regardless of content: a hash Microsoft
had cleared was re-flagged within weeks, and the same file drifted from 8
to 19 VirusTotal detections without changing a byte.

Also:
- The self-destruct cleanup task runs a readable script file from a
  SYSTEM/Administrators-only directory (owner verified before the task is
  registered) instead of a base64 -EncodedCommand.
- Elevation from the EXE relaunches the executable itself; the old path
  passed an empty script path to powershell.exe when $PSCommandPath was
  unset.
- Run-Tests Section 209 now pins the launcher build: no ps2exe, in-box
  compiler by fixed path, nothing downloaded during compile, UAC manifest
  present, version resource populated and matching RackStack.psd1.
  Mutation-verified (ps2exe reintroduced, manifest downgraded, company
  drifted) - each fails exactly the intended assertion.
- Docs and comments updated; 5511/5511 structural tests, PSSA 0 errors.
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@TheAbider
TheAbider merged commit f3d597e into master Sep 9, 2026
7 checks passed
@TheAbider
TheAbider deleted the launcher-host branch September 9, 2026 00:39
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.

1 participant