Filtering: Difference between revisions

From Kaboom Wiki
No edit summary
Add whitelist section
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Rewriting|User:Opt/Drafts/Filtering}}
'''Filtering''' is the act of automatically restricting a player's access to the server based on rules. For example, one may decide to create a [[Wikipedia:IP_address|IP address]] filter rule to restrict a player, even if they were to change their username.


'''Filtering''' is the act of restricting the access of a certain player to the Kaboom server.
Depending on the enabled enforcement types and implementation quality, filter activation can result in server lag and as such it is recommended to use efficient [[Kick exploits|kick exploit]] where possible or no kick exploits at all, especially when filtering spambots.


Filters are created by using bots that support it and are similar to how bans work on regular servers as they both restrict the access to their respective servers. These filters are typically used on players that bot owners dislike or are considered as harmful, such as spammers, people who run kill @e repeatedly, or players who are generally a nuisance.
Filtering is extremely useful when the server is spambotted and the spambots contain predictable characteristics which can be expressed in one or more rule type.


==Methods of Filtering==
=Rules=


===iControlU===
Filtering based on arbitrary strings, like chat messages or commands, is commonly implemented via versatile [[Wikipedia:Regular expression|regular expressions]].
iControlU is a plugin on Kaboom that allows for another player to "control" a player by taking over the player's movement, chat, and command access for themselves. Bots use this method by creating another bot which then controls the player, resulting in the player losing the ability to chat, move and run commands. However, this method is less frequently used nowadays due to it creating spam in the chat and requiring proxies to filter more than 4 players at a time.


===Kick Exploits===
==IP address==
A kick exploit is an exploit that allows for a player to be disconnected from the server without using the <code>/kick</code> command, which is currently blocked on the server.


====Vanilla Kick Exploits====
IP address rules are commonly used in lieu of exact username filters as evasion requires the use of [[Wikipedia:Proxy_server|proxies]] (often provided by VPN services).
Vanilla kick exploits work by forcing the server to send a large amount of data to the client, causing the server to disconnect the player as a result.


====ViaVersion Kick Exploits====
Due to most clones using [[IP masking]], it is impossible to filter [[Wikipedia:Subnet|subnets]] or [[Wikipedia:Autonomous system (Internet)|ASNs]] as one would expect from a [[Wikipedia:Firewall_(computing)|firewall]].  
ViaVersion kick exploits work by abusing a bug in the ViaVersion plugin to disconnect the player. These exploits only work on players who are on a different version than the server.


===Crash Exploits===
==Usernames==
A crash exploit is an exploit that causes a player's client to crash. These exploits can be mitigated or blocked by a mod since they are client sided.


====Translate Crash Exploits====
Username filter rules are often the first to be implemented when a bot or client developer is implementing a filter system. Due to most Kaboom clones being offline mode, it is also the easiest to bypass as players can just join under a different username.
Translate crash exploits work by abusing Minecraft's translation key feature by using it to recursively duplicate a string several times and then attempting to display it. This leads to the target crashing due to memory exhaustion.


====Particle Crash Exploits====
However, in combination with regular expressions, username filters can be used to mitigate spambots that use fixed username lengths or a predictable username format. Luckily, most easily available or paid spambot services use a predictable username format, so this remains one of the most important filter types to implement.
Particle crash exploits work by forcing the client to render a huge amount of laggy particles, which can be done by using area effect clouds. This method is not frequently used due to the risk of crashing unintended players.


===Gamemode Restrictions===
==Commands==
Gamemode restrictions do not cause the player to be disconnected from the server, but instead reduces the player's enjoyment by forcing the player into adventure or spectator mode repeatedly.


===Deopping===
Command rules can be effective to combat general command abuse as well as spambots which spam a certain command. For example, command rules have been used in the past to filter [[Skynet#Mountains of Lava Inc.|Skynet]].
Repeatedly deopping the player prevents them from utilizing operator commands, which serves to reduce the enjoyment of the player as well as preventing them from doing any more harm, leading them to disconnect on their own.


===Teleportation===
In the past, bots like [[mewo]] have filtered [[iControlU]] command invocations in an attempt to prevent itself from being [[iControlU#Locking|locked]]. Large scope blocks are discouraged unless you have a very good reason, as they have a noticeable impact on the [[Kaboom]] experience.
Repeatedly teleporting the player to a specific position prevents them from moving, which also reduces the player's enjoyment.


===Multiple Methods===
==Chat messages==
Most bots utilize multiple methods to cause a player to disconnect, leading to a higher chance of actually kicking the player.


==Methods of Detecting Filtered Players==
Chat message rules are also effective during spambot attacks, and have been used in the past to implement general content filters instead of just mitigating spambot attempts. For example, [[KCB]] would clear the chat if it detected a Discord invite in chat. Other bots have filtered chat messages for things like swear words or slurs in the past.


===Usernames===
=Enforcement=
Username detection is the simplest type of filtered player detection. It can be used by making a bot to simply read the tab list and kick anyone that is marked to be filtered on the list.


===IP addresses===
Enforcement of filter rules is often achieved by repeatedly [https://minecraft.wiki/w/Commands/deop deopping] players, changing their [https://minecraft.wiki/w/Game_mode gamemode] to something that isn't [https://minecraft.wiki/w/Creative creative], and [https://minecraft.wiki/w/Commands/clear clearing] their inventories.
IP address detection is a more complex way of filtering. It involves running the <code>/seen</code> command on every player that joins, then parsing the result for the IP address, and finally kicking anyone who has the IP address on their filter list.


===Fingerprinting===
==Implementation details==
Fingerprinting is more frequently used on bots and works by searching for a pattern of commands a bot sends when first connecting to the server, and if the pattern matches a predefined entry on the filter list, the bot is kicked.


In the interest of server performance and bandwidth usage, it is recommended that extensive use of [https://minecraft.wiki/w/Target%20selectors target selector] predicates are made (with the exception of the NBT predicate as that requires exporting the entity to NBT which is an expensive operation).


==Methods of Bypassing Filters==
For example, filtered players should be added to [https://minecraft.wiki/w/Scoreboard teams] and selected via <code>@a[team=example]</code>.
Furthermore, team names should be randomized, players should be added and removed from them based on the [https://minecraft.wiki/w/Java_Edition_protocol/Packets#Update_Teams Update Teams packet]. It's also a good idea to change the name of the team if it is removed, to prevent easy filter bypass.


===Alternative Accounts===
=Whitelists=
Using an alternative or "alt" account can be used to bypass simple username based filtering. Due to Kaboom being a "cracked" server, a player can simply use a "cracked" or pirate launcher to join with a custom name.


===VPNs and Proxies===
A whitelist is a type of filter that only performs enforcement actions when a player doesn't match a rule, instead of only when a player matches the rule. Due to this, whitelists have no need to implement [[Filtering#Commands|command rules]] or [[Filtering#Chat messages|chat message rules]]. Whitelists can somewhat emulate the behavior of the [https://minecraft.wiki/w/Commands/whitelist <code>/whitelist</code>] command if it is paired with a kick exploit.
Using a VPN or a proxy can be used to bypass IP based filtering.

Latest revision as of 03:07, 4 August 2026

Filtering is the act of automatically restricting a player's access to the server based on rules. For example, one may decide to create a IP address filter rule to restrict a player, even if they were to change their username.

Depending on the enabled enforcement types and implementation quality, filter activation can result in server lag and as such it is recommended to use efficient kick exploit where possible or no kick exploits at all, especially when filtering spambots.

Filtering is extremely useful when the server is spambotted and the spambots contain predictable characteristics which can be expressed in one or more rule type.

Rules[edit]

Filtering based on arbitrary strings, like chat messages or commands, is commonly implemented via versatile regular expressions.

IP address[edit]

IP address rules are commonly used in lieu of exact username filters as evasion requires the use of proxies (often provided by VPN services).

Due to most clones using IP masking, it is impossible to filter subnets or ASNs as one would expect from a firewall.

Usernames[edit]

Username filter rules are often the first to be implemented when a bot or client developer is implementing a filter system. Due to most Kaboom clones being offline mode, it is also the easiest to bypass as players can just join under a different username.

However, in combination with regular expressions, username filters can be used to mitigate spambots that use fixed username lengths or a predictable username format. Luckily, most easily available or paid spambot services use a predictable username format, so this remains one of the most important filter types to implement.

Commands[edit]

Command rules can be effective to combat general command abuse as well as spambots which spam a certain command. For example, command rules have been used in the past to filter Skynet.

In the past, bots like mewo have filtered iControlU command invocations in an attempt to prevent itself from being locked. Large scope blocks are discouraged unless you have a very good reason, as they have a noticeable impact on the Kaboom experience.

Chat messages[edit]

Chat message rules are also effective during spambot attacks, and have been used in the past to implement general content filters instead of just mitigating spambot attempts. For example, KCB would clear the chat if it detected a Discord invite in chat. Other bots have filtered chat messages for things like swear words or slurs in the past.

Enforcement[edit]

Enforcement of filter rules is often achieved by repeatedly deopping players, changing their gamemode to something that isn't creative, and clearing their inventories.

Implementation details[edit]

In the interest of server performance and bandwidth usage, it is recommended that extensive use of target selector predicates are made (with the exception of the NBT predicate as that requires exporting the entity to NBT which is an expensive operation).

For example, filtered players should be added to teams and selected via @a[team=example]. Furthermore, team names should be randomized, players should be added and removed from them based on the Update Teams packet. It's also a good idea to change the name of the team if it is removed, to prevent easy filter bypass.

Whitelists[edit]

A whitelist is a type of filter that only performs enforcement actions when a player doesn't match a rule, instead of only when a player matches the rule. Due to this, whitelists have no need to implement command rules or chat message rules. Whitelists can somewhat emulate the behavior of the /whitelist command if it is paired with a kick exploit.