Minecraft Blogs / Tutorial

Help! My Server's Been Hacked! (A Disaster Recovery Guide)

  • 6,731 views, 1 today
  • 10
  • 3
  • 7
Tux2's Avatar Tux2
Level 42 : Master Unicorn
52
Yes, we've all heard this one, and it's not even isolated to a few admins, even the best of us can leave something unchecked and get hacked. (I just got hacked tonight due to me not securing something, oops). This guide should serve as a checklist to those admins under attack to make sure the bad guys do as little damage as possible.

I Need Help NOW!

Under attack right now? Here's a few steps to minimize the damage the griefers are doing:
  1. Stop the server. (Yes, that's right. Griefers can't grief a server that's stopped)
  2. Check your ops.txt file for any unauthorized players.
  3. Download your server log and open it in notepad++. Search for all the names of the players that were griefing (make sure to make the search non-case sensitive). This should give you a list of all the commands they did to those players and you should find who opped the guy in the first place.
  4. Remove rouge permissions from your permissions files from those players. Also, look through your users.yml, or whatever file your users permissions are in, looking for any weird, out of place perms that that user shouldn't have.
  5. Check your whitelist.txt file for players that shouldn't be whitelisted.
  6. Make sure to pardon any players that were banned during the griefing raid.
  7. If you have them, restore your worlds from recent backups.
  8. Change all the passwords on any entry points for your server (Multicraft, ssh, etc.).

  9. Start your server back up!

Okay, Crisis Adverted, Now what?



Now that the initial crisis is adverted, let's run through a list of possible entry points that the attackers could have gotten in through and how to avoid things like this happening in the future.
  • Change all default passwords to a secure password. Yes, that's right, make sure there are no default passwords lingering. Check your password strength using a site like this: http://howsecureismypassword.net/
    Places to check: MultiCraft, McMyAdmin, Spacebukkit, rtoolkit

  • If you're using rtoolkit, either disable telnet access, or remove the default user with the command ".userremove user" in the server console (this is how the attackers got into my server, using the default username "user" and the password "pass"... I thought I had it disabled.)
  • If you don't have a backup plugin, get one immediately. Here's a good one to try: http://dev.bukkit.org/server-mods/minebackup/
  • Keep offsite backups! Sometimes griefers tell the backup plugin you have installed to delete all the backups, so it's always a good idea to download a few backups to another location. (The backup plugin I have listed above does not have a delete backups command) Also, sometimes admins go bad and decide to wreck your server, so having a complete, recent backup in case of emergencies is always EXTREMELY important!

  • Don't give OP to new players. Seriously, that command should be banned from all servers and everyone should have to use permissions.
  • Install a logging plugin. I use LogBlock on my server, but Hawkeye and Prism also work.
  • Keep your server up to date and don't use dev builds! That's correct, not updating can leave you, and your server vulnerable.


Hopefully this guide helps you guys out. I have adverted quite a few server griefing teams on different servers that have called out to me for help using these simple steps. Avoid being the next server that shuts down, or resets the map due to a griefing team rolling through and just be able to keep on going like nothing ever happened. ;) I bet the only evidence my users will notice (this was done at a time when only 1 player was online) is the post I posted on my website about it. :D

If this guide has helped you out, please consider giving it a diamond.
CreditThanks to the griefing team that rolled through mine and my friend's servers. With this simple plan we adverted quite a major disaster.
Tags

Create an account or sign in to comment.

1
01/16/2015 12:25 am
Level 1 : New Miner
fauxydog
fauxydog's Avatar
i think... that this dude if hacking every server i go on. i only have 2 servers. a pvp raid server and my own personal server called foxgrove. this hacker named tpug123 has hacked into both of thoes servers and can only talk to me threw this one player. his name is haydenoffman. tpug123 kicks hayden and talks threw him and is always talking to me. i once wrote GET OUT OF MY SERVER and he kicked hayden and said "make me b****" and then he wouldnot leave me alone. i cant ban hayden. he is one of my op freinds and i cant ban him on every server. i dont know wat to do. and btw im only 12. so try to tell me in lover vocab and.. normal words.. thx. -fauxydog from foxgrove
1
05/02/2013 1:09 am
Level 14 : Journeyman Modder
keepablock
keepablock's Avatar
Is it possible to get your MySQL injected on a Minecraft server? I remember the main way of hacking a server of a different game I played on was an injection hack. God forbid I lose all of my players' McMMo levels!
1
05/02/2013 9:43 am
Level 14 : Journeyman Modder
keepablock
keepablock's Avatar
So you are saying that I should keep all of the databases I want to be partially secured in seperate sections of MySQL? :) That sounds easy enough. Is there something more secure than MySQL that is just as efficient?
1
05/02/2013 3:41 pm
Level 42 : Master Unicorn
Tux2
Tux2's Avatar
It's actually not the mySQL that isn't secure, it's the plugins that access it that may not be secure. SQL injection is done by manipulating the string that is put into the command to save it to the sql database. There are utilities out there for programmers to use to make sure their plugins sanitize the input, which I utilize for every user inputted data in my plugins.
1
05/02/2013 3:34 am
Level 42 : Master Unicorn
Tux2
Tux2's Avatar
Is it possible? Yes. Is it likely? Probably not. Most plugins use sanitized input, although a poorly written plugin could be subject to injection attacks. Especially one that stored book data or any other player written data. Yet another reason to use different databases for all of your plugins, as a poorly written plugin with an injection attack could allow an attacker to take your whole logblock database with it as well if it's in the same database.
1
04/29/2013 7:37 am
Level 25 : Expert Ranger
Jarod99
Jarod99's Avatar
Good but if I may suggest something. HawkEye is probably the best Anti Grief plugin to have because it uses a MYSQL database and stores data on their thus meaning you can rollback things that happened a month or longer ago. So I would recommend getting that on your server whether or not you've already been griefed or as a preventative.
1
04/29/2013 10:56 am
Level 42 : Master Unicorn
Tux2
Tux2's Avatar
Yes, it is true HawkEye stores data in a mySQL database, but so does LogBlock and Prism, and all of them can roll back things that happened a month or longer ago. (I've tracked down griefs that have happened 4 months ago on my server.) All three of them do a good job at what they do, and usually it's just a matter of preference.
"Install a logging plugin. I use LogBlock on my server, but Hawkeye and Prism also work." ~ Quote from article.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome