// GreyNoise  ·  writeup

GreyNoise Swarm - No Config Needed

GreyNoise Medium GreyNoisetsharkCyberChefVirusTotalURLhausMalwareBazaarThreatFox

Introduction

In Through the Door two Redis attackers hit Bold Earwig and got nowhere. Every CONFIG SET dir, every MODULE LOAD and the Lua escape came back refused, and my takeaway was “Redis 7 defaults work, keep them.”

Then I left the sensors running for about a month without looking. When I opened the Tactics page again, the Redis sensor had a column of sessions from a single day, each one an hour long, with a shell in it. Something had got through, and it hadn’t used any of the tricks from October.

I also destroyed the droplets before exporting anything, because I thought the PCAPs lived on GreyNoise’s side. The sessions did survive on the platform, and the sensor page still listed all 771,738 of its sessions, so I could still export them. This writeup is what I got out of that.

The Redis session in Swarm’s Tactics view. The first command that matters is a long sh -c with a base64 blob in it.

Credit: This project was inspired by John Hammond’s interview with the creator of GreyNoise, which introduced Project Swarm and the idea of running your own sensors and keeping the PCAPs.

Executive Summary

Three Redis sessions arrived from one host, 94.154.32[.]234, on a single day. They don’t write a config file. They send a sequence of ordinary-looking Redis commands that groom the heap (RESTORE of a crafted zipmap, a large SADD, 26 SET hui:A to hui:Z strings, an EVAL that sprays floats), read memory back with GETRANGE to find where things are, then use SETRANGE to overwrite a pointer and plant the string /bin/sh. The last command is DEBUG CRASH-AND-RECOVER. Two of the three carry a shell payload. I haven’t tied the chain to a specific CVE: the sensor’s profile was Redis 7.2.10, but that’s all I can state from the capture.

The payload is a gzipped, base64 shell script that unpacks to a 21,689 byte installer. It deploys an XMRig miner, a stripped Go binary it calls .sc-node, and a Redis module, and it persists five ways: cron, a systemd unit, rc.local, profile.d and a wrapper in front of the real redis-server. Its debug output goes into a Redis list, so the attacker reads its own logs back through the database.

Swarm truncated the command in its timeline, partway through the blob. The PCAP has the complete blob. The sensor’s egress was off, so nothing the script tried to download ever arrived. I could only find the node binary through VirusTotal, never the miner archive or the module.

None of the three hosts, the five URLs, the wallet or the installer hash was on URLhaus, ThreatFox or MalwareBazaar before this. I submitted the installer to MalwareBazaar.

flowchart LR
  A["Redis 7.2.10<br/>port 6379"] --> B["heap grooming<br/>RESTORE, SADD, SET hui:*, EVAL"]
  B --> C["GETRANGE leaks<br/>SETRANGE /bin/sh"]
  C --> D["DEBUG CRASH-AND-RECOVER"]
  C --> E["installer /tmp/.d<br/>21 KB sh"]
  E --> F["XMRig + .sc-node<br/>mod7.so"]
  E --> G["cron, systemd, rc.local<br/>profile.d, redis wrapper"]

The Exploit, Command by Command

I exported the session PCAPs from Swarm’s Sessions page, filtered to the sensor and the day, then pulled the Redis conversations with tshark. Swarm’s Tactics view only shows the commands that ran inside the box. The PCAP shows what Redis was sent, and that’s where the exploit is.

tshark -r sessions-page-2.pcap -q -z conv,tcp | grep 6379

Three TCP conversations to port 6379, all from 94.154.32[.]234, across less than two hours. One was 34 seconds long, one 58 and one 74.

tshark’s Follow TCP stream has a raw mode, and Redis speaks a simple text protocol (RESP), so I wrote a small parser to turn each stream into a numbered command list. The first session’s list starts like this:

1 PING
2 INFO server
3 INFO memory
4 CONFIG SET stop-writes-on-bgsave-error no
5 FLUSHALL
6 SAVE
7 SADD write:0 -9223372036854775808 -9223372036854775807 ...
8 RESTORE zipmap:poc 0 ...
9 SET hui:A ...[256B]
...
34 SET hui:Z ...[256B]
35 EVAL ... 0 float 100000
36 GETRANGE hui:A 255 255

What each step is doing, as far as I can tell:

Then the later commands change character. There are 29 SETRANGE writes into hui:E and into a float: key. One of them writes the string /bin/sh at offset 524288, and others write what look like address bytes. The last command in both full sessions is DEBUG CRASH-AND-RECOVER, which asks Redis to crash and restart itself.

The third session stops after 55 commands, still in the read phase. That could be an attempt that didn’t finish, or a probe. I can’t say which.

I’m calling this a memory-corruption exploit because of the heap shaping, the leaks and the planted /bin/sh, not because I read the code. I haven’t identified the vulnerability. The profile was 7.2.10 and the attacker needed no authentication, since nothing in the capture shows an AUTH.

The Installer

The shell command that matters is a long sh -c. Its logic, in plain terms:

  1. Find the Redis binary (/data/redis-server, then PATH, then /usr/local/bin/redis-server).
  2. Pick a writable directory from /tmp, /var/tmp, /data, /var/lib/redis and $HOME.
  3. Define a b64dec function that tries base64, then busybox base64, then openssl.
  4. Decode a base64 blob to .db, gunzip it to .d, delete .db.
  5. Run .d with five base64 arguments: the Redis path, a config path (empty here), the port, a rig ID (which is the sensor’s own address) and a node URL.

Swarm’s timeline a moment later: the re-exec through busybox sh /tmp/.d ... inner, then .p.sh started again and again with setsid.

The node URL, once decoded, is hxxp://94.154.32[.]234/v1/node/node184t. Everything in the script keys off that base: the miner archive, the node binary and the module all live under /v1/.

Swarm’s command text stops partway through the blob, so the Tactics page alone gives a script that ends in the middle of a loop. The saved HTML has the same truncation, so it isn’t a display problem. It’s what Swarm kept. The PCAP has the whole thing:

python3 - <<'PY'
import re, base64, zlib
data = open("stream17.raw", "rb").read()
blob = re.search(rb"printf %s (H4sI[A-Za-z0-9+/=]+)", data).group(1)
out = zlib.decompressobj(31).decompress(base64.b64decode(blob + b"=" * (-len(blob) % 4)))
open("stage1.sh", "wb").write(out)
PY

The blob is 9,292 characters. It decodes to 6,969 bytes of gzip and gunzips to 21,689 bytes of shell script, with a complete gzip trailer. Both full sessions carry identical copies.

I never ran it. It’s a text file and I read it.

What the Script Does

The comments are in German. The code is organised and defensive: it checks for every tool before it uses it and falls back through alternatives. Here is the part I think is worth knowing.

It protects the Redis it’s running inside. The script is described in its own header as closing only the socket file descriptors and re-executing Redis. It loops over /proc/self/fd, closes anything that points at a socket, and then re-runs the original Redis. If Redis is PID 1 in a container, killing it would take the container down, so a KEEP flag leaves Redis alone and runs the miner beside it. That fits the DEBUG CRASH-AND-RECOVER at the end of the exploit.

It has a lot of ways to download. curl, wget, busybox wget, Python, PHP, Perl, and pure bash /dev/tcp for images with nothing else installed. If there is no downloader at all it tries apt-get, apk, dnf or yum to install curl. Every download is size-checked against a /v1/node/size endpoint before the binary is accepted.

It deploys three things.

WhatWhere it comes from
Miner/v1/m/xmrig.tgz on the node host, then mirrors 92.5.170[.]94 and 9.247.136[.]217, then the stock XMRig 6.26.0 release on GitHub
Node<node URL>.gz, size-checked, written to .sc-node
Redis module/v1/m/mod7.so, saved as .sc-mod.so and added to the Redis config as a loadmodule line

The miner config. Monero, two pools: 94.154.32[.]234:3333 (plain) and 141.94.250[.]96:10300 (TLS), the same wallet on both, and the rig ID is the sensor’s address. The wallet starts 46VM5Fg… and is in the IOC table below.

It persists five ways, and checks which of them it can use.

The persistence commands as Swarm saw them: chmod +x on .syscache.sup, .sc-boot.sh and .t82, then a crontab - rewrite.

The boot script it writes first checks whether .sc-node exists and runs that, and only then falls back to the miner. A supervisor loop (.syscache.sup) restarts the miner with a back-off from 30 up to 300 seconds, and sleeps when available memory drops under 300 MB.

It uses Redis as its log. Progress lines go to a Redis list called __dlog through redis-cli, and __sc and __sc_ts keys record the rig ID and a timestamp. After a delay it replays its local log file into __dlog. The attacker can read how the install went from the same port they attacked through. I’d look for these key names in a real incident.

It does a little recon at the end. id, uname -a, nproc, any environment variable that matches token, secret or passw, and a listing of ~/.ssh, ~/.aws and ~/.kube, all written to a hidden .syscache.info file. It is the same discovery set that I saw in Swarm’s timeline for the hourly sessions.

What I Couldn’t See

Infrastructure and Intel

I checked every host, URL and the wallet against abuse.ch and VirusTotal.

CheckResult
URLhaus, ThreatFox, MalwareBazaar (3 hosts, 5 URLs, wallet, installer hash)No results
94.154.32[.]234Stellar Group, France. VirusTotal: 3 malicious, 1 suspicious. Its one linked file is a Windows msn.exe, which I think is unrelated
92.5.170[.]94Oracle, Germany. VirusTotal: 6 malicious, 3 suspicious. Its one linked file is the node binary below
141.94.250[.]96OVH, France. Shared with about 1,700 other malware samples, so it isn’t specific to this actor

The one useful hit was a file named .sc-node that contacts 92.5.170[.]94. It’s a statically linked, stripped Go executable for x86-64, 5,623,960 bytes, first submitted on 2026-11-06, and detected by 2 of 75 engines as a miner. VirusTotal tags it with self-delete, sets-process-name, detects-debugger and checks-CPU-name. The file name matches the installer exactly and the host matches the mirror the installer names, so I’m confident it’s the same binary. I couldn’t download it because VirusTotal’s downloads need a paid plan.

The wallet. Monero hides balances on-chain, so the address on its own shows nothing. Mining pools publish per-address stats, and I asked six of them. The wallet is live on one: c3pool reported about 684 kH/s, 360,443 valid shares, about 1.2692 XMR paid out across 53 payments and about 0.0035 XMR pending, with its last share a few hours before I checked. That is the pool’s figure for the address across everything mining to it, not this sensor. It’s also a floor, because the same wallet could mine elsewhere.

Attack Summary

PhaseAction
Initial AccessUnauthenticated Redis 7.2.10 on 6379, memory-corruption chain from a single host
Execution/bin/sh planted via SETRANGE, installer run as sh /tmp/.d
Defense EvasionDot-named files, base64 and gzip layers, deleted .db, .dlog replayed through Redis
Persistencecron @reboot and every 15 minutes, scboot.service, rc.local, profile.d, redis-server wrapper, loadmodule
Discoveryid, uname -a, nproc, /proc/meminfo, df on the data directory
Credential Accessenv grep for token, secret and password; ~/.ssh, ~/.aws, ~/.kube listing
Command and Control94.154.32[.]234 node and pool; __dlog Redis list
Ingress Tool TransferXMRig, .sc-node and mod7.so (none fetched here)
Impact (attempted)XMRig Monero mining

IOCs

TypeValue
Attacker host (exploit, node, pool)94.154.32[.]234 (AS214961), pool 94.154.32[.]234:3333
Mirror92.5.170[.]94 (ports 80, 443)
Other pool141.94.250[.]96:10300 (TLS, shared host)
Third mirror9.247.136[.]217
URLshxxp://94.154.32[.]234/v1/node/node184t, .../node184t.gz, .../v1/m/xmrig.tgz, .../v1/m/mod7.so, .../v1/node/size
Wallet (XMR)46VM5FgBaYi28vBzm8wa7LLerSFoFXF2KS986Fo7A5kcVyVi5kWKPajVUixXhNoJdQQ2q6UBHc6xhCvZWNqqPQ1U8icygm2
Installer SHA-2561f08e3d17572dc8b5a1d220f1c9ee0e462808af639b759a866f4f8ea9ead6f91 (21,689 bytes, submitted to MalwareBazaar)
Node binary SHA-256d4a747e89137ad5e03091e9a1d7dcb3e2c1eac5ee77a6ba1541eb058b1b4445d (.sc-node, Go ELF, 5,623,960 bytes)
Redis keyshui:A to hui:Z, zipmap:poc, float:*, write:0, __dlog, __sc, __sc_ts
CommandsRESTORE zipmap:poc, SETRANGE ... /bin/sh, DEBUG CRASH-AND-RECOVER
Files/tmp/.db, /tmp/.d, /tmp/.p.sh, <dir>/.sc-boot.sh, .syscache, .syscache.sup, .syscache.json, .syscache.info, .sc-node, .sc-node.pid, .sc-mod.so, /etc/systemd/system/scboot.service, /etc/profile.d/scboot.sh
Configa loadmodule line pointing at .sc-mod.so

MITRE ATT&CK

TechniqueIDDescription
Exploit Public-Facing ApplicationT1190Memory-corruption chain against Redis 7.2.10
Unix ShellT1059.004sh -c installer and .d
Deobfuscate/Decode Files or InformationT1140base64 then gzip, b64dec fallbacks
Obfuscated Files or InformationT1027Installer shipped as a base64 gzip blob
Ingress Tool TransferT1105XMRig, node binary and module downloads
CronT1053.003@reboot and */15 .sc-boot.sh entries
Systemd ServiceT1543.002scboot.service
RC ScriptsT1037.004Line added to /etc/rc.local
Unix Shell Configuration ModificationT1546.004/etc/profile.d/scboot.sh
Hidden Files and DirectoriesT1564.001Dot-named files in the data directory
Linux and Mac File and Directory Permissions ModificationT1222.002chmod +x on the boot script, supervisor and node
File DeletionT1070.004rm -f of the staging file
System Owner/User DiscoveryT1033id
System Information DiscoveryT1082uname -a, nproc, /proc/meminfo
File and Directory DiscoveryT1083ls of .ssh, .aws, .kube
Credentials In FilesT1552.001env grep, .aws listing
Private KeysT1552.004~/.ssh listing
Resource HijackingT1496XMRig Monero mining

Defender Takeaways

Last time I said Redis 7 defaults were enough. They weren’t, against this. enable-protected-configs no and enable-module-command no stopped every config-writing technique in October. This chain doesn’t write a config. It abuses the data commands that every Redis allows. I wouldn’t treat “protected configs” as protection against a memory bug.

Patch past 7.2.10. I haven’t pinned this to a CVE, so check Redis’s security advisories for the version you run rather than taking my word for the number. The sensor’s profile name, VULNERABLE, is the one fact I do have.

Don’t expose 6379, and don’t rely on the bind setting. Put Redis behind a private network, require a password, and use ACLs to remove the commands this chain needs: DEBUG, EVAL, RESTORE, MODULE, CONFIG, SLAVEOF and FLUSHALL for any client that doesn’t need them. DEBUG CRASH-AND-RECOVER has no place in production.

Alert on the Redis commands, not just the shell. RESTORE zipmap:poc, a run of SET hui:* keys, SETRANGE with an offset in the hundreds of thousands, and DEBUG CRASH-AND-RECOVER from an external address are all easy to spot in a command log and rare in normal use.

Hunt for the leftovers. On a Redis host, look for dot-named files in the data directory (.sc-boot.sh, .syscache*, .sc-node*), cron lines mentioning .sc-boot.sh, a scboot.service unit, /etc/profile.d/scboot.sh, a loadmodule line in redis.conf, a renamed redis-server, and the Redis keys __dlog, __sc and __sc_ts.

Block egress from the database tier. The sensor never got past the download step because it couldn’t make an outbound connection. The installer has seven download methods, and none of them matter without an outbound connection.

Conclusion

The October story was a Redis sensor shrugging off attackers because of its defaults. This one is the other half: an attacker who didn’t need a config write at all, and who spent under two hours on one host with a well-made installer. It checks for every tool, protects the Redis it’s running inside, persists five ways, and logs back through the database.

Swarm gave me the commands that ran. It truncated the installer, and the PCAP gave it back. That’s the part I’d do differently: I should have exported the PCAPs while the sensor was alive, but the platform kept the sessions, so I could still export them afterwards. I still don’t know which bug this is, and I never got the miner archive or the module, so those are the open ends.