Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
service Directory Reference

Directories

 
include
 
src
 
test

Detailed Description

PanoptesService

The service is the center of Panoptes. It collects events from the driver and the hook DLL, writes the log, sends files to the containers to scan, and acts on detections. See the main README for how the components fit together.

What it does

The service publishes its gRPC port under SOFTWARE\Panoptes in the registry (HKLM; HKCU in Debug builds, which run unelevated), where the containers and scanners find it.

Logs

Every event is written to C:\ProgramData\Panoptes\Logs\pano.log as one JSON object per line (NDJSON), with Event as the first key. The log rotates at 5 MB to pano1.log, pano2.log, and so on (old files are kept); after a restart the service continues in the newest one. Paths in LogExclusions are not logged but are still scanned. Debug builds also echo each event to the console.

Hook events arrive about a second after they happen, often after the process has exited. Their Image and TargetImage therefore come from the driver's ProcessCreated for that PID: the service remembers each image until a minute after the process exits, and picks the process that had that PID at the event's time. Processes that started before the service are looked up from Windows instead, and are empty if they have already exited.

The log viewer in tools/ browses a log by process.

Running

Run PanoptesService.exe as Administrator, with the driver already running.

Flag Effect
--driver Debug builds only: use the driver. Without it, Debug builds skip the driver so the service can be debugged unelevated. Release builds always need it.
--stop Asks a running service to shut down cleanly and waits (up to 15 seconds) for it to exit.
--wait Pauses before any initialization, so a debugger can attach first.

Configuration

The service reads panoptes.config, a JSON file, from its folder. Check it with the linter before deploying.

Key Type Description
Exclusions Path patterns Files that are not scanned
LogExclusions Path patterns (* wildcards) Events for these paths are not logged; the files are still scanned. Named pipes and mailslots are matched in the form programs open them (\\.\pipe\name).
DontInject File names or full paths (*, ? wildcards) Processes the hook DLL is not injected into, e.g. msedge.exe, C:\Tools\app.exe or C:\Tools\* (* also matches subfolders)
FileEvents List The file system event groups the driver reports: Create, Write, DeleteRename, PipeMailslot, Security, ExtendedAttributes
QuarantineMaliciousFiles Boolean Move detected files to the quarantine folder
EnforceDetectionActions Boolean (default false) Carry out the kill and quarantine actions of detector rules. When off, those detections are logged and notified only. Kills are always refused for PID 0 and 4, the service, its containers and detector, critical processes, and a process ID reused since the match. Quarantine skips paths in Exclusions.

The default configuration is assets/panoptes.config.