TL;DR: This evening I logged into the server running one of my products and found malware that had been there for months. Two services were reachable from the internet with no authentication: Redis (port 6380, no password) and OnlyOffice Document Server (port 8083, no JWT). The Redis hole was enough for an automated worm to install a Monero miner that also scans for other Redis servers. Below: what I found, what I could not determine, how to clean up properly, and how to make sure it is not you next.

Update: "I rebuilt the server from a clean image and rotated all secrets."

How I found it

I was checking on the server for one of my products when something looked wrong. [ADD: the first thing you noticed, for example high CPU, an odd process, or the OnlyOffice failure.] When I restarted the container, the miner ran again.

That detail matters. If a restart brings the malware back, it is not just a process you can kill. It has a persistence mechanism.

Finding 1: a Redis worm that mines Monero

The Redis instance was published on port 6380 with no password. That port is on the malware's scan list, so it did not even need to guess one.

What I found on the box:

  • The miner: a renamed copy of XMRig 6.26.0, the common open-source Monero miner, running as .syscache. It mined to the attacker's wallet through two pools.
  • A control program: .sc-node, a custom Go binary. It checks in with the attacker for new settings and new versions of itself, downloads XMRig from XMRig's official GitHub page, runs the miner at low priority so it draws less attention, and tries to survive reboots with a crontab entry and a replaced redis-server script.
  • A scanner: scanning was switched on in its config. It probes Redis ports 6379, 6380, 6381 and 16379 across a long list of address ranges and tries a built-in password list (redis123, changeme, P@ssw0rd and similar).

That last point is the uncomfortable one. My server was most likely attacking other people's Redis servers. I may get abuse complaints from my host, and the IP may end up on blocklists.

Is this a known pattern?

Yes. Redis worms are not new. Datadog Security Labs described a Go-based campaign called RedisRaider in May 2025: it scans the internet for public Redis servers, injects a cron job through Redis's CONFIG SET dir and bgsave, and drops a custom XMRig build. Trend Micro has documented exposed Redis instances abused for remote code execution and cryptomining. I have not confirmed that what I found is the same malware family as RedisRaider. The behaviours are similar, not proven identical.

Timeline

When What
Mar 28 Oldest malicious files appear. This is the likely infection date, but file timestamps can be altered by an attacker, so treat it as a best guess
Nov 7 The attacker's own records note an install
Nov 8 The control program was updated
Nov 17, 17:58 UTC The miner ran again when I restarted the container

Finding 2: OnlyOffice, remote code execution, and something that encrypted files

The second hole was OnlyOffice, open on port 8083 with no JWT authentication.

  • Entry: leftover files named rce_*.js and x2t_rce_*.sh suggest a remote code execution attack against OnlyOffice's document converter (x2t).
  • Backdoor: on Nov 4 a file called local.js was added, which runs whenever OnlyOffice starts. It downloads /tmp/.sysupd from a remote server, runs it with a --bypass flag and a project tag, then reports success back to the attacker.
  • Persistence: .nm-dog.sh scripts keep reinstalling a helper program, .nm-helper.
  • Encryption: OnlyOffice's config and program files were scrambled and renamed *.block. That is what broke OnlyOffice. I found no ransom note.

I want to be careful here. I could not tie this to a specific CVE. OnlyOffice has had RCE bugs before (HKCERT, for example, lists CVE-2021-3199 as exploited in the wild), but that one is a path traversal that applies when JWT is in use, and my server had no JWT, so I am not claiming it is the cause.

What I could not determine

  • What .sysupd does. I did not analyse it. It could be another miner, a remote-control backdoor, or the encryptor.
  • Why the files were encrypted without a ransom note. It could be a botnet sabotaging the host, or an encryption tool that failed partway.
  • Whether the attacker left the containers. I have not verified that the host itself is clean.
  • Whether the two compromises are related. They look like separate actors using separate holes. I cannot prove that.
  • Whether my data was touched. Redis held Celery task data and cached app data. Miners usually want CPU, not data, but an attacker with full control of Redis could read all of it.

What I am doing about it

If you find something like this, do not just kill the processes:

  1. Treat the machine as untrusted. Persistence in crontab, a replaced redis-server script and a startup hook in OnlyOffice means cleaning by hand will miss something. Plan to rebuild from a clean image and redeploy.
  2. Rotate every secret that was on the box or reachable from it: environment variables, API keys, database passwords, SSH keys, anything in Redis or Celery payloads.
  3. Review what Redis held. If Celery tasks carried user data, work out what the exposure means for your users and whether you have notification duties.
  4. Block the indicators (below) at the firewall and check logs for earlier contact with them.
  5. Watch for abuse complaints from your hosting provider and check whether your IP is on blocklists.
  6. Keep evidence (copies of the malicious files, logs) before you wipe anything.

How Redis ended up exposed (the part worth bookmarking)

"Keep Redis off the internet" is advice everyone has heard, so how did it happen to me anyway?

redis:
image: redis:7
ports:
- "6380:6379"

That one line publishes Redis on every network interface of the host, including the public one. I assumed the firewall would block it. It doesn’t: when Docker publishes a port, it writes its own iptables rules, and those are evaluated before UFW’s rules. So ufw status can show port 6380 as closed while the whole internet can reach it. OnlyOffice on port 8083 was exposed the same way.

Here is the trap if that is your setup. Docker's own documentation says that when you publish a container port, traffic to that container is diverted before it reaches ufw's rules, because Docker routes it in the nat table ahead of the chains ufw uses. In other words, a firewall rule that looks like it blocks the port may not apply to a published container port at all. [Check this against your own setup; a cloud provider firewall in front of the machine is a separate layer.]

The fixes:

  • Do not publish the port. If only other containers need Redis, put them on the same Docker network and remove the ports: entry entirely.
  • If the host needs it, bind to loopback: publish as 127.0.0.1:6380:6379 instead of 6380:6379.
  • Set a password or ACL anyway, in case someone changes the first two later.
  • Test from outside (a scan from another network) rather than trusting the firewall config.

How to not be me

  1. Do not expose Redis to the internet. Redis's own security docs say it is usually a bad idea to expose it directly to the internet or to untrusted clients. Bind it to an internal interface (bind 127.0.0.1) or put it on a private Docker network.
  2. Set authentication anyway. The docs recommend ACLs (Redis 6 and later) and describe requirepass as the older method. They also note that authentication is a second layer in case the firewall fails. A long password matters because Redis is fast enough to brute-force.
  3. Check from outside, not from inside. If you publish a container port with -p, test from another network that it is really closed. Do not assume your host firewall covers it.
  4. Turn on JWT for OnlyOffice and do not expose the document server directly. Put it behind your app or a reverse proxy.
  5. Run an external port scan against your own servers on a schedule. I would have caught both holes in a minute.
  6. Alert on CPU and outbound connections. A miner and a scanner are both loud if you are listening.

Indicators of compromise

Defanged. Use these to search your own logs, not to browse.

Miner process: .syscache (renamed XMRig 6.26.0) Control program: .sc-node (Go) Pools: 45[.]141[.]21[.]131:3333 asd234frkfs[.]duckdns[.]org:3333 141[.]94[.]250[.]96:10300 (encrypted) Wallet: 46VM5FgBaYi28vBzm8wa7LLerSFoFXF2KS986Fo7A5kcVyVi5kWKPajVUixXhNoJdQQ2q6UBHc6xhCvZWNqqPQ1U8icygm2 OnlyOffice: local.js (added Nov 4), rce_*.js, x2t_rce_*.sh Dropper: /tmp/.sysupd from 91[.]134[.]58[.]165:58081 run with --bypass, tag TD_PROJ=OnlyOffice-28199 Helpers: .nm-dog.sh, .nm-helper Encrypted files: *.block 

I write about real failures in production systems. My book Your Agent Just Did What? covers runtime controls for AI agents, tested against seven attack scenarios and two real models.

Discussion

  1. Have you ever found something running on a server you thought was locked down? How did you notice?
  2. Do you scan your own servers from the outside on a schedule?
  3. What is your default for Redis in Docker: private network only, or published port with a password?

Sources