games647 / LambdaAttack

Minecraft bot for servers. Currently supports stress testing.
MIT License
278 stars 56 forks source link

Under attack #48

Closed SchmidtMax-staips closed 4 years ago

games647 commented 4 years ago

How do you know it's actually this tool? The tool is used to stress test my plugins, but its too simple that it properly won't used in any real attack.

To prevent the attacks, you could use firewall tools and anti bot plugins. There is wide variety of software and services that can help you there. Antibot plugins often handle the request too late and suffer from a bad BungeeCord event architecture. Firewalls or other reverse proxies could handle the easier, because they don't have any Minecraft logic to process and they handle the packet on much higher layer. There are also services from server hosters or CDNs to handle attacks on the IP layer. Furthermore even CloudFlare has a Minecraft related service.

However before picking the service with the highest price, you should analyze the bottlenecks on your server. This is what this tool is all about. Create a copy of your server. Switch it to offline mode, to allow fake accounts and then generate syntactic load. Now you could attach a profiler to it and check where your bottleneck is. Is a specific plugin generating too much CPU usage. Is your server bottlenecked by I/O (-> maybe load it async). Are there any blocking calls on the main thread?

Your solution should depend be specific to your problem. You could also integrate something dependent on the incoming load. For example: GEO-Block the IP ranges, switch onlinemode, only allow existing players, disallow any new join attempts, drop connections on IP Layer.