Repository navigation
refactor(systray): Redesign systray communication flow - #746
Open
rabbitstack wants to merge 1 commit into
Open
rabbitstack wants to merge 1 commit into
rabbitstack wants to merge 1 commit into
Conversation
The systray alertsender and the server have the communication direction reversed.
The service (or foreground fibratus run) now hosts the pipe, and fibratus systray
in each user session connects as a read-only client. The service never starts or
impersonates anything in a user session.
The pipe DACL gives SYSTEM and Administrators full control and gives interactive
users read only, so nobody else can write to it or create pipe instances. The sender
creates it as the first instance, so a squatted name is detected and the sender
disables itself without breaking detection.
Client opens the pipe at the anonymous impersonation level and refuses to read from
a pipe not owned by SYSTEM or Administrators.
Wire format is altered. Only {title, text} crosses the pipe, one JSON line per message,
with size caps. Labels and events never leave the service.
Every logged-on user, including RDP, runs their own helper. A helper that starts late or
outlives a service restart reconnects, so there is no 30-minute wait.
Helper instance is spawned per session (a Local\ mutex). It keeps a hidden top-level window
so it can receive TaskbarCreated and re-add the icon after an explorer restart. Its logs go
to %LOCALAPPDATA%\Fibratus\Logs, because users can’t write to Program Files.
The systray binary is superseded by a single binary that repurposes the
Fibratus own binary with a new subcommand.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this PR / why it is needed?
The systray alertsender and the server have the communication direction reversed. The service (or foreground fibratus run) now hosts the pipe, and fibratus systray in each user session connects as a read-only client. The service never starts or impersonates anything in a user session.
The pipe DACL gives SYSTEM and Administrators full control and gives interactive users read only, so nobody else can write to it or create pipe instances. The sender creates it as the first instance, so a squatted name is detected and the sender disables itself without breaking detection.
Client opens the pipe at the anonymous impersonation level and refuses to read from a pipe not owned by SYSTEM or Administrators.
Wire format is altered. Only {title, text} crosses the pipe, one JSON line per message, with size caps. Labels and events never leave the service.
Every logged-on user, including RDP, runs their own helper. A helper that starts late or outlives a service restart reconnects, so there is no 30-minute wait. A helper instance is spawned per session (a Local\ mutex). It keeps a hidden top-level window so it can receive TaskbarCreated and re-add the icon after an explorer restart. Its logs go to %LOCALAPPDATA%\Fibratus\Logs, because users can’t write to Program Files. The systray binary is superseded by a single binary that repurposes the Fibratus own binary with a new subcommand.
What type of change does this PR introduce?
/kind refactor (non-breaking change that restructures the code, while not changing the original functionality)
/kind improvement
Any specific area of the project related to this PR?
/area alertsenders
Special notes for the reviewer
Does this PR introduce a user-facing change?