Skip to content

Add setup bootstrapper (setup.ps1) and SETUP.md dependency guide - #3

Open
memoryforensics1 wants to merge 1 commit into
mainfrom
feature/setup-and-prereqs
Open

Add setup bootstrapper (setup.ps1) and SETUP.md dependency guide#3
memoryforensics1 wants to merge 1 commit into
mainfrom
feature/setup-and-prereqs

Conversation

@memoryforensics1

Copy link
Copy Markdown
Owner

Summary

Answers the recurring "does installing on a new machine pull in Frida and everything?" question: no — only the NuGet layer is self-installing. This PR automates everything that can be automated and documents the rest.

New: scripts/setup.ps1

A one-shot, idempotent, non-destructive bootstrapper / health-check. -CheckOnly diagnoses without changing anything.

  • .NET 8 SDK — detected; build link printed if missing.
  • Builddotnet build -c Release, which restores the NuGet packages (the only truly bundled dependency).
  • frida-tools (host) — installed via pip install --user frida-tools (the frida/frida-ps CLIs umd_frida* shells out to).
  • frida-server (guest) — downloads the version-matched frida-server.exe from GitHub releases into guest-tools\ and decompresses the .xz using Python's lzma. Transfer it to C:\Tools\frida-server.exe in the VM with guest_transfer_to_vm.
  • vmrun / cdb — detected at the same paths the server searches; install hints printed if missing. (No vmrun → server runs in EXTERNAL-TARGET mode, KDNET-only, per Implement EXTERNAL-TARGET mode in VmwareManager for improved kernel debugging support when vmrun is unavailable #1.)
  • appsettings.json — created from the example if absent.
  • Ends with a doctor summary table; exits non-zero only when a blocking prereq (.NET 8 / build) is missing — optional components produce WARN rows.

New: SETUP.md

Full breakdown of bundled vs. bring-your-own, host vs. guest components (with the exact guest paths the server expects), and every setup.ps1 flag.

Other

  • README.md: setup pointer above Clone & Build.
  • .gitignore: ignore guest-tools/ (downloaded binaries).

What is not bundled (and can't be)

VMware vmrun, WDK cdb.exe, and the guest-side agents (frida-server.exe, dbgsrv.exe, TTD.exe) are third-party / must live inside the VM. The script installs frida-tools + stages frida-server, and reports the rest with actionable hints.

Testing

Verified on this machine (Win11, .NET 8, Python 3.12, frida 16.5.9):

  • setup.ps1 -CheckOnly — parses and reports correctly.
  • setup.ps1 -SkipBuild — installed/confirmed frida-tools and downloaded + decompressed frida-server.exe (66 MB) into guest-tools\; created appsettings.json; summary reported "All checks passed."

🤖 Generated with Claude Code

Automate every prerequisite that can be automated on a fresh machine, and
clearly report the ones that cannot be bundled.

scripts/setup.ps1 (idempotent, non-destructive; -CheckOnly for diagnose-only):
- Verifies the .NET 8 SDK and restores + builds the server (NuGet is the only
  truly bundled dependency).
- Installs frida-tools on the host via pip (the frida/frida-ps CLIs umd_frida* shells out to).
- Downloads the version-matched frida-server.exe for the guest into guest-tools\
  and decompresses the .xz via Python's lzma.
- Detects vmrun (VMware), cdb.exe (WDK debuggers), and reminds about guest-side
  dbgsrv/TTD; creates appsettings.json from the example.
- Ends with a doctor summary table; non-zero exit only on blocking prereqs.

SETUP.md documents what's bundled vs. what the user must provide, host vs.
guest components, and the script's flags. README gains a setup pointer.
guest-tools/ is git-ignored (downloaded binaries).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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