Install Guard: Pre-Installation Health Check Plugin

Introduction

When running scripts or installing third-party tools in DSH (DeepSeek Harness), it’s easy to run into the “seemed fine, but something’s off after installation” situation. Real malicious behavior rarely announces itself in the installer. It runs silently, hides its payload in system directories, and even modifies Defender policies.

Install Guard (@wymly/dsh-install-guard) turns the idea of “figure out what you’re installing before you install it” into a reproducible process. It performs read-only checks only: verifying file hashes and signatures, identifying installer types, recording download origin markers, and comparing auto-start and network baselines before and after installation. It does not delete files, modify settings, or connect to the internet for reputation lookups.

Plugin Overview

Maintainer: WYMLY
Category: admin-security
Platform: Windows
License: MIT
Version: 0.1.4

This plugin is a security utility within the DSH ecosystem. It performs a health check on target files before execution and detects anomalous behavior after installation through baseline comparison. It does not replace antivirus software; instead, it breaks security checks into verifiable steps so that “is this trustworthy” becomes a question you can answer with a few checkable numbers.

Core Features

The plugin provides five actions, each corresponding to a set of read-only checks.

inspect: Examine a Downloaded File

Performs a health check on a downloaded binary file and outputs:

  • File size and SHA256 hash
  • Digital signature status and subject
  • Installer type (NSIS / Inno / PyInstaller / Nuitka / Electron)
  • Download markers (Zone.Identifier, HostUrl, ReferrerUrl)
  • Embedded URLs and IPs
  • Suspicious string matches

Example output (from a real environment):

━━ 安装前体检  inspect ━━
文件     C:\Users\me\Downloads\setup.exe
大小     258.8 MB(271,338,829 字节)
SHA256   91FD8671CAA99BDA…9BD88E61F
签名     未签名 · NotSigned
类型     二进制 · MZ/PE
安装器   是 · NSIS
下载标记 有 · ZoneId=3 / HostUrl=https://… / ReferrerUrl=https://…
内容
内嵌URL  8 条
         · https://…/update
可疑串   没命中
结论     未签名 + 有下载标记,跑之前先拍底

snapshot: Capture the Current Baseline

Records the system state before installation, including:

  • Scheduled tasks (including system directories such as Microsoft\Windows\WindowsUpdate)
  • Services
  • Run registry keys
  • Startup directory
  • WMI auto-start entries
  • Listening ports
  • Outbound connections

Output is a JSON file that can be used for later comparison.

diff: Compare Before and After

Reads two snapshots, outputs a list of differences, and flags entries pointing to “user-writable directories.” Example output:

━━ 差异  diff ━━

计划任务   新增 2 · 消失 0
  + \Microsoft\Windows\WindowsUpdate\ZoomLogonHelper98d6dbab
      → C:\Program Files\Zoom\zoom-service.exe        ⚠ 用户可写
服务       新增 1 · 消失 0
  + chef-client-service
      → C:\Program Files\Chef\chef-client-service.exe ⚠ 用户可写

没变化     监听端口 · 对外连接
结论       3 条指向用户可写目录,停手

The ⚠ 用户可写 (user-writable) flag is where this tool shines: legitimate services don’t place their executables in paths that regular users can modify. When they do, it’s usually a disguise.

sweep: Full Disk Scan by Hash

Once you have the hash of a known suspicious sample, you can search the entire disk by hash (optionally with size). This is how you catch the same batch of payloads that were renamed and hidden elsewhere.

guide: Checklist

Provides a complete security checklist, including four-gate details, a red flag table, and post-compromise response procedures.

Installation & Enablement

Install from npm:

plugin_manager action=install_bundle target=@wymly/dsh-install-guard

Install from a local directory (for development and debugging):

plugin_manager action=install_bundle target=D:\path\to\dsh-install-guard

After installation, you can enable/disable it with the following commands:

plugin_manager action=set_bundle target=@wymly/dsh-install-guard enabled=false
plugin_manager action=set_bundle target=@wymly/dsh-install-guard enabled=true

Typical Usage

In DSH, just use natural language—no need to memorize parameters:

  • Check whether an exe is safe to run:
  帮我看下 C:\Users\me\Downloads\setup.exe 安不安全
  • Record the state before installation, then compare after:
  装之前先拍个快照
  → execute the install
  装完拍个快照,跟刚才那份比一下
  • Same batch of payloads renamed and hidden elsewhere:
  按这个哈希全盘找:5AA51FBAA2D61ACF…
  • View the manual:
  install_guard 手册

You can also invoke it manually:

install_guard action=inspect  path=C:\Users\me\Downloads\foo.exe
install_guard action=snapshot                    # records the baseline JSON path
install_guard action=snapshot
install_guard action=diff     before=<pre-install> after=<post-install>
install_guard action=sweep    hashes=5AA51FBAA2D61ACF… sizes=3387424
install_guard action=guide

Applicable Scenarios & Caveats

Suitable for the following scenarios:

  • Installing third-party tools or scripts within DSH
  • Reproducing system state differences before and after installation
  • Performing security checks on binaries of unknown origin

Caveats:

  • The plugin runs with the current DSH process permissions; review the source code and license before installing
  • The plugin does not connect to the internet for file reputation checks, does not consult VirusTotal, and does not make the “should I install this” decision
  • Not finding a URL within readable scope does not mean one doesn’t exist; packed content cannot be identified
  • A valid signature only means the file was signed by some entity; it does not mean the author is trustworthy
  • For unsigned programs in unfamiliar environments, it is recommended to run them first in a virtual machine or Windows Sandbox

Summary

Install Guard turns “figure out what you’re installing before you install it” into a reproducible process: file fingerprinting, signature verification, installer type identification, download origin tracking, and auto-start/network baseline comparison. It does not replace antivirus software; instead, it provides a set of read-only checks so that security decisions are grounded in verifiable numbers.

  • Plugin directory page: https://www.skillhub.cn/plugins/WYMLY/dsh-install-guard
  • GitHub: https://github.com/WYMLY/dsh-install-guard
  • npm: https://www.npmjs.com/package/@wymly/dsh-install-guard
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye