Honeypot capture

X86_64 ELF 64-bit LSB executable ddos-bot (4a836ddfa339)

C2 recoveredProtocol documented

A honeypot sensor network captured a 128,272-byte x86-64 ELF. The pipeline loaded the sample as data, never executed it, and contacted or resolved no recovered endpoint. It read 4 of the 18 flood handlers and typed 6 of roughly 30 attack options, a second decompiler confirmed 7 of the 14 C2 claims, and the zip-magic payload at 0x1d260 was not carved. C2 is the channel an infected machine uses to reach its operator for instructions, and static analysis recovered one such endpoint, a single host blacked[.]b5m[.]co[.]uk on 35450/tcp. The wire format was documented well enough to decode it, and four test vectors replay through the recovered dissector.

The file is a statically-linked musl ELF that decrypts one of its own code sections with a repeating XOR key before main runs, ChaCha20-decrypts 34 configuration strings, resolves the decrypted host through a DNS client of its own, beacons raw TCP, and dispatches an 18-vector DDoS flood engine plus a shell-exec command.

The sample’s lineage is uncertain, because it resembles a Mirai-lineage fork at classification confidence 0.75 and carries the gafgyt string signature TSource Engine Query, while its ChaCha20 config crypto and hand-rolled resolver are features commodity Mirai does not have. The pipeline does not attribute the family.

SHA-2564a836ddfa3397319b6cf0c5488ffce95bbc4814ec765efce3745ef3237bf1754
MD5297d1116389f0827884eb60794205309
SHA-14767af09260009a455fcd3767d130e8dd7320595
ssdeep3072:Gtvcezj6USWWY50tfD4VMNmpx6utoU+rNuM9vM0RkNzG53OX:K0AFWddD4x6KFcuM5M0uNzQ3OX
File typeELF 64-bit LSB executable, x86-64, statically linked, stripped (musl)
Size128,272 bytes

ssdeep is a fuzzy hash that stays similar when a file is edited slightly, so near-identical variants can be matched.

How the endpoint is decrypted and resolved

An init_array constructor at 0x401054 runs before main and XORs the 4 KB .crypt code section in place with a 32-byte key, bracketed by mprotect RW→RX. The sample derives the key at runtime by running xorshift32 twice over eight embedded seeds at 0x40154b/0x401535, which gives 8e6f7a00…1aa58a92. That stage gates the attack handler at 0x416000.

The second decryption stage is ChaCha20, located by its sigma constant "expand 32-byte k" at 0x4051b5, with a 256-bit key hardcoded in .data at 0x61f020 and duplicated at 0x61f080. Config-string slot 3 decrypts to the C2 host:

sub_416234(3, 0x41cb99, 0x11) /* config-string slot 3: ChaCha20-decrypts to 'blacked[.]b5m[.]co[.]uk' (17 bytes) */ — binja @ 0x4162aa (host defanged here)

The port is a htons constant loaded in main:

data_61f152 = sub_40d38e(0x8a7a) /* htons(35450): C2 port, loaded in main at 0x4002ff/0x4008ed/0x400918 */ — binja @ 0x4008ed

The sample resolves the host through a DNS client at 0x4018da, which queries one of five hardcoded public resolvers — 1.1.1.1, 8.8.8.8, 77.88.8.8, 77.88.8.1, 9.9.9.9 — chosen by rand() % 5, then picks a random A record from the answer:

char* rax_57 = sub_4018da(*(data_61f2f8 + 0x30)) /* hand-rolled DNS resolve of config slot 3, then data_61f154 = A-record[rand()%n] */ — binja @ 0x4018da

Those five resolvers are infrastructure the sample uses, and the indicator set excludes them.

The sample issues the connect() call through a generic syscall wrapper at 0x40f3e7, so a naive syscall-constant search misses it:

return sub_40bb50(j_sub_40f3e7(0x2a, sx.q(arg1), arg2, zx.q(arg3), 0, 0, 0)) /* connect() via the generic syscall wrapper; AF_INET SOCK_STREAM from sub_40db86(2,1,0) */ — binja @ 0x40d31c

Because the ChaCha20 key is static and shipped in the binary, captured traffic from any host running this build is decryptable offline.

The three anti-analysis gates

Three anti-analysis gates sit in front of main and abort the run if they fire: ptrace(PTRACE_TRACEME) at 0x401ccc, a TracerPid read from /proc/self/status at 0x4020c4, and a match on vbox, vmware, qemu or kvm in /proc/cpuinfo or osrelease at 0x401f67.

The wire protocol and command dispatch

Transport is raw TCP with no TLS layer. Framing is a big-endian u16 length prefix at offset 0, read via ntohs at 0x4012a0, where length == 0 is a keepalive and the body is capped at 0x1000 bytes; then one opcode byte, then an opcode-specific body. Ghidra confirmed the framing independently in the consensus round.

The bot sends the check-in once on connect, unframed: a 4-byte constant preamble 00000004, an 8-byte bot ID it reads from /etc/[.]netd, plaintext arch and version, then four ChaCha20 fields under block counters 1–4 carrying CPU count, RAM in MiB, the campaign tag Blacked, and an empty field. The CPU count comes from sysconf 0x54 and the RAM figure from sysinfo at 0x40147b. Server-to-client command frames travel in clear, so a capture yields the tasking directly: vector id, duration, target IP or CIDR, and options.

The beacon loop is a 5 s select at 0x40e0f3 with a 14 s keepalive beacon, a 300 s receive timeout and a 1 s/3 s reconnect backoff, and the loop carries no jitter term. At the TCP layer the sample also tunes keepalive on the stream socket:

sub_40db62(data_61f008, 1, 2, ...); sub_40db62(..,6,1,..); TCP_KEEPIDLE=30, TCP_KEEPINTVL=5, TCP_KEEPCNT=3 /* keepalive-tuned stream socket */ — binja @ 0x4001f2

Because the sample was never run, what it does under retry, or after a command finishes, is unrecorded.

The pipeline documented three commands. Opcode 1 reaches the attack dispatcher at 0x416000 inside the decrypted .crypt, taking a vector id, duration, targets and options into the 18-vector registry at 0x402415, where vector 0xff self-uninstalls. Opcode 3 falls through to 0x4014ab, whose subcommand 1 sets a flag and subcommand 3 triggers a remote self-uninstall. Within opcode 1, vector 254 at 0x40b4bb executes an arbitrary shell command through /bin/sh, so any host that beaconed should be treated as fully compromised. The engine’s vector classes are raw-socket TCP and UDP floods, TLS-ClientHello, DNS-query, SNMP and Valve Source Engine query floods.

Four of the 18 flood handlers were read; the remaining 14 (ids 0, 1, 3, 4, 11, 15, 16, 21–27) sit unread at their registered addresses, and of roughly 30 numbered attack options parsed at 0x40230d, six are typed (0x00, 0x04, 0x19, 0x1d, 0x23, 0x24).

The eleven recovered capabilities

Two of the eleven recovered capabilities carry a consensus mark. The consensus round took in the wire-protocol and crypto claims; the capability objects were never in that claim set, so they carry ⚠️ even where the extractor independently reproduces the behaviour. The confidence column is the pipeline’s own per-capability assessment, and the address column is the one the C2 profile anchors for that capability.

CapabilityATT&CKAddressWhat the address namesConfConsensus
Raw-TCP C2, length-prefixed framingT10950x40d31cthe connect() wrapper quoted above0.95⚠️
ChaCha20 config and check-in fieldsT1573.0010x416234the config-string decrypt routine0.95✅
Self-decrypting .crypt sectionT10270x401054the init_array constructor0.95✅
18-vector flood engineT1498, T14990x40951f—0.85⚠️
Shell execution via vector 254T1059.0040x40b4bbthe shell-exec path0.70⚠️
systemd persistence (Restart=always)T1543.0020x404d9fthe unit-install routine0.85⚠️
cron persistenceT1053.0030x4162aathe cron-writing routine, which is also the config-string decrypt call site quoted above0.80⚠️
Masquerade as /bin/bashT1036.0040x4008b7the prctl and argv[0] rename0.85⚠️
CPU/RAM/arch discoveryT10820x40147bthe sysconf/sysinfo fingerprint0.85⚠️
Competitor and miner evictionT14960x40330ethe /proc kill loop0.70⚠️
oom_score_adj = -1000T1562.0010x403a31the OOM-protection write0.80⚠️

Persistence and host artefacts

The sample writes persistence four ways: a systemd unit at /etc/systemd/system/network-dispatch[.]service with Restart=always, symlinked into multi-user.target.wants; a per-minute root cron entry at /etc/cron[.]d/network-dispatch, /etc/crontabs/root and /var/spool/cron/crontabs/root; /etc/rc[.]local; and a self-copy to /usr/local/bin/network-dispatch. It installs under the benign service identity network-dispatch, with Description='Network Dispatch Service'. The process renames itself to /bin/bash via prctl(PR_SET_NAME) and an argv[0] overwrite. A process named /bin/bash whose /proc/[pid]/exe points at /usr/local/bin/network-dispatch is this bot.

The sample also leaves /etc/[.]netd, an 8-byte bot-ID store it reads at startup and creates from rand() bytes when absent, and /dev/shm/[.]sys from config string 22, and it prints the banner fortnite from config string 0 to stdout at startup.

The sample writes -1000 to /proc/self/oom_score_adj so the kernel OOM killer will not reap it, and it walks /proc killing processes that match a roughly 900-entry list of competing malware, miners, RATs and proxyware so that it has the host to itself.

Privilege and network requirements

The beacon needs only user privilege; full persistence needs root. The sample opens outbound tcp/35450 to the C2 host and outbound udp/53 to the five resolvers, and it binds a single-instance lock to tcp/6521 on 127.0.0.1. Denying any one of the outbound paths blocks the channel.

The flood-payload template table

The pipeline first hypothesised that the five rotating SSH client banners in .rodata, alongside the microsoft, amazon, cloudflare, yahoo and google labels, belonged to a scanner or propagation module. They are entries in a 42-element flood-payload template table at 0x41cde0, selected at random by attack vector 17. The pipeline refuted hypothesis H9, because the observed call graph contains no self-propagation path and the config holds no credential list or staging URL.

The candidate payload at 0x1d260

A candidate embedded payload at offset 0x1d260 carries valid zip magic, which commonly marks a bundled second stage; it has not been carved or analysed.

The fourteen handlers that have not been read

The 14 unsampled flood handlers at their registered addresses and the attack option semantics beyond the six typed options remain open. Whether the C2 host currently resolves anywhere, and whether anything answers on 35450, has not been determined.

Family
unclassified
First seen
November 13, 2026
Vector
Runs as a ddos-bot/worm; the entry vector is not established by static analysis
Format
125 KB x86_64 ELF 64-bit LSB executable
VirusTotal
20/75 engines: trojan.mirai/gafgyt
Tags
ddos-bot · elf · raw_tcp · worm · x86_64
Sample
By request. Email [email protected]

SHA-256

  • 4a836ddfa3397319b6cf0c5488ffce95bbc4814ec765efce3745ef3237bf1754 as captured

Analysis performed using an automatic malware analysis pipeline using Binary Ninja

← All captures