|
|||
|
cpanel bug / Get root access with root password
cpanel have a bug!
see this clip ! http://www.ihsteam.com/cms/modules/m...sit.php?lid=41 advisory http://www.ihsteam.com/cms/modules/m...sit.php?lid=40
|
|
||||
|
Then you should have contacted cPanel through the standard channels, i.e. emailed security@cpanel.net.
__________________
Jonathan Michaelson cPanel Forum Moderator Need your cPanel servers secured and tuned? cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf http://www.configserver.com |
|
|||
|
That is correct. If you manage to guess the server owners root password you will have access to all accounts on the server. Just like if you have the servers root password you can login to root via shell.
Sorry this is not a bug/exploit. This is how linux works. |
|
|||
|
I think I understand how this could be a bug...
Under normal operation, you would have to know that "root" has the password of "defpass" to be able to login as root. So you need to know two things - the username and the password. However, due to the reseller drop down box option - you only need to know/guess the password. So, for example, if your customer decides to use the password "defpass" and then logs in - the cPanel control panel will show the "Change domain" dropdown menu which will give them access to other peoples accounts and they may then attempt to try logging in as root with that password. Ok, if you have relatively secure passwords such as Q69x73PF or u962THK2 or 79r4KE6F (Firefox's Secure Password generator is so handy!), the chance of a user being able to guess the password you happen to be using is quite low, but it still takes away the "two items needed" standard security of Linux. So what can cPanel Inc do? Well, they could remove the "Reseller/WHM drop down" menu which appears on cPanel - it won't avoid the bug, but would provide no indication to a user that they have happened to set their password to the same as the root user. cPanel Inc could also remove the very handy "login as customer using reseller/root password" option and only allow access via the WHM List account option (meaning that the username+password combination comes back into force). But that's about it and it's not "that big" a security issue as long as you have relatively secure passwords IMHO (but it's still a slight issue). Other things cPanel could do to minimise the effectiveness of this bug: Limit the number of password changes a user could make in a set time frame (does a user really need to change their password more than twice in any 24hours?), ensure incorrect logins to control panels are logged so servers running something like BFD can pick up invalid logins and block IP addresses (we've all probably got BFD checking for invalid SSH root logins - but how about invalid cPanel/WHM logins?), add IP address restrictions to the root WHM system (even support .htaccess would be fine). |
|
|||
|
Quote:
This is if i understand what's presented in the thread. Thanks Anup |
|
||||
|
I guess what this winds up meaning is like this:
with "root" you don't have to guess the username ..you know it. One posibility only. But you would have to guess the password. you have one possible "root" username that would be correct. If you can use any of the users and the root password you have that number of possible matches for the username (total on box) and the password you have only one posibility. So if someone gets on the cpanel as "joblow" and actually guesses the only root password ..he will figure out that he has the root password ..which means he can try "root" and that same (root) password elsewhere also on the box ..ssh and whatever else. Am i on the right track with what this means? So he would have to do this guessing attack against the cPanel 2082 login right?
__________________
Just keeping my "eye" on things.... R. Paul Mathews RPMWS - diehard cPanel Nutcase |
|
|||
|
From what I see its required that you use your root or reseller account password when making an account in order for this to work. I don't think anyone in their right mind would use their root or reseller password as a customers initial password. I would think this has a low to nill chance of being exploited. If a person uses their password like that, they're just asking for it.
__________________
Specks |
|
|||
|
Quote:
If my own user lets say "shulshof" has the same password as root, I do not get root access, this is not how unix works. That is my understanding of what happened. Please correct me if I am wrong. But being a "normal" user having a root password is what happened. The chances of this happening, almost zero. Still a bug and should be fixed (if my understanding of the problem is correct) ![]() Steve |
|
|||
|
There is one other measure you can add that i dont thinks been mentioned.
Disable direct root login That way the "hacker" has to enter two logins : wheel group user and pass root pass Now of course if this user has the root pass he can easily add himself to the wheel group via root whm but nonetheless its another measure in place. Another way would be to change the ssh port. Of course the above methods only affect ssh logins. It is a very, very slight chance that the user picks a password identical to the root password but its still a chance, what can be done about it? not much i think. |
|
|||
|
I also see where shulshof is coming from, for example:
If a client signs up say under the login of: User: demoacc Pass: 12345678 And say for this example the root pass is : 12345678 when he goes to sign in at domain/cpanel using his login then he is going to be seeing a lot more then he should. All accounts owned by root will be selectable via the drop down list. Not very secure, but also not very likely to happen. |
|
||||
|
how is this a bug?
If you guess the root password, you have access to everything on the box. If I guess *your* password, I've got access to everything in your account. That's just the way operating systems work.
Perhaps the only vulnerability here is the presence of the dropdown box. Cpanel could possibly make the drop-down box a configurable option for prospective security experts who are concerned about this. Or, could possibly detect an attempt to change a password to the root password and refuse it at the time of the change, but that's about it. Actually, there probably is a useful fix here - if a user password is the same as the root password, don't assume it's root trying to log in. I guess currently that cpanel checks for a root password before checking for the user password and I'm suggesting a reversal of order in the checks. Really, there's no substitute for a good root password. In training sysadmins in basic security the FIRST thing we teach them is to choose good passwords. If you can't do that part, then it's nearly pointless working on any other aspect of security. Of course, there's the other part of this, in that cpanel and WHM don't enforce good passwords as far as I know (I don't try to set bad passwords so I wouldn't run into that restriction). That in itself would be a meaningful and helpful security enhancement. They'd want to run a dictionary check, and check for permutations of the user name. Since the admin doesn't get to control what users reset their passwords to, this would be a good move for the industry. Last edited by brianoz; 08-19-2005 at 11:16 PM. |
|
||||
|
Quote:
__________________
Just keeping my "eye" on things.... R. Paul Mathews RPMWS - diehard cPanel Nutcase |
|
||||
|
Quote:
![]() Quote:
![]() http://bugzilla.cpanel.net/show_bug.cgi?id=2082
__________________
Jonathan Michaelson cPanel Forum Moderator Need your cPanel servers secured and tuned? cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf http://www.configserver.com |
![]() |
| Thread Tools | |
| Display Modes | |
|
|