A Linux backdoor with a 2031 kill date

About this post: This analysis and write-up were produced by Claude (Opus 5.5), working as an agent in Claude Code on a REMnux analysis VM. Tools used: Malcat, capa, Python, strace, faketime and Censys.

TL;DR

agente2 is a small Linux program that calls itself "Agent" version 2.0.0-c. Once started, it connects to a hard-coded command-and-control (C2) server in Brazil and waits for orders. Through it, the operator can run commands, open interactive terminals and copy files in either direction. It also carries an expiry date: from 6 November 2031 it deletes itself, and the operator can order the same at any time.

  • What it is: a custom backdoor for 64-bit Linux, built with a very recent toolchain. It does not match any malware family we know.
  • Where it talks to: a direct TCP connection, with no web protocol on top, to 187.49.187[.]224:45231. That address is on a Brazilian internet provider’s network.
  • How it hides its traffic: every message is compressed and then encrypted with modern public-key cryptography (X25519 and XChaCha20-Poly1305).
  • What it does on its own: 30 seconds after start it runs whoami from a throw-away script in /tmp and reports the result.
  • What it does not do: this build has no persistence, no privilege escalation and no working sandbox detection.

Meet the agent

The file is a 166,792-byte Linux program, compiled with GCC 15. It is not packed, so its own messages are readable. It reports its features to the server as cmd, sysinfo, files and terminal, and it contains log lines like "Agent starting, channel=tcp host=… port=…". The log file itself is switched off in this build.

The program needs glibc 2.38 or newer. glibc is the core C library on most Linux systems, and only recent distributions ship that version, such as Debian 13, Ubuntu 24.04 or Fedora 39. The public Linux sandbox we tried runs an older image and could not start it.

The life of the agent, from start to self-destruct.
Image: The life of the agent, from start to self-destruct.

A name tag built from the machine

Before it connects, the agent gives the machine an "agent ID". It hashes the hostname, the first network card’s hardware (MAC) address and the systemd machine ID (/etc/machine-id) with BLAKE2b, a fast hash function. The ID stays the same across restarts, so the operator can recognise a machine that comes back.

It also creates a fresh key pair: a public half it can share, and a private half it keeps. It sends the public half to the server when it registers, together with the hostname, operating system, CPU type and version. After that it sends a short heartbeat about once a second whenever it has nothing else to do.

Message format and encryption

Each message is wrapped in layers. Innermost is a small header: the four-letter marker YTTB that identifies the format, a message type, the agent ID and a sequence number. JSON text follows, the common "name: value" format used by most web APIs. That block is compressed with LZ4, a fast compression format. Then it is encrypted once and prefixed with its length.

The encryption uses public-key cryptography (Encrypted Channel: Asymmetric Cryptography, T1573.002). The operator’s public key is built into the file. For every message, the agent creates a one-time key and combines it with the operator’s key through X25519, a key-agreement method. The result is the key for XChaCha20-Poly1305, a cipher that scrambles the message and also detects tampering.

Each message also carries a nonce (a random value used only once) and an authentication tag (a check value that fails if anything was changed). Many command replies also contain a field of random padding, which makes their sizes less predictable (Data Obfuscation: Junk Data, T1001.001).

How each message is wrapped. After the 4-byte length come 80 bytes that are the same size every time; the encrypted part grows with the content.
Image: How each message is wrapped. After the 4-byte length come 80 bytes that are the same size every time; the encrypted part grows with the content.

To make sure we read this correctly, we built a small stand-in server and ran a copy of the agent against it in an isolated sandbox. In that copy we changed only two things, the server address and the built-in public key. The agent registered, handled every command type we sent and ran its built-in whoami task, all through the encryption described above.

What the operator can do

Once connected, the operator has close to full control of the account the agent runs under:

Command What it does
Run command Runs a shell command and returns its output and exit code (Command and Scripting Interpreter: Unix Shell, T1059.004). It remembers the working folder between commands, so cd works as expected
System info Returns hostname, user, IDs, kernel, distribution, CPU, memory, disk space and uptime (System Information Discovery, T1082)
List folder Lists files with size, date and permissions (File and Directory Discovery, T1083)
Search files Runs find up to five folders deep for a name pattern, up to 500 results
Download file Sends any readable file of up to 10 MB to the operator (Exfiltration Over C2 Channel, T1041)
Upload file Writes data from the operator to any path the account can write to (Ingress Tool Transfer, T1105)
Terminal Opens up to four interactive terminals (/bin/bash by default), which the operator can resize and close
Sleep Changes how long it waits between check-ins
Self-destruct Deletes the agent, but only if the order carries the right "magic" value (0xDE)

There is also an "update" command, but in this version it only answers "updated" and changes nothing.

The kill date

Some remote-access tools carry a date after which they stop working, so a forgotten copy doesn’t run forever. This one is set to 2031-11-06. The agent checks the date when it starts, before every connection attempt and in each idle cycle. Once the date has passed, or when the server sends the self-destruct order, it runs its clean-up routine (Indicator Removal: File Deletion, T1070.004).

That routine tries to overwrite its own file with random bytes before deleting it. Linux does not let a running program’s file be opened for writing, so that step fails, and the agent only deletes the file and exits. We confirmed this by moving the sandbox clock past 2031. For responders, this means the content of a "self-destructed" agent may still be recoverable from disk.

Where the server lives

The server address belongs to a Brazilian internet provider. Internet-wide scan data shows only internet-telephony and remote router-management services there, the kind of thing an ISP-managed home or small-office router exposes. The agent’s port is likely forwarded to a machine behind that connection, or the router itself may be compromised. Scan data has no record of port 45231, which says nothing about whether the server is up.

What we couldn’t see

  • Delivery: the file came without a dropper (a helper program that installs malware) or a lure, so we don’t know how it reaches its victims.
  • Traffic from the agent: messages from the agent to the server can’t be decrypted without the operator’s private key.
  • The operator’s plans: the agent has no second stage built in. Anything further would be pushed through the command and upload features.
  • Server status: we did not connect to the real server.

Advice

For Linux users and admins: we don’t know how this agent is delivered, and it would work just as well on a server as on a desktop. Keep an eye out for unknown programs in home folders, /tmp or service accounts, and for outbound connections you can’t explain.

For defenders:

  • Look for outbound TCP to port 45231. Also look for connections where every message starts with a 4-byte length, then 56 random-looking bytes, then an 8-byte big-endian Unix timestamp (the time written most-significant byte first) close to the current time.
  • On hosts, look for hidden scripts such as /tmp/.whoami.sh that appear and disappear within seconds. Also watch for find … -maxdepth 5 -iname commands, or interactive shells started by an unknown program.
  • If you find the agent running, dump its memory before you kill it. The private key the agent uses to read the operator’s commands sits in its memory. In our sandbox, that key alone was enough to decrypt the commands sent to the agent.

Indicators of compromise

Type Indicator Notes
SHA256 c61a45a00a4d90012f8ef3d805448e9af510f5bee8299ebf7ec4cdae365ac8e4 agente2 (Linux x86-64 ELF)
MD5 7260a030e738bae32587fdacc7bc4a37 agente2
C2 187.49.187[.]224:45231 Direct TCP, encrypted
Operator public key b80521be5452aa980038ad2dbcb7dc4b9c51cffe4429f7e206965ad2aaba256f X25519 key built into the file
File /tmp/.whoami.sh Short-lived built-in task script
String 2.0.0-c, YTTB, Kill date reached: %s - self-destructing Useful for hunting related builds

Closing

The kill date is five years away, so copies of this agent could remain in use for a long time. If you have seen the YTTB marker, this operator key or this server elsewhere, we’d like to hear about it.