Tips for avoiding issues:
1. Harden your server.
a. Never store your rcon password in your server.cfg
b. If you don't use RCON, don't have an RCON password at all.
c. Don't hand out admin to people you don't trust. (Too many servers sell admin for a quick buck)
d. Make sure your RCON password is hard/impossible to guess or brute force. (An example of an old RCON password I used: r0v493BK0A*jrw7d5fVK
e. Disable sv_allowupload. There have been known exploits with this.
f. Make sure sv_cheats and sv_allowcslua are both off.
2. Don't use the workshop.
a. Workshop addons are automatically updated and any malicious coder can add backdoors whenever they want.
b. If you want to use something from the workshop, extract the .gma file and install it as a legacy addon. This is easy to do.. google it.
3: Check any addons you download.
a. Learn what to look for in addons for backdoors and vet any addons you download before installing them.
4. Really, don't use ANY addons that were made by someone else.
a. I realize this isn't possible for some people, but in a best case scenario, you or someone you trust would make all of your addons.
5. NEVER give access to your admin panel or remote desktop to ANYONE.
a. Learn enough about how to install addons and stuff yourself so you don't have to give access to other people.
b. If you have a VPS or Dedicated server, you can grant screensharing with someone using something like Team Viewer so that you can see what they're doing.
This is just what I could think of on the spot. I'm sure there are more.
The point I am trying to make is, I've had gmod servers of all kinds (Dedicated, Shared, Personal, etc) for 10 years now, and I have never once had any issues with getting 'hacked' or anything like that. You just have to be smart.
Last case: If someone is DDoSing you or griefing you and they won't give up, sometimes the best thing to do is just shut down the server for a day or so. They are only doing it to get a reaction from you. If you take that away from them, they will get bored and move on to someone else. This actually has happened to me a few times in the last few years, and sometimes it's what has to be done.