Detection Engineering · Threat Hunting · RMM Abuse · 2 min read

Detect ScreenConnect by Code Signer in Elastic (ES|QL)

Detects: any process signed by ConnectWise, the ScreenConnect vendor, matched on the signer name rather than on whether the signature is trusted.

ATT&CK: T1219 Remote Access Tools

Works on: Elastic Defend endpoint events, ES|QL (logs-endpoint.events.process-*)

Tested on: two real ScreenConnect samples I detonated: one predicate, five binaries, trusted true on every row

Full write-up: ScreenConnect RMM Abuse: The Cloud Client Gets In, The Self-Hosted One Stays

Same field, opposite polarity

Both samples were validly signed by ConnectWise LLC, DigiCert Trusted G4. The instinct to filter on code_signature.trusted == false would have dropped both outright. There is nothing to be unsigned about: a cloud-built client is the vendor’s own file.

So do not ask “is this untrusted.” Ask “is this a remote-management vendor’s binary running where one should not be.” The valid ConnectWise signature that defeats the trust filter is the exact field that catches the tool, if you read it the other way. That is what caught both samples on Elastic.

The query

Published verbatim from the newsletter issue.

FROM logs-endpoint.events.process-*
| WHERE @timestamp > NOW() - 30 days
| WHERE event.action : "start"
| WHERE STARTS_WITH(process.code_signature.subject_name, "ConnectWise")   
| STATS firstseen = MIN(@timestamp), events = COUNT(*), paths = TOP(process.executable, 5, "asc")
    BY host.name, process.name, process.code_signature.subject_name, process.code_signature.trusted

Elastic results: five ScreenConnect binaries signed ConnectWise, LLC, with process.code_signature.trusted true on every row

What it catches

One predicate, five binaries: the Windows client, the client service, the Backstage shell, the setup EXE and the file manager. trusted reads true on every row. That column is the argument.

Get the next detection in your inbox

One lab-proven detection per issue: the attacker command, the telemetry it leaves, and the KQL / ES|QL that catches it.

You confirm on Substack in one tap.

No spam. Unsubscribe anytime.

Tuning note

Treat code_signature.trusted as an enrichment field to display, never as the discriminator.

If your estate runs ScreenConnect, the same evidence sorts a sanctioned MSP session from an attacker: one or two hosts instead of the fleet, a relay you did not sanction and an Access role you did not deploy.

SigmaHQ rule that fired on the second sample’s telemetry: Remote Access Tool - ScreenConnect Execution

Questions

Why not filter on code_signature.trusted == false?

Because a cloud-built client is the vendor's own file. trusted read true on every row from both samples, so that filter would have dropped both samples.

Should I add a process.pe.company fallback?

It did not help: process.pe.company is null on every process event the Elastic stack I tested on has ever written. A leg that cannot fire does not widen a rule, it hides how narrow the rule is.

More ScreenConnect hunts

#screenconnect#remote-access-tool#t1219#esql#elasticsearch

New detections go out by email first: subscribe to the newsletter.