LagGoggles

LagGoggles

9M Downloads

Teleportation Exploit

Laike-Endaril opened this issue ยท 5 comments

commented

Description:

The "teleport to entity" feature in the FPS analysis screen allows any player to teleport, regardless of server config settings and permissions

How to reproduce:

Set all server permissions to 0 range / NONE, etc. Open a game and connect via a(nother) client. Run a 5s FPS test, then open the results and double click any entity

commented

Here are some notes, a series of tests, and results.

Notes:

  • All tests are using LagGoggles-FORGE-1.12.2-4.3-HOTFIX.jar, forge 14.23.5.2768, and no other mods.
  • I made sure to restart all servers/clients after making any config changes.
  • All tests were run in survival mode (SP, LAN, and dedicated hosts in survival, open LAN mode in survival).
  • "Restricted settings" are default settings...except that the NON_OP_PERMISSION_LEVEL is set to NONE. Note that even with default settings (START), teleportation should not be allowed, as per the descriptions in the server config file.
  • For all tests, LagGoggles is installed on both server/host and client
  • Settings are only changed on the host/server. The server setting file on the client is always default (except for SP tests)
  • For dedicated tests, the player on the client is not OP

Each test is...

  1. A 5s profiling of the noted type
  2. Opening the test result screen, and double clicking an entity on the left-hand list to attempt a teleport

SP w/ default settings (FPS): Allowed
SP w/ default settings (World): Allowed
SP w/ restricted settings (FPS): Allowed
SP w/ restricted settings (World): Allowed

LAN w/ default settings (FPS): Allowed
LAN w/ default settings (World): Allowed
LAN w/ restricted settings (FPS): Allowed
LAN w/ restricted settings (World): Allowed

Dedicated w/ default settings (FPS): Allowed
Dedicated w/ default settings (World): Allowed
Dedicated w/ restricted settings (FPS): Allowed
Dedicated w/ restricted settings (World): Allowed

It looks like teleportation is being allowed in all circumstances. I believe this can be prevented by uninstalling the mod from the server, but that renders the mod useless for world profiling (ie. the important part for a dedicated server).

commented

Can you share your configuration file as well as a log? I don't have time to reproduce this for at least a week

commented

I'll go through and run some more detailed tests, and then post the information (hopefully today)

commented

I've downloaded the source to debug a bit more. I added a println into the message handler for the teleport packet, and it always returns FULL permission level. I'll go look into how the permission level is being set.

I may do a PR for this if it's not too complex

commented

I have a correction to make! I made one mistake during my initial tests, and forgot to deop the test player on the dedicated test. By the code you have in getPermission(), it is actually working as you intended, as far as I can tell.

The only issue I have is that the setting does not apply in LAN games. I understand that a LAN game is usually a gathering of people you trust, but that's not necessarily the case. It also caused me some confusion. I'd at least mention that the setting applies to dedicated servers only, if you don't plan on changing it.

tl;dr:

  1. The setting doesn't do what I expected (ie. it only applies to dedicated servers)
  2. I made one mistake during my tests and forgot to deop the test player on dedicated mode (dedicated permissions are working fine).

I'll close this since it's technically not a bug. I may or may not open another related issue though, regarding LAN behavior and/or the description of the setting in the config file.