Skip to content

Security: TemRevil/Glass-Rea

SECURITY.md

Security

Report a vulnerability

Please use GitHub's private vulnerability reporting on this repository. Don't post exploitable details, captured traffic or your usage database in a public issue.

Threat model

Glass-Rea is a monitor for one PC and the people who use it. The service runs as SYSTEM so it can read the kernel's network events and change Windows Firewall rules. Everything it records stays on the PC, in C:\ProgramData\Glass-Rea\data.db; none of it is sent anywhere. The app's only internet use of its own is asking GitHub for the latest release once a day (Settings > About can turn that off), and setup's is downloading the .NET 10 runtime from Microsoft when it's missing. PRIVACY.md has the details.

The app talks to the service over a local named pipe that any signed-in user of the PC can open. That is deliberate: any user can see usage, devices and alerts, block or unblock apps, change limits, turn the service's permissions on or off (Settings > General > Permissions), delete the recorded history and set the service's processor priority (Normal, Above normal or High, never Realtime). While a permission is off, the service doesn't do that thing: no capture session, no firewall filters, no read of Windows' history, no scans or listening sockets. Don't install it on a machine shared with people who shouldn't see or change those. The pipe isn't reachable from the network.

The install folder holds the service's files and is locked to Administrators and SYSTEM, wherever you install it, so a standard user can't replace what SYSTEM runs. The usage database keeps ProgramData's default permissions, so every user of the PC can read it, as they can through the pipe. Firewall rules the app made are removed on uninstall, so nothing stays blocked.

Releases are built from this repository on GitHub's machines and signed by SignPath Foundation, each signing approved by hand (README, "Code signing policy"). The app installs an update only if it is exactly the file GitHub recorded and is signed either by SignPath Foundation, with a chain Windows trusts, on a file whose product name is Glass-Rea (SignPath signs many projects), or by the pinned Tem Revil certificate. GitHub must have recorded a checksum for the file. Releases up to 1.2.0 were signed with that self-signed "Tem Revil" certificate, which only the PC that made it trusts (scripts\make-cert.ps1); on any other PC Windows shows an unknown publisher for them.

There is no independent security audit. Host names come from DNS answers seen on the PC and device names from the local network, so both can be spoofed by anyone on that network.

Local network discovery

While Device discovery is on (Settings > General > Permissions), and only then, the service names the devices on your network. Every few minutes, and only on the network adapter that reaches your router, it:

  • pings each address in the subnet (capped at 1022 addresses);
  • asks each device that answered for its name over Bonjour (UDP 5353), NetBIOS (UDP 137) and UPnP (UDP 1900), and fetches a UPnP description only from the device that offered it, over plain HTTP, with no redirects and at most 512 KB;
  • tries to connect to a few TCP ports (62078, 7000, 9100, 631, 515, 445, 139, 8008, 8009, 8060, 1400, 554, 5555) and closes the connection at once, sending nothing.

It also listens, without sending, for the DHCP requests (UDP 67) and Bonjour announcements (UDP 5353) devices broadcast. For that it adds one inbound Windows Firewall rule, "Glass-Rea device discovery", limited to the Glass-Rea service, UDP, those two ports, the local subnet, and networks Windows treats as private or work (never public ones). Turning Device discovery off closes both listeners and removes the rule; uninstall removes it too. Everything received is parsed as untrusted input (bounds-checked, size-capped, XML without DTDs), only ever shown as text, and kept per device on this PC (at most 64 facts per device and 5,000 in all, forgotten after 30 days). An announcement is only taken as describing the device that sent it, and a UPnP description is only fetched from a path that looks like one, with no query string or user name. On a network you don't trust, the alerts and names it shows are only as honest as the devices on it.

There aren't any published security advisories