Join our Newsletter — 33% off our NHI Course
Home› FAQ› Threats, Abuse & Incident Response› What are the signs that a Linux trojan…
Threats, Abuse & Incident Response

What are the signs that a Linux trojan is using a custom encrypted handshake instead of a simple beacon?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 25, 2026 Domain: Threats, Abuse & Incident Response

A custom handshake usually shows multiple staged packets, integrity checks, and bidirectional verification before any command runs. In this case, the malware reads fixed size blocks, derives keys from shared material, compares hard coded byte sequences, and stops if validation fails. Those steps indicate a protocol built to resist casual inspection and frustrate decryption.

What a Custom Encrypted Handshake Looks Like in Network Traffic

A custom handshake is rarely a single request and reply. The malware typically exchanges several small packets, waits for a valid response, and only then moves into command handling. That structure often replaces the simple periodic beacon pattern you would expect from a noisier or less mature implant.

Look for fixed-length reads, framed messages, and repeated state changes rather than one-way polling. A handshake usually has a negotiation phase, a validation phase, and then an execution phase, which means the traffic often looks conditional instead of uniformly repetitive. If the first exchange fails, the client may stop or retry with a different branch.

Another sign is that the protocol carries its own trust checks. Instead of sending plaintext identifiers, the sample may derive keys from shared material, compare hard-coded byte sequences, or require the peer to prove knowledge of the same secret before accepting commands. Those traits are common when an operator wants to make passive decryption and replay much harder.

How to Distinguish It from a Simple Beacon

A beacon is usually easy to describe: it calls out, waits, and repeats on a schedule. A custom encrypted handshake is more interactive. You may see challenge-response behaviour, bidirectional verification, and packet content that changes based on prior messages, which is a strong indicator that the malware is not just checking in for tasking.

Timing can help, but it is not enough on its own. Some implants still beacon while negotiating, and some handshakes are disguised as ordinary HTTPS sessions or other common protocols. The better discriminator is whether the malware needs prior context to proceed, because that dependency usually shows stateful protocol logic rather than a simple callback loop.

In packet captures and memory traces, the more telling clue is control flow. If the code parses a block, validates it, derives or unwraps a key, and only then enables the next stage, the traffic is likely carrying protocol semantics. By contrast, a plain beacon generally returns to the same transmission pattern with little or no multi-step validation.

Why Encrypted Handshakes Matter to Defenders

Custom handshakes are built to reduce visibility. They can hide command structure, frustrate signature-based inspection, and make replay or offline analysis less effective. That means the defender often has to rely on protocol behaviour, sequence analysis, and endpoint reconstruction rather than expecting obvious plaintext indicators in the network stream.

They also create a different hunting problem. Once the malware insists on a specific sequence, failed validation events, truncated exchanges, or abrupt connection drops become useful signals. Those failures may not prove compromise by themselves, but they often mark the boundary where a benign service probe ends and a gated malicious protocol begins.

The practical implication is that encryption alone is not the clue. The clue is the combination of encryption with staged negotiation, secret-dependent validation, and behaviour that changes once the peer proves it belongs. That is what separates a low-effort beacon from a more deliberate covert channel.

Risk and Threat Considerations

Custom encrypted handshakes increase operational risk because they can conceal command-and-control logic inside otherwise ordinary-looking traffic, making detection and triage slower. They also raise the cost of response, because analysts may need endpoint artefacts or protocol reverse engineering before they can confirm what the malware is doing.

Failure mechanism: The implant enforces a protocol gate, such as shared-secret verification or hard-coded byte comparison, before revealing later stages. That lets the operator suppress unauthorised analysis, block casual replay, and keep downstream commands hidden until the expected state is reached.

Impact: If defenders treat the traffic as a simple beacon, they may miss the real tasking channel, under-estimate persistence, and delay containment. The longer the covert protocol remains opaque, the more likely the intruder can keep communicating, adapting, or staging follow-on activity.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while OWASP ASVS sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKT1095 — Non-Application Layer ProtocolCustom handshake malware often rides protocol-like traffic with staged exchange.
T1071 — Application Layer ProtocolEncrypted handshakes commonly disguise C2 inside common application protocols.
T1027 — Obfuscated Files or InformationCustom encrypted handshakes use obfuscation to resist inspection and decryption.
Recommendation — Map the protocol flow to T1095 and hunt for non-standard C2 message sequencing. Correlate the handshake to T1071 and inspect for protocol abuse in web or DNS traffic. Apply T1027 hunting logic to detect encoded or concealed command content.
OWASP ASVSV11 — CryptographyEncrypted handshake analysis depends on key handling and message integrity checks.
Recommendation — Verify cryptographic state handling where secrets gate protocol progression.

Practitioner Guidance

What to verify: Check whether the sample’s network logic is stateful, not just periodic. Confirm whether each exchange depends on prior material, whether the payload length stays fixed across stages, and whether failure causes the session to terminate instead of simply retrying on a timer.

Decision rule: If the traffic only repeats, treat it like a beacon problem; if the traffic negotiates, validates, and gates later actions on secret-dependent checks, treat it like a custom protocol and move to protocol reconstruction before hunting for command content.

Practitioner takeaway: The key judgement is not whether the traffic is encrypted, but whether it behaves like a negotiated protocol with state and trust checks. That distinction usually determines whether you can hunt it with network monitoring alone or need endpoint-level reconstruction to understand it.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 25, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org