Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BungeeResourcePack disconnecting users on login due to resource pack packet exploitation attempt #55

Closed
mibby opened this issue Jul 18, 2021 · 7 comments
Labels
incompatibility For cases where some incompatibilities with another plugin or server arises

Comments

@mibby
Copy link

mibby commented Jul 18, 2021

Used Version

BungeeResourcepacks version 1.8.6-SNAPSHOT (build 433) by Phoenix616

Config

debug: false
default-language: en
disable-metrics: true
autogeneratehashes: true
usepack-is-temporary: true
stored-packs-override-assignments: false
permanent-pack-remove-time: 0
empty:
 url: http://cdn.moep.tv/files/Empty.zip
 hash: 01517226212d27586ea0c5d6aff1aa5492dd2484
global:
 pack: rp
 send-delay: 20
packs:
 rp:
   url: https://censored/serverpack/rp.zip
   hash: 3ba45d7a7d236729009d4ede99c794e5f9afe556
   format: 7
   restricted: false
   permission: resourcepack.pack.rp

Environment description

Waterfall dev 445 (BungeeCord 1.17.1)
Purpur dev 1285 (Paper 1.17.1)

Full Log

BungeeCord log

[03:55:46] [Netty Worker IO Thread #1/INFO]: [/censored-ip:49302] <-> InitialHandler has connected
[03:55:47] [Netty Worker IO Thread #1/INFO]: [mibby|/censored-ip:49302] <-> ServerConnector [server] has connected
[03:55:51] [Netty Worker IO Thread #1/INFO]: [mibby] disconnected with: multiplayer.texturePrompt.failure.line1
[03:55:51] [Netty Worker IO Thread #1/INFO]: [/censored-ip:49302|mibby] -> UpstreamBridge has disconnected
[03:55:51] [Netty Worker IO Thread #1/INFO]: [/censored-ip:49302|mibby] <-> DownstreamBridge <-> [server] has disconnected
[03:56:15] [Netty Worker IO Thread #8/INFO]: [/censored-ip:49313] <-> InitialHandler has connected
[03:56:16] [Netty Worker IO Thread #8/INFO]: [mibby|/censored-ip:49313] <-> ServerConnector [server] has connected
[03:56:19] [Netty Worker IO Thread #8/INFO]: [mibby] disconnected with: multiplayer.texturePrompt.failure.line1
[03:56:19] [Netty Worker IO Thread #8/INFO]: [/censored-ip:49313|mibby] <-> DownstreamBridge <-> [server] has disconnected
[03:56:20] [Netty Worker IO Thread #8/INFO]: [/censored-ip:49313|mibby] -> UpstreamBridge has disconnected

Server log

[03:55:50] [Server thread/INFO]: Disconnecting TextComponent{text='mibby', siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}} due to resource pack packet exploitation attempt
[03:55:51] [Server thread/INFO]: mibby lost connection: Server resource pack couldn't be applied
[03:55:51] [Craft Scheduler Thread - 10 - mcMMO/INFO]: [mcMMO] Aborting profile loading recovery for mibby - player logged out
[03:56:16] [User Authenticator #1/INFO]: UUID of player mibby is censored-uuid
[03:56:17] [Server thread/INFO]: mibby[/censored-ip:54515] logged in with entity id 887 at ([spawn]-21.33077406640026, 53.0, 5.738365860783118)
[03:56:19] [Server thread/INFO]: Disconnecting TextComponent{text='mibby', siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}} due to resource pack packet exploitation attempt
[03:56:19] [Server thread/INFO]: mibby lost connection: Server resource pack couldn't be applied
[03:56:19] [Craft Scheduler Thread - 20 - mcMMO/INFO]: [mcMMO] Aborting profile loading recovery for mibby - player logged out
[03:57:37] [User Authenticator #2/INFO]: UUID of player mibby is censored-uuid
[03:57:38] [Server thread/INFO]: mibby[/censored-ip:52139] logged in with entity id 1269 at ([spawn]-21.33077406640026, 53.0, 5.738365860783118)
[03:57:41] [Server thread/INFO]: Disconnecting TextComponent{text='mibby', siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}} due to resource pack packet exploitation attempt
[03:57:41] [Server thread/INFO]: mibby lost connection: Server resource pack couldn't be applied
[03:58:22] [User Authenticator #2/INFO]: UUID of player mibby is censored-uuid
[03:58:23] [Server thread/INFO]: mibby[/censored-ip:54723] logged in with entity id 1725 at ([spawn]-21.847427547861543, 53.0, 5.231136325337318)
[03:58:32] [Server thread/INFO]: Disconnecting TextComponent{text='mibby', siblings=[], style=Style{ color=null, bold=null, italic=null, underlined=null, strikethrough=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null, font=minecraft:default}} due to resource pack packet exploitation attempt
[03:58:32] [Server thread/INFO]: mibby lost connection: Server resource pack couldn't be applied

What other programs/plugins are you running?

What is happening?

Disconnect from server due to BungeeResourcepack triggering resource pack packet exploitation attempts. Even if your resource pack is disabled in the multiplayer menu, BRP sends a packet check to the client that disconnects the user.

What did you expect to happen?

Being able to login without being disconnected.

Additional context

Delaying the pack sending delays the disconnect but doesn't fix the problem. Only fully removing BungeeResourcepacks from BungeeCord fixes the problem.

@Phoenix616
Copy link
Owner

Phoenix616 commented Jul 18, 2021

Imo. Purpur should provide an option for that protection. Fixing this in the plugin wouldn't be trivial and would require something like preventing that the status packets gets sent through the Bungee. (Something some people might even want so it would need an option too)

Also generally speaking I'm a bit sceptical why that check is even necessary in the server directly. Plugins that care about that case can easily handle that exact logic themselves and not trigger when they didn't send a pack.

@Phoenix616 Phoenix616 added the incompatibility For cases where some incompatibilities with another plugin or server arises label Jul 18, 2021
@BillyGalbreath
Copy link

Sorry about that. That feature was definitely supposed to be behind a config option. This has been rectified in build 1287.

As for why we do this check @Phoenix616 its because Purpur has the option to put a player into invulnerable mode while they are accepting/downloading a server resource pack. This check was put into place to prevent modded clients from abusing this feature to gain unlimited vulnerability. You can send the resource pack through ServerPlayer#sendTexturePack or manually set Purpur's ServerPlayer#acceptingResourcePack flag to make this plugin compatible with this feature.

@mibby Make sure you disable the player.invulnerable-while-accepting-resource-pack option in purpur.yml until this plugin becomes compatible with the feature.

@Phoenix616
Copy link
Owner

Phoenix616 commented Jul 18, 2021 via email

@BillyGalbreath
Copy link

Well that's not really possible in that case as the plugin sends the pack from the proxy :)

Shouldn't the plugin on the proxy swallow the responses then?

@Phoenix616
Copy link
Owner

Phoenix616 commented Jul 18, 2021 via email

@Phoenix616
Copy link
Owner

Phoenix616 commented Jul 19, 2021

Closing this seeing as there now is a work around (even though it might not be ideal in most situations).

As for why we do this check @Phoenix616 its because Purpur has the option to put a player into invulnerable mode while they are accepting/downloading a server resource pack. This check was put into place to prevent modded clients from abusing this feature to gain unlimited vulnerability.

Out of curiosity though: Why are you not freezing the player when the pack request is sent instead of when the ACCEPTED response comes? Wouldn't only freezing directly on send prevent the possibility for the exploit completely (and also ensure a bit more that the player doesn't get damaged as the server doesn't have to wait for the response)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incompatibility For cases where some incompatibilities with another plugin or server arises
Projects
None yet
Development

No branches or pull requests

3 participants