> devwr/research

· 2 min read

1,300 bytes, three C2s in two weeks

A tiny ARM download stub whose only per-build change is a 4-byte C2 address.

A static ARM ELF of 1,300 bytes, echoed onto telnet-reachable devices. Static analysis only.

What it does

No libc, six syscalls:

  1. socket(AF_INET, SOCK_STREAM)
  2. connect to an IPv4 stored as 4 raw bytes in .data, port 2345
  3. write one byte: 0x04
  4. read 128 bytes at a time and write each chunk to stdout
  5. close, exit(5)

The server sends a binary; the stub just pipes it out. The dropper does the rest:

/bin/busybox chmod 777 .d; ./.d > .f; /bin/busybox chmod 777 .f; ./.f telnet; rm -rf .d

The session first probes writable dirs with >/<dir>/.f && chmod 777 /<dir>/.f && /<dir>/.f, sends /bin/busybox HISILICON as a marker, and reads /proc/cpuinfo. The 0x04 byte is likely an architecture ID; I have no other builds to confirm it.

Three builds, one diff

The three 1,300-byte builds are byte-identical except offset 0x3b0, the C2:

sha256C2SeenSessions / sources
2df93a8f84ac9967e9b8ca382715eb68906a45c5e8975aebe092a61b6a117617129.121.115[.]43:23454–10 Nov16 / 13
73bfd6d1044e2d708e4095efb1b8cb4646318e1bb5fd25d9660d5cbcffa8b4c1194.35.120[.]124:234511–17 Nov237 / 58
4174a452a465c4104c895d326cc6b2f31f3706b6ba5272c4baea2063802624f6101.53.134[.]34:234517 Nov44 / 6

A new hash each time the server moves. Match on code, not hash.

Eight more tiny ARM ELFs (696–1,452 bytes) turned up between 13 October and 16 November, each in one session at most. Two carry the same port 2345 literal; the rest are truncated or different stubs. On 17 November only one of the eight (00d21a53…, Mirai, 14 Oct) was on MalwareBazaar.

Known vs. new

Status (17 Nov)
129.121.115[.]43ThreatFox (Dense; tipo_deincognito as Aisuru), URLhaus since 25 Oct
194.35.120[.]124URLhaus since 16 Nov (abuse_ch)
101.53.134[.]34Not on ThreatFox or URLhaus
Stub hashesNone on MalwareBazaar or ThreatFox; one on VirusTotal with 0 detections

The ThreatFox Aisuru tag on the first C2 is the only attribution I have. Echo-written downloaders are old Mirai tradecraft; the single-byte request on 2345 is the distinctive part.

Detection

  • TCP to port 2345 followed by a client payload of exactly 0x04
  • Telnet input /bin/busybox HISILICON and ./.d > .f
  • ARM ELF under 2 KB with no imports and only socket/connect/read/write syscalls
rule arm_2345_stub
{
    strings:
        $port = { 09 29 00 00 }  // sin_port 2345, literal pool
    condition:
        uint32(0) == 0x464c457f and uint16(0x12) == 0x28
        and filesize < 2KB and $port
}

← all posts