LuckPerms

LuckPerms

41.4k Downloads

[Feature] Passwords to use /LP

Spontini opened this issue Β· 24 comments

commented

I've a good feature request for this kind of situations where some people joins the server with a hackclient that can run commands as the console (It's exist, i've dealth with it)

Add a password protection for LP commands, we set a password in configs (if we want to) and everytime we want to use any kind of LP command no matter what permission we have (including the console itself) has to confirm the password before running a LP command. (I'd be even more awesome if we can add passwords into specific commands as well by using LP Editor) for example

Player:
1-) /lp user Spontini permission set *
2-) Output: You need to confirm the password first! /lp confirm <password>
3-) /lp confirm DEFAULTPASSWORD
4-) Output: You've confirmed your password, you'll be able to use any LP command until your next session.

And to run it as the console it may be something like this;

Console:
/lp user Spontini permission set * password DEFAULTPASSWORD

Another thing is, if we can also set passwords into specific permissions we can not by using lp command so we can block some dangerous commands. Myself and few server owners have been dealing with some group who is using a client that bypasses mojang packets to spawn items with nbt data that run commands as console.

commented

Those clents would just abuse bad plugins/mods.
The fact that they gain access to the console tells me that a plugin/mod gives them acces and LP does NOT do that, so having this wouldn't help at all...

It's a modded server like i said, i can not just go and ban a random mod or whatever mod does it because it will literally kill the whole progress because 95% of the mods are connected to each other and needs each other to work properly. That's how modpacks works, you can not just go and delete a random mod or ban it, if you do that you'll kill the whole progress in a pack.

You can make a fork, add your changes, test it works and share results

commented

I am one of the server owner who have been dealing this issues. It will be perfect if you add this.

commented

Way out of scope for LP.
If your server is protected in the right way (i.e. disable OP, don't have remote access to console through like DiscordSRV's console channel, etc.) is this kind of issue non-existant.
Your problem comes from a poorly setup server and nothing more.
This feature would barely bring any benefit to any users other than yourself.

commented

Way out of scope for LP.
If your server is protected in the right way (i.e. disable OP, don't have remote access to console through like DiscordSRV's console channel, etc.) is this kind of issue non-existant.
Your problem comes from a poorly setup server and nothing more.
This feature would barely bring any benefit to any users other than yourself.

I've disabled VPNs, I've blocked all the ports except 25565 (which my Bungee's default port) I'm running modded servers and the OP does not effect anything after installing LuckPerms, DiscordSRV is already disabled since ever. There is few modded clients that can run commands as the console, in the modded network community it's a big deal, you can trust me i'll not be the only one who gets benefits from it, i know bunch of people (some are really experienced, top servers in modded community) who got hit by those clients.

Modded Servers (SpongeAPI) works a lot different than you thought, it's not like running a vanilla server, using Spigot with ton of plugin choices in the market.

commented

Those clents would just abuse bad plugins/mods.
The fact that they gain access to the console tells me that a plugin/mod gives them acces and LP does NOT do that, so having this wouldn't help at all...

commented

Those clents would just abuse bad plugins/mods.
The fact that they gain access to the console tells me that a plugin/mod gives them acces and LP does NOT do that, so having this wouldn't help at all...

It's a modded server like i said, i can not just go and ban a random mod or whatever mod does it because it will literally kill the whole progress because 95% of the mods are connected to each other and needs each other to work properly. That's how modpacks works, you can not just go and delete a random mod or ban it, if you do that you'll kill the whole progress in a pack.

commented

@Andre601 I feel that you’re being very naive and oblivious to the situation that is actually at hand. I’m not sure if you run any dedicated modded servers, but you clearly aren’t grasping the issue.

Regardless of whether or not this is to prevent hackers, LuckPerms is a permission plugin that controls access to every plugin in the game, whether it allows for changing game modes, the destruction of hub servers, or the ban of every player across a network.

Due to the importance and power that this plugin has, regardless of any situation, I feel that having a super secret safe setting that requires you to authenticate yourself in another way other than having a permission (like a password lets say) could be very sufficient, even for administrators with trust issues that are worried that other staff members could abuse their permissions.

The uses of this are quite broad beyond just people gaining back door access using a cheat.

Be a bit more respectful instead of just shitting on a kindly-in-depth suggestion.

Thanks

commented

I am as respectful as you can be in this situation.

What you guys are asking for is nothing more than damage control and nothing else.

When a player suddenly has access to LP commands is my first question "How did he get access to them?" and not "How can I prevent him from running LP commands?"
The main issue here is not that the player can execute LP commands without any authentication in place, but that he somehow gained permission to access those commands in the first place.

As a server owner should it be your top priority to fix the source of the issue (How did he get access?) and not try to reduce damage.
This is the wrong aproach to this issue and won't fix anything for the long term.

commented

@Andre601 I agree that the root causes of issues should be fixed, however, you have the sole power to create a one size fits all solution to literally every one of these issues that allow exploiters to gain access to permissions, and it's just as simple as adding a new argument that cross-checks a configured value.
Even if this isn't within the scope of LuckPerms, it'd massively improve the plugin's usefulness and it would be a hugely attractive feature for those looking for permissions plugins.
I don't want to tell you what to think, but it'd be fantastic if you could look at this from the perspective of improving your plugin and expanding its reach, rather than your current standpoint.

commented

Currently the root of the issue is the hacked client. If the player with hacked client can have console access, I am very sure there are hacks that will allow things like command spy. This will result in the hack client able to see commands like /lp confirm <password> even if there is such a feature, allowing the hacked client to have access to the password.

Sure adding a password will always be more secured, its the same for every plugin. If a hacked client also used WorldGuard commands, you can also say "password should be added to WorldGuard commands as hacked client was able to use its commands through some form of console access bypass." However, this will apply is every plugin. Does this mean that every plugin needs a password?

I do agree that adding a password has possible benefits to mitigate illegal access to luckperm commands, but its benefits not very huge and do not tackle the problem at hand, which is hacked clients. I think its important to look at the bigger picture of hacked client as a whole. In order to tackle the root of the issue is to actively block the hacks from being possible in the first place by patching exploits, fixing bugs and flaws.

Therefore, adding a password protection may have possible benefit, but going back to my first paragraph, it evident that having password will not be a solution to stopping hacked client from causing damage to a server. Password, in this case, is merely a small safeguard to increase the difficulty slightly for hacked client to gain unauthorized access, but not to stop it in any way or form.

commented

@benwoo1110 I think it's important to make the distinction of what these hacked clients are doing when they "gain access to console". They are able to spawn in items with NBT data that run commands. Such as signs that run /lp permission set * commands, they aren't actually gaining access to console as they cannot see the output of the commands they run as console.

Commands run by console don't show in commandspy, so it wouldn't be a problem to have a password as long as the password isn't run in a command in-game by a user.

And sure, an exploit caused by a mod oversight can be patched in time, but it's gonna take a lot of effort from many different people to put a stop to exploiters causing damage to servers.
As more mods are made, more exploits pop up, so why should it be the case that the developers of LuckPerms can't lend a hand with mitigating these issues? It would be a relatively small feature to add, and it would go a long way in helping to prevent the damaged caused by exploits.
As mentioned earlier, it's up to the server owners and the exploitable mod developers to fix these issues. But if the LuckPerms developers were to add a password system, it would be an incredibly useful tool for server owners to mitigate damage, so that they can free up time to work on the root causes.

commented

Those clents would just abuse bad plugins/mods.
The fact that they gain access to the console tells me that a plugin/mod gives them acces and LP does NOT do that, so having this wouldn't help at all...

Also one another thing, they do not gain access to console, they literally do it with a modded/ hacked client.

commented

Luckperm is a permissions plugin, not an anti cheat plugin. If you have players with hacked client luckperm isn’t the place to solve it.

commented

Luckperm is a permissions plugin, not an anti cheat plugin. If you have players with hacked client luckperm isn’t the place to solve it.

Jesus dude, i'm not asking for a anticheat plugin this feature doesn't make anything anti cheat related, it just makes anyone who got access to anything somehow can't ruin anything, LP is some kind of a protection plugin so it can have this feature, it will not give harm to anyone, it's really useful feature literally for everyone. I'm asking this to be a option for the Config not a default open feature

commented

LP is not some kind of a protection plugin, it is a permission plugin to set permissions for players on a MC server. Luckperm does not deal will hacked client, its completely out of scope of luckperms. If hacked clients can gain console access, no matter the permissions is set by luckperm, console will always have all permissions and can run all commands regardless of luckperm's permission or setting as luckperm doesnt do not and will not do any console locking. Sure, having password protection maybe a possible feature, but if you set luckperms permission nodes correctly i dont see an issue. Thus, this does not stop your issue of players hacking having console access, since having console access means the ability to use every single plugin command and even stop the server even if luckperms has password lock.

commented

LP is some kind of a protection plugin so it can have this feature, it will not give harm to anyone, it's really useful feature literally for everyone.

Wrong. LP was and always will be a permission plugin. Protection is not LPs job, but the job of other plugins like WorldGuard or CoreProtect, so this feature wouldn't make much sense in that context.

Additionally is there no proof that it will be useful for anyone. People will wonder "Uhm, what is that", set it and then get confused as to why they have to constantly write a password down in order to run basic commands.
Also, how in the world would plugins (i.e. Rankup plugins) handle this???

To be completely honest: This is a half-assed suggestion that would cause more issues for others than it can solve for you.
Your issue can be boiled down to some (human) errors:

  • You messed up inheritance (Make groups get perms from wrong groups) or simply gave wrong permissions to (default) groups
  • You run the server/network in offline mode, allowing people to use any name they like without proper UUID validation.
    • In case of a network could it also be caused by not protecting the backend server from direct connects (Private proxying)
  • Someone else gave the users permissions.

On a normal, properly setup server/network would players with "cheat clients" not have a chance with LP.
The fact that you're the first one requesting this kind of feature within years of LPs existance proofs, that this is not an issue as most servers don't face this issue because they're setup properly.

Your issue is a minority and - as mentioned before - wouldn't bring any benefits to most people but rather more complications.

commented

LP is some kind of a protection plugin so it can have this feature, it will not give harm to anyone, it's really useful feature literally for everyone.

Wrong. LP was and always will be a permission plugin. Protection is not LPs job, but the job of other plugins like WorldGuard or CoreProtect, so this feature wouldn't make much sense in that context.

Additionally is there no proof that it will be useful for anyone. People will wonder "Uhm, what is that", set it and then get confused as to why they have to constantly write a password down in order to run basic commands.
Also, how in the world would plugins (i.e. Rankup plugins) handle this???

To be completely honest: This is a half-assed suggestion that would cause more issues for others than it can solve for you.
Your issue can be boiled down to some (human) errors:

  • You messed up inheritance (Make groups get perms from wrong groups) or simply gave wrong permissions to (default) groups

  • You run the server/network in offline mode, allowing people to use any name they like without proper UUID validation.

    • In case of a network could it also be caused by not protecting the backend server from direct connects (Private proxying)
  • Someone else gave the users permissions.

On a normal, properly setup server/network would players with "cheat clients" not have a chance with LP.
The fact that you're the first one requesting this kind of feature within years of LPs existance proofs, that this is not an issue as most servers don't face this issue because they're setup properly.

Your issue is a minority and - as mentioned before - wouldn't bring any benefits to most people but rather more complications.

I don't know what kind of rankup plugins do you guys use but in the one i can put whatever command i want to into my rank up plugin so if i tell my rankup plugin to run /lp user Spontini permission set * password DEFAULTPASSWORD it will run it and it will work just fine since it got the correct password in it's configs.

In other question this is excatly what happens during i'm getting hacked, just like other 3 server owners, happened exactly the same thing.

11cab11 is the guy who is hacking.
ABeing is myself.

[11:00:42] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] #1 (10h 52m 47s ago) (11cab11) [U] (11cab11)
[11:00:42] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] > webeditor add * true
[11:00:42] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] #2 (7h 57m 32s ago) (ABeing) [U] (11cab11)
[11:00:42] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] > permission unset *

Also this;

[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] #35 (10h 55m 20s ago) (Console) [G] (default)
[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] > permission set * true
[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] #36 (10h 53m 52s ago) (11cab11) [G] (default)
[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] > webeditor remove * true
[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] #37 (10h 37m 24s ago) (11cab11) [G] (default)
[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] > permission set sponge.command.plugins true
[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] #38 (10h 36m 52s ago) (11cab11) [G] (default)
[11:01:47] [pool-10-thread-1/INFO] [minecraft/DedicatedServer]: [LP] > permission set bungeetablistplus.command true

There is some log records;

[00:05:00] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Welcome to EltegraNetwork 11cab11, enjoy your stay!
[00:05:00] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: [+] 11cab11

So He joined at 00:05:00 for the first time to the server,
and the other line that logs catch is this;
[00:05:27] [Server thread/INFO] [nucleus]: 11cab11 ran the command: /lp

so with in 5 minutes he is able to run /lp commands and the part he adds default group the * permission is not even shown in the .logs files

If you wanna take look; https://pastebin.com/ayqahxeR

Note: I've checked my consoles last connections etc and there is zero IP that i don't know, since only I do have panel access and i'm using SSL Key for my FTP and F2A for my panel.

commented

It's a waste of time to tell you this, because you won't listen, but here we go again:

99% of such issues can be boiled down to at least one of these errors:

  • You messed up the permission system, being it making groups inherit the wrong permissions or setting permissions to the wrong groups.
  • You didn't setup your server properly. This can be a server running in offline mode and not having a proper Auth system in place or a server on a network not being protected against joins from outside.
  • Another plugin/mod is installed that the client is accessing to then get access to commands. You would be surprised how many plugins/mods have a backdoor installed that give other people OP, permissions or similar.

Your issue is more a human error on your end and nothing that LP really could fix.
Even if Luck would add a password system would this not guarantee that this stuff would stop, as there sure are other ways to gain access again.

The best protection is basically useless if someone else messes stuff.
I myself have enough of this and won't waste my time with this as you clearly can't see the larger picture of why this is more an issue than a solution to your problem.

commented

It's a waste of time to tell you this, because you won't listen, but here we go again:

99% of such issues can be boiled down to at least one of these errors:

  • You messed up the permission system, being it making groups inherit the wrong permissions or setting permissions to the wrong groups.
  • You didn't setup your server properly. This can be a server running in offline mode and not having a proper Auth system in place or a server on a network not being protected against joins from outside.
  • Another plugin/mod is installed that the client is accessing to then get access to commands. You would be surprised how many plugins/mods have a backdoor installed that give other people OP, permissions or similar.

Your issue is more a human error on your end and nothing that LP really could fix.
Even if Luck would add a password system would this not guarantee that this stuff would stop, as there sure are other ways to gain access again.

The best protection is basically useless if someone else messes stuff.
I myself have enough of this and won't waste my time with this as you clearly can't see the larger picture of why this is more an issue than a solution to your problem.

  • I'm like 100% sure i do not have anything messed up with my permissions.
  • My servers arent cracked, i'm blocking all connections from the the ports except the 25565 port, and i also block proxy, VPN connections.
  • It'd be seen in the logs if they done such thing with a mod or plugin, a person can not have magically all the perms out of nowhere except they're using a hack client.
commented
  • My servers arent cracked, i'm blocking all connections from the the ports except the 25565 port, and i also block proxy, VPN connections.

Pretty sure that is not guaranteed to protect your server properly.
How should a server know what IP is from a VPN and which aren't? That's not a proper protection imo.

  • It'd be seen in the logs if they done such thing with a mod or plugin, a person can not have magically all the perms out of nowhere except they're using a hack client.

You are aware that backdoors are made in a way to be silent, right?
Not every exploit screams into the console "YEHAWWWW! USER XYZ HAS FOUND THE EXPLOIT AND YOU'RE ALL FUCKED NOW!"
Many exploits/backdoors are silent which is why they are exploits/backdoors....
Some plugins had such things for YEARS and where only discovered because someone decided to check the source code, or something.

Just because the console doesn't tell shit doesn't mean it isn't there.
That's like looking away from a fire and pretending it doesn't exist.

commented

And I shall reiterate again that luckperm is a permissions plugin, not an anti hacking/cheating plugin or a hack client blocker. To be honest, you should really just ban those players that are hacking, its part of being a server admin.

commented

The bottom line is this: if you have an exploit that is letting malicious players execute whatever commands they like from the console - you have bigger problems than just permissions on your hands.

Hypothetically, I add the password system you suggest to LP - then they're just going to move onto other commands, /stop, /ban, /give, /kill, access to WorldEdit, etc etc, all of which are arguably able to cause more damage to a server than editing permissions.

I understand where you're coming from, but ultimately, it's the root cause that should be fixed here. Bloating LuckPerms with extra password systems isn't going to solve anything.

Best of luck finding the culprit mod/plugin. (some advice: I'd start by patching the server to print a stack trace every time the console executes a command & then go from there.)

commented

I'd quickly like to chime in and point out a few things.

  1. Keep in mind that Andre is not an authority of any kind of this plugin. And neither am I!
  2. I whoelheartedly agree that preventing hackers from using LP is at best just a band aid on a flesh wound. With console access in malicious hands you have bigger things to worry about. All this would do is slightly inconviniece the hackers.
  3. Instead of asking random plugins to implement security band aids you should instead focus your efforts on finding the cause. Get together and try to work out how these people are doing it.
    My personal guess is that they are giving themselves signs with NBT data. When they are right clicked they can run any command as the command block user, which has full permissions (except a few handful ones). Now vanilla doesn't just let hackers spawn items at will. And I doubt Forge is the issue here either. I think it's a backpack like mod that has no validiation that lets you create any item you want. Get in contact with any dev of a mod that add some kind of additional inventory to a player and have them verify that the client can't change items.
    To reiterate; I'm not saying your issue doesn't exist or isn't bad, I'm just saying you're barking up the wrong tree by asking LP to implement superficial security.

P.S.: You could try blocking placing down signs (with NBT data) and see if that makes a difference. I'd guess it will.

commented

It really could be a good idea for the few that want to protect LP commands, however the users are only giving themselves all perms through LP in order to be able to do things in-game easily... They'll still be able to run any other plugin or mod command through console, including sudo commands on opped/players with permission, thereby even allowing in-game commands to still be done, though not as easily.