Dev.to Security 🔐 Cybersecurity 👁 0 📖 6 min read

I Left Redis Without a Password. Something Moved In and Mined Monero. Here Is What I Found

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 passwor

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.

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 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

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

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.