Skip to content

Minecraft: How to Protect Your Server from Infected Plugins and Mods

Learn how to protect your Minecraft server from plugins and mods containing malicious code, spot warning signs, and clean an infected server step by step → Find out more

26 November 20265 min read2 Views0 helpful

Don't have your own server yet? Host your Minecraft server with ZAP-Hosting from €4.49 / month.Or try 3 days from €0.81

Introduction

Plugins and mods are .jar files that contain executable Java code. If you upload a tampered file to your Minecraft server, its code runs as soon as the server starts. For example, it could give other players OP permissions, modify other plugins, or steal login credentials. This guide explains how to avoid these files, recognize an infected server, and clean it up.

Only Use Plugins and Mods from Trusted Sources

The safest way to install plugins and mods is directly through the panel:

  • In the Plugins tab, use the Plugin browser to browse Modrinth and, for Paper, Purpur, Folia, Velocity, and Waterfall, Hangar as well. Learn how in Installing and Managing Plugins.
  • In the Mods tab, you can find mods in the Mod browser. The Modpacks tab contains complete modpacks. Learn more in Installing Mods / Modpacks.

If you download a file yourself, only get it from the official project pages:

SourceFor
ModrinthPlugins, mods, modpacks
CurseForgeMods, modpacks
HangarPlugins for Paper, Velocity, Waterfall
SpigotMCPlugins for Spigot and Paper
Warning

Do not download “leaked” or cracked premium plugins from third-party sites, Discord servers, or file hosts. These files are a common way for malicious code to get onto a server. Only buy premium plugins from the developer, for example on SpigotMC.

More tips:

  • Before downloading, check whether the project is maintained. You can find the author, last update, and version history on the project page.
  • Only install plugins you really need. Remove old plugins you no longer use.
  • Before making any major changes, create a backup in the Backups tab so you can restore a clean version.

Warning Signs of an Infected Server

Watch for these signs:

  • Unknown operators: In the Players tab, the Operators filter shows you who has OP permissions. If you see someone you don't know, a plugin or an outsider may have given them permissions. If there is no Players tab, check the ops.json file in the Files tab.
  • New or modified .jar files: In the Modified column of the Files tab, you can see when a file was last changed. If a file in plugins or mods has changed even though you haven't installed or updated anything, that's suspicious. The same applies to files you didn't upload yourself.
  • Unfamiliar commands in the console: The Console tab may show commands or messages you don't recognize, such as op, deop, whitelist off, or downloads from unknown addresses.
  • Plugins modifying other plugins: If multiple .jar files change at the same time, or plugins suddenly stop loading after a restart, malware may have modified those files.
  • Unfamiliar actions in the panel: The Activity tab logs what has happened to your server in the panel, such as File edited, File deleted, Plugin installed, Console command, or SFTP credentials renewed. Entries you can't account for may indicate unauthorized access.

Clean Up Your Server

If you suspect an infection, follow these steps in order.

1. Stop the Server

Stop your server so the malicious code can't continue running or modify more files.

2. Secure Your Access

  • SFTP: In the Files tab, under External access, click Renew credentials. Your old SFTP password will no longer work. See Access via SFTP.
  • Databases: If a plugin uses one of your server's databases, reset its password in the Databases tab using Reset password, then enter the new password in the plugin's configuration.
  • ZapX account: Your ZapX account doesn't have a traditional password you can change. Under Settings → Account, in the Signed-in devices section, click Sign out on all other devices to sign out of any unfamiliar sessions. Check your Passkeys and Linked Accounts there, and enable two-factor authentication. Learn more about login methods in Passwordless Login.
  • Service sharing: Under Settings → Service sharing, check which people can access your server through your groups, and remove anyone who no longer needs access by clicking Remove member. Revoke outstanding invitations using Revoke invitation. See Service Sharing.
  • Your PC: The files you upload were previously on your computer. Scan it with an up-to-date antivirus program and change the passwords for accounts you signed in to on that computer, such as your Microsoft account and Discord.

3. Check Operators and the Whitelist

In the Players tab, remove OP permissions from any unfamiliar players by clicking Revoke OP. In the console, use whitelist list to check who's on the whitelist, and remove unfamiliar entries with whitelist remove PlayerName. Details: Player Management, Granting OP Permissions, and Whitelist.

4. Restore a Backup

The quickest way to get back to a clean version is to restore a backup from before the infection:

  1. Open the Backups tab.
  2. Click Restore next to the relevant backup and confirm.

This completely replaces your current server data. You need a ZapX Pass to restore a backup. Find all the details in Creating, Restoring, and Downloading Backups.

Info

Choose a backup that's older than the first warning sign. If the infected plugin has been installed for a while, it may also be present in older backups. In that case, replace the .jar files as described in the next step as well.

5. Replace All Plugins and Mods

If you don't have a clean backup or you're unsure, replace all .jar files:

  1. Download the plugins or mods folders as a backup if you want to keep their configurations.
  2. In the Files tab, delete all .jar files in the plugins or mods folder—not just the suspicious plugin. Malware may have modified other .jar files as well.
  3. Reinstall every plugin and mod using the Plugin browser, the Mod browser, or a fresh download from the official project page. Don't use files from your PC that were already there before.
  4. Check the plugins' configuration folders (plugins/<Pluginname>) for files you don't recognize.
  5. Start the server and monitor the console, operators, and the Activity tab.

Example: fractureiser (2023)

In June 2023, the malware fractureiser came to light. It was found in mods and plugins uploaded to CurseForge and dev.bukkit.org (BukkitDev), including some in popular modpacks. According to the community investigation, it attempted to copy itself into every .jar file on the computer and stole, among other things, browser logins and credentials for Discord and Microsoft/Minecraft accounts. Windows and Linux were affected. For more background, see the fractureiser investigation documentation.

This case shows that even well-known platforms can't protect you from every tampered file. Only install what you need, keep backups available, and watch for the warning signs above.

Conclusion

You now know how to protect your Minecraft server from infected plugins and mods, and what to do if one is compromised. If you have more questions or need help, our support team is available every day! 🙂

Free tools

Minecraft Tools

View all

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.