Skip to content

LanPower v1.0.1

Latest

Choose a tag to compare

@Mohammask Mohammask released this 21 Nov 07:48

Security hardening and documentation release for the LanPower Linux & Windows agents.

What's Changed

  • Browser CSRF Protection (HTTP 403): Both Linux and Windows agents now reject POST requests containing a browser Origin header (browser_requests_not_allowed), blocking malicious websites from triggering local power actions even when no PIN is configured.
  • Windows Install Directory Hardening: Verifies C:\ProgramData\LanPower is not a symlink/junction and is owned exclusively by SYSTEM or Administrators before installing, changing PIN, or uninstalling.
  • PIN Validation: Enforces 4–64 printable ASCII characters without spaces (preventing broken non-ASCII/whitespace PINs) and warns if shorter than 6 characters.
  • Private-LAN-Only Firewall Rules (Linux): Automatically opens UFW / firewalld rules strictly for private LAN subnets (RFC1918, 100.64.0.0/10, link-local) and skips public subnets.
  • Python 3.7+ Check: Verifies Python 3.7+ early before writing config or systemd service files.
  • Documentation & FAQ: Added an HTTP vs. HTTPS threat model FAQ and clarified Windows shutdown.exe /f and Sleep/Hibernate behavior.

Android App

The Android app (com.mohammask.lanpower) is unchanged from v1.0.0 — the signed LanPower-v1.0.0.apk is attached in the Assets section below for convenience.

Linux & Windows Agents

The updated agents live directly in the repository and can be installed or updated with a single command:

Linux (systemd + Python 3.7+):

curl -fsSL https://raw.githubusercontent.com/Mohammask/LanPower/main/linux/lanpower.sh | sudo bash

Windows 10 / 11 (Administrator PowerShell):

irm https://raw.githubusercontent.com/Mohammask/LanPower/main/windows/lanpower.ps1 | iex