You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Harden against tampering; add protected install and quiet SYSTEM updates (v1.5.0)
Tamper resistance:
- Relocate monitor.db and events.log to %ProgramData%\SystemHelper and have the
GameHost watchdog lock them (deny-delete + OWNER RIGHTS cap) so a standard user
cannot delete usage history or logs even while DeviceMon is closed.
- Keep SYSTEM-only backups and auto-restore the database / DeviceMon.exe if missing.
- Reduce watchdog check interval from 15s to 5s.
Config resilience:
- A corrupt appsettings.json no longer crashes startup or the dashboard; fall back
to a last-known-good copy and then built-in defaults. The web host no longer
aborts on an unparseable config file.
Protected install and updates:
- Add install.ps1 to install into C:\Program Files\DeviceMon (read-only to the
child) and optionally configure a trusted update source.
- Add quiet, admin-level updates performed by the SYSTEM watchdog from a fixed
trusted source, triggered from the dashboard (no UAC, remote-capable, and the
child cannot redirect the update source).
Housekeeping:
- Bump version to 1.5.0 across all projects; add RELEASE_NOTES_v1.05.md; update README.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+52-10Lines changed: 52 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,18 +78,28 @@ Monitor & Control consists of three executables:
78
78
79
79
When you run `DeviceMon.exe`, it automatically looks for `GameHost.exe` in the same folder. If the watchdog service is not installed (or needs updating), DeviceMon silently asks for administrator privileges via a UAC prompt and installs/updates it. After that:
80
80
- The watchdog runs as a Windows service named `GameHost`
81
-
- It checks every 15 seconds whether `DeviceMon.exe` is still running
81
+
- It checks every 5 seconds whether `DeviceMon.exe` is still running
82
82
- If the monitor process is missing, the watchdog relaunches it in the active user session
83
83
- No further UAC prompts — the service runs under the SYSTEM account
84
84
- If you ever want to remove it, see the [Watchdog uninstall](#installing-the-watchdog-optional-requires-admin) section
-**Log file** at `C:\ProgramData\SystemHelper\events.log`
90
90
-**Watchdog log** at `C:\ProgramData\SystemHelper\watchdog.log`
91
91
-**Configuration** at `appsettings.json` (alongside the exe)
92
92
93
+
> **Tamper protection:** The GameHost watchdog (running as SYSTEM) locks `monitor.db`
94
+
> and `events.log` so a standard (child) user can read/write them but **cannot delete
95
+
> or rename them** — closing DeviceMon no longer lets them wipe usage history. The
96
+
> watchdog also keeps SYSTEM-only backups under `C:\ProgramData\SystemHelper\Protected\`
97
+
> and restores the database (and `DeviceMon.exe`) if either goes missing. This
98
+
> protection is released automatically when GameHost is uninstalled.
99
+
>
100
+
> *(Older installs stored these files under `%LOCALAPPDATA%\SystemHelper\`; they are
101
+
> migrated to the protected location automatically on first launch of this version.)*
102
+
93
103
### Usage tracking modes
94
104
95
105
Tracking behavior is configured independently for every process using the **Background** and **Filter overlays** columns in the Limits table. Both options are off by default. The checkboxes save immediately and do not require the application to have a daily limit.
@@ -140,7 +150,7 @@ Usage recorded by an older release has only a total and cannot be reconstructed
140
150
141
151
Existing databases are upgraded automatically. Tracking policies are also included in configuration exports and restored during import.
142
152
143
-
`DefaultLimits` and `Schedule` from `appsettings.json` are imported only when the SQLite database is created for the first time. After initialization, the database is authoritative: limits or schedules removed in the dashboard remain removed after restart. Delete `%LOCALAPPDATA%\SystemHelper\monitor.db`only when you intentionally want a fresh first-start import.
153
+
`DefaultLimits` and `Schedule` from `appsettings.json` are imported only when the SQLite database is created for the first time. After initialization, the database is authoritative: limits or schedules removed in the dashboard remain removed after restart. To force a fresh first-start import, delete `C:\ProgramData\SystemHelper\monitor.db`— but note the watchdog protects this file (see [Data storage](#data-storage)), so you must first uninstall GameHost (as admin) to release the lock.
144
154
145
155
---
146
156
@@ -284,11 +294,43 @@ Place this file alongside `DeviceMon.exe`. All settings are optional — default
284
294
285
295
> **Security note:** When remote access is enabled, remote users cannot open the dashboard until an admin password has been created from a trusted local dashboard. After setup, remote users are redirected to the login page. Successful authentication creates an HTTP-only session cookie; use **Settings → Logout** to end that browser session. The built-in dashboard listener is HTTP only; do not expose it beyond a trusted LAN unless you put it behind a TLS reverse proxy, VPN/tunnel, or a trusted local certificate setup.
286
296
287
-
### Installing the Watchdog (optional, requires admin)
297
+
### Recommended install: protected Program Files location (requires admin)
298
+
299
+
For a child's PC, install DeviceMon into `C:\Program Files\DeviceMon` so the child **cannot delete or modify the application files**. Program Files grants standard users read-and-execute only, so the child can still be forced to close DeviceMon (Windows always allows ending your own process), but they cannot delete `DeviceMon.exe`, `GameHost.exe`, the DLLs, or `appsettings.json` — and the watchdog relaunches DeviceMon within ~5 seconds.
300
+
301
+
```powershell
302
+
# Run PowerShell as Administrator from the publish folder, then:
This copies the app to the protected folder and installs the `GameHost` watchdog pointing at it. The usage database and logs stay in `C:\ProgramData\SystemHelper` (writable so usage can be recorded, but protected against deletion — see [Data storage](#data-storage)).
310
+
311
+
#### Updating a Program Files install
312
+
313
+
Because the app folder is read-only to standard users, the in-dashboard updater can't write to it directly. You have two options:
314
+
315
+
1.**Re-run `install.ps1`** as Administrator against the new publish folder — it stops the watchdog, replaces the files, and restarts everything.
316
+
317
+
2.**Quiet updates from the dashboard** (no admin prompt, works remotely) — configure a trusted update source at install time:
The source is stored in a SYSTEM-only file (`C:\ProgramData\SystemHelper\Protected\update-source.json`) that the child cannot read or change. When you click **Settings → Update**, the dashboard just *triggers* an update; the `GameHost` service (running as SYSTEM) performs it silently from that fixed source and relaunches DeviceMon in the child's session. Because the source is fixed, the child cannot redirect updates to malicious files — the dashboard never gets to choose where SYSTEM pulls from.
328
+
329
+
### Installing only the Watchdog (optional, requires admin)
288
330
289
-
**Normally you don't need to do this manually** — when you run `DeviceMon.exe`, it auto-detects `GameHost.exe` in the same folder and offers to install the watchdog service with a single UAC prompt.
331
+
**If you are not using `install.ps1`,** you normally don't need to do this manually either — when you run `DeviceMon.exe`, it auto-detects `GameHost.exe` in the same folder and offers to install the watchdog service with a single UAC prompt.
290
332
291
-
Manual install is only needed if you want to install the watchdog separately (e.g., deploying to a different folder after the fact):
333
+
Manual watchdog install is only needed if you want to install it separately (e.g., deploying to a different folder after the fact):
292
334
293
335
```powershell
294
336
# Run PowerShell as Administrator, then:
@@ -405,10 +447,10 @@ A: Run PowerShell **as Administrator**. The service requires elevation to create
405
447
A: Set `EnableRemoteDashboard` to `true` in the `appsettings.json` beside `DeviceMon.exe`, then restart DeviceMon. The app binds to all LAN interfaces when remote mode is enabled. Ensure the Windows Firewall allows port 5000.
406
448
407
449
**Q: How do I reset all usage data?**
408
-
A: Delete the SQLite database at `%LOCALAPPDATA%\SystemHelper\monitor.db` while the monitor is not running. It will be recreated on next launch.
450
+
A: The database is tamper-protected while GameHost is installed (a standard user, and even an admin, cannot delete it). To wipe it, uninstall the GameHost watchdog as administrator (this releases the lock), then delete `C:\ProgramData\SystemHelper\monitor.db` while DeviceMon is not running. It is recreated on next launch.
409
451
410
452
**Q: Where are logs stored?**
411
-
A: `%LOCALAPPDATA%\SystemHelper\monitor.log` for the main app, and `C:\ProgramData\SystemHelper\watchdog.log` for the watchdog service.
453
+
A: `C:\ProgramData\SystemHelper\events.log` for the main app, and `C:\ProgramData\SystemHelper\watchdog.log` for the watchdog service.
412
454
413
455
**Q: Can I run it without the web dashboard?**
414
456
A: No. The web dashboard is the primary UI.
@@ -462,7 +504,7 @@ A: The **watchdog service** (`GameHost.exe`) runs under SYSTEM account and track
462
504
A: Yes. Click the **Pause** button on the dashboard **Live** tab or from the system tray icon context menu. Click **Resume** to continue tracking.
463
505
464
506
**Q: What happens when I close DeviceMon.exe?**
465
-
A: If the watchdog is installed, it restarts DeviceMon.exe within 15 seconds. To fully stop, uninstall the watchdog first (`GameHost.exe --uninstall` as Admin), then close DeviceMon.
507
+
A: If the watchdog is installed, it restarts DeviceMon.exe within ~5 seconds. To fully stop, uninstall the watchdog first (`GameHost.exe --uninstall` as Admin), then close DeviceMon.
466
508
467
509
**Q: Does the app work offline / without internet?**
468
510
A: Yes. The dashboard and all monitoring features work entirely locally. Only email notifications/control require internet access.
0 commit comments