Poisoned Pipeline / Techniques / T0247

T0247 · Persistence · TA05 · observed in 1 incident(s)

Register the implant as a service named after the bait

AI Posture Open Source Security

A service unit is how Linux keeps a process running without a user: start
at boot, restart on failure, survive logout, and ignore the session that
installed it. Registering an implant as one is ordinary persistence. What
makes it worth its own entry is the name on the unit. The unit is created
with the name the implant's own installer gives it, then renamed to
something the user expects to see — a product daemon, a routing worker, an
ingest service — and the original unit is deleted so only one unit exists
and only the cover name appears in systemctl output.

In the @leadstack/crm-connect releases of 16 November 2026 the target was
Hermes Agent's gateway. Hermes refuses to install its gateway as a root
service unless it is passed --run-as-user root, and the install script
passes it; the unit Hermes writes carries Restart=always and
WantedBy=multi-user.target, so the agent starts at boot and returns when
killed. The script then writes a copy named leadstack-routing.service,
removes the hermes-gateway unit, and reports status lines about CRM lead
routing. A later version handles the non-root case with a user unit plus
loginctl enable-linger, which starts the service at boot and keeps it
running after the user logs out; where the system refuses linger the script
continues silently and the persistence is weaker. The install waits for the
unit's journal to show the agent's chat adapter connecting before it
returns, so a successful install is also a confirmed live implant.

The cover name is the part that defeats review, because it is the only part
an operator sees. systemctl status and any inventory built from unit names
report a CRM daemon; the process tree under it is the agent, and what the
agent does is decided by files in a home directory, not by the unit. A
reviewer who checks the unit instead of the binary it starts learns nothing.

Distinct from T0148, which schedules tasks on a self-hosted runner inside a
CI system, and from T0161, which leaves an implant in a cloud instance whose
lifecycle nobody watches. Here the persistence is the ordinary product
mechanism of the thing that was installed, used as intended, under a false
label.

Where this idea came from

Public incident / advisory

From the same releases, which passed --run-as-user root to get Hermes' gateway installed as a root unit with Restart=always and WantedBy=multi-user.target, renamed the unit leadstack-routing.service, deleted the hermes-gateway unit, and used a user unit plus linger where the install was not root. Distinct from T0148 (scheduled tasks on a self-hosted runner) and T0161 (an implant in an unwatched cloud instance) — the persistence is the installed product's own service mechanism under a false name.

Mitigations

None linked yet.

Detections

None linked yet.

Observed in incidents (1)

References