XMRig Miner auf Webhosting – wie Angriffsvektor finden?

  • Hallo zusammen,

    ich habe heute eine Abuse-Meldung von Netcup erhalten – mein Webhosting-Account wurde wegen "schadhafter Stealth-Prozesse" gesperrt. Konkret wurde ein XMRig Miner gefunden:


    Code
    xmrig --config=/var/www/vhosts/.../c3pool/config_background.json


    Ich bin ehrlich gesagt etwas überfragt, wie das passieren konnte, und hoffe dass jemand von euch vielleicht ähnliche Erfahrungen gemacht hat.

    Mein Setup:

    • Webhosting 8000, schon länger in Betrieb
    • Mehrere Node.js-Webseiten (Dashboards, CDN, Landingpages für Discord-Bots)
    • Keine Upload-Funktionen, die direkt aufs Webhosting schreiben
    • Datenspeicherung läuft komplett über separate Root-/KVM-Server
    • Aktiv verändert habe ich seit Monaten nichts

    Meine Vermutung:

    Möglicherweise veraltete npm-Pakete? Ich gebe zu, dass ich Updates da nicht regelmäßig gemacht habe. Andere Einfallstore kann ich mir bei meinem Setup kaum vorstellen.

    Meine Fragen:

    1. Hat jemand von euch schon mal so einen Fall gehabt? Wie seid ihr vorgegangen?
    2. Gibt es bestimmte Logs oder Stellen, die ich im Wartungsfenster prioritär prüfen sollte?
    3. Irgendwelche Tipps, wie ich den genauen Angriffsvektor identifizieren kann?

    Wartungsfenster habe ich für Montag beantragt. Bin für jeden Hinweis dankbar!

    Danke und schönes Wochenende

    • Hilfreichste Antwort

    Hallo Domvnxk,

    wir hatten da heute einige betroffene Kunden, anscheinend stets im Zusammenhang mit NodeJS.

    Ich vermute, es besteht hierzu ein Zusammenhang:

    https://www.golem.de/news/auch-next-js-betroffen-kritische-react-luecke-gefaehrdet-unzaehlige-serversysteme-2512-202894.html

    Vielleicht hilft dir das ja bereits.

    Ich wünsche dir ein schönes Wochenende.

  • Domvnxk 5. Dezember 2025 um 19:43

    Hat einen Beitrag als hilfreichste Antwort ausgewählt.
  • Hey Lars,

    vielen Dank für die Rückmeldung, das wird es wahrscheinlich sein…

    Schaue ich mir am Montag auf jeden Fall an!

    Dir ein schönes Wochenende! 😊

  • Update: Problem gelöst

    Konnte den Angriffsvektor bestätigen – war tatsächlich CVE-2025-29927 (Next.js 15 RCE). Zwei meiner Seiten liefen auf Next.js 15.0.4 bzw. 15.1.6, die Infektion kam 2 Tage nach Veröffentlichung der CVE.

    Was ich gefunden habe:

    - Miner lag in /c3pool/ mit config, script und log

    - Persistenz über modifizierte .profile (Autostart bei Login)

    - Keine Spuren in Access-Logs (typisch für diesen Exploit)

    Bereinigung:

    - c3pool/ Verzeichnis gelöscht

    - .profile zurückgesetzt

    - Alle Passwörter geändert

    - npm audit fix auf allen Projekten, Next.js 15 auf gepatchte Versionen aktualisiert

    Für alle mit Next.js 15: Unbedingt npm audit laufen lassen und updaten!

    Danke nochmal an @[netcup] Lars S. für den Hinweis! :)

  • Hi, ich habe seit gestern um 15 Uhr genau das gleiche Problem, auch bei Webhosting 8000.
    Bei mir wurde der Miner vermutlich über eine Umami Installation (verwendet Next.js 15) eingeschleust.
    Leider hat sich der Support bis jetzt nicht bei mir gemeldet, sodass meine Services und Webseiten seit gestern offline sind.

    Vielleicht findet sich ja hier im Forum ein Support Mitarbeiter, welcher das anliegen schneller bearbeiten kann.

    Domvnxk wie hast du die betroffenen Dateien gefunden und gelöscht?
    Soweit ich weis gibt es bei dem Hosting kein Zugriff auf zB htop um weitere "unerwünschte" Prozesse im Hintergrund zu finden.

  • Ich hatte über SSH (Termius) bzw. SFTP Zugriff während meines Wartungsfensters. So bin ich vorgegangen:

    Miner finden:

    Der Pfad stand ja schon in der Abuse-Meldung (/var/www/vhosts/.../c3pool/). Per SFTP konnte ich das Verzeichnis direkt sehen und löschen. Darin waren:

    - xmrig (die Miner-Binary)

    - miner.sh (Startscript)

    - config_background.json / config.json

    - xmrig.log

    Persistenz-Mechanismus:

    Wichtig - der Angreifer hat auch die .profile Datei im Root-Verzeichnis modifiziert, damit der Miner bei jedem Login neu startet. Die musst du auch bereinigen:

    Code
    cat .profile

    Falls da ein Verweis auf den Miner drin steht, einfach leeren:

    Code
    echo "" > .profile

    Nach weiteren Backdoors suchen:

    Code
    ls -la
    find . -name ".*" -type f
    ls -la .ssh/

    Danach:

    - Alle Passwörter ändern (SSH/FTP)

    - Umami bzw. Next.js updaten (npm audit fix)

    - CVE-2025-29927 betrifft Next.js < 15.2.3

    Wegen Support: Ich hatte am Freitag ein Wartungsfenster für Montag beantragt, das ging relativ schnell. Am besten über das CCP Ticket erstellen, falls noch nicht gemacht.

  • Kontrolliere im WCP bzw. Plesk unbedingt auch, ob es irgendwelche unbekannten Cronjobs ("Geplante Aufgaben") gibt! In der Vergangenheit hat sich bei anderen Angriffen gezeigt, dass die ohne Zugang zum Control Panel über die normale HTTP-Umgebung der Prozesse angelegt werden können. Bereinigt man die nicht, ist das Ding womöglich nicht weg und weiterhin aktiv.

    "Wer nur noch Enten sieht, hat die Kontrolle über seine Server verloren." (Netzentenfund)

    Einmal editiert, zuletzt von KB19 (16. Dezember 2025 um 09:00)

  • Are you able to fix your issue? I am facing a similar issue, and currently my server is disabled to make any changes into it. How did you fix it.

  • fwiw:

    https://blog.jakesaunders.dev/my-server-started-mining-monero-this-morning/

    https://news.ycombinator.com/item?id=46305585


    Zitat

    Container isolation actually worked. Nice.

    Why This Matters: Dockerfiles vs. Auto-Generated Images

    Here’s the thing that saved me. I write my own Dockerfiles for my applications. I don’t use auto-generation tools like Nixpacks (which Coolify supports) that default to USER root in containers.

    The Reddit post I’d seen earlier? That guy got completely owned because his container was running as root. The malware could:

    • Install cron jobs for persistence
    • Create systemd services
    • Write anywhere on the filesystem
    • Survive reboots

    His fix required a full server rebuild because he couldn’t trust anything anymore. Mine required… deleting a container.

    from:

    The universe tends toward maximum irony. Don't push it.

    Einmal editiert, zuletzt von webdesignheld (18. Dezember 2025 um 06:33)

  • Shutting down customers' server for something they didn't do is wrong. Netcup should at least give users a day to respond before locking them out and asking them to provide a straight 4-hour time window in advance to access it or loose it, which only people with lots of freedom can do.

  • Shutting down customers' server for something they didn't do is wrong. Netcup should at least give users a day to respond before locking them out and asking them to provide a straight 4-hour time window in advance to access it or loose it, which only people with lots of freedom can do.

    If this is you: https://www.reddit.com/r/VPS/comments…eged_mining_no/ , your legal opinion there as here is just wrong.

    Have a look at https://www.netcup.com/en/terms-and-conditions -> Point 5. , and in there especially part 7.:

    Zitat

    If the customer breaches the code of conduct as set out above or if there is a well-founded suspicion of the same, netcup is entitled to temporarily block the provision of services normally provided to the customer. This applies particularly if a cease-and-desist order is brought against the customer by third parties for certain specified reasons that are not manifestly unfounded, or in the event of an investigation being conducted by state authorities. If possible, netcup will grant the customer a hearing before withdrawing services; if the urgency of the situation makes this impossible, netcup will inform the customer after the event and offer the latter an opportunity to make a statement. Services are resumed as soon as the suspicion proves groundless or infringements are identified that entitle netcup to terminate the contract without notice

    In this case, the urgency of the situation seemed to have made a hearing before withdrawing services impossible.

    Shutting down customers' server for something they didn't do is wrong.

    It absolutely isn't!! The customer is the solely responsible person for everything running on servers which are only administered by the customer (should be obvious). When something problematic has happened, it doesn't matter if the customer caused it or not. It is her/his responsibility. Period. One could say that also a hacked server is something a customer did (not securing the server enough, not updating software, installing malware, etc.).

    As said on Reddit: you should be thankful that this has happened, so that you can work on the problem instead of having a compromised server online which could do things with way worse consequences for you. Having the server offline damages you less than having it compromised.

    RS 2000 G12 Pro BW25 (8C EPYC 9645, 16GB, 1TB) | RS 500 G12 BW25 (2C EPYC 9645, 4GB, 128GB) | RS Cyber Quack (1C,2GB,40GB)