LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-03-2017, 07:53 PM   #1
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Rep: Reputation: 57
If root account is removed/disabled, can malware enable root or get just as powerful?


This is for a system with Secure Boot enabled.

If you remove or disable the root account, can malware still enable root or get just as powerful?

Perhaps by taking advantage of software faults like buffer overflows if you forget to keep it fully up to date at all times?
 
Old 05-03-2017, 08:19 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,329
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Quote:
If you remove or disable the root account, can malware still enable root or get just as powerful?
Not in any case I've ever heard of, but removing the root user is a really bad idea. It will break your system.

If you use Ubuntu or a derivative, root is obscured (that is the password is not known), which is kinda sorta disabling root; sudo is used to execute root commands. Sudo is included with every Linux distro I've used, but, commonly, it's not configured.

Malware is nowhere near the issue on Linux that it is on other operating systems. Part of this is that it's too small a bit of the market to be a popular target. Part of it is the built-in security model of using the computer as user and not using root privileges unless and until you need to do root tasks. Configuring a strong firewall is wise, but many experienced Linux users choose not to use anti-virus software, as there are currently no Linux viruses in the wild and haven't been for years. The Linux kernel includes firewall capability, and numerous command line and GUI programs make configuring it easierl

The biggest security threat in Linux is the person at the keyboard who goes to dodgy websites, clicks on questionable links, and falls for phishing schemes. Vulnerabilities do get discovered, but they are normally quickly patched.
 
2 members found this post helpful.
Old 05-04-2017, 02:04 AM   #3
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Apologies, the question is a little misleading because by malware I mean software by malicious hacker trying to remote control what they can after getting you to run a trojan on a computer that is ONLY used for browsing the internet and when you knowingly run unknown software while trying to learn underground security.

So if I allow you to run absolutely anything you like, can you or anyone else do what it says in the title? Would that strategy make persistence on a bootable usb flash drive impossible?

Last edited by Ulysses_; 05-04-2017 at 02:13 AM.
 
Old 05-04-2017, 02:35 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
root account must not be disabled, because the system will not boot/start without that. But anyway if you can become root anyone else can do that too, so it is not impossible (but probably too hard...)
 
Old 05-04-2017, 03:09 AM   #5
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
What if a script disables the root account after booting is complete and the boot is from a live USB flash drive that will re-enable root at the next boot?
 
Old 05-04-2017, 03:34 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
I do not really understand what do you mean by "disable the root account"
 
Old 05-04-2017, 05:51 AM   #7
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
Quote:
Originally Posted by Ulysses_ View Post
So if I allow you to run absolutely anything you like, can you or anyone else do what it says in the title?
It's not supposed to be possible, but there have been numerous examples of exploits that did it anyway.

When you're not running as a privileged user, the kernel is supposed to restrict your access to system resources. Other programs and daemons may be running with root privileges and offering services to unprivileged users, but they too must prevent such users from accessing protected resources.

If a bug is found in the kernel or in a piece of software that runs as root, it may be possible for a regular user to exploit said bug to obtain root privileges. This is known as a privilege escalation attack.
 
Old 05-04-2017, 06:40 AM   #8
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by pan64 View Post
I do not really understand what do you mean by "disable the root account"
I don't either. Just seen some distros where typing su does not work. Only sudo. Therefore you can remove the regular user from the sudoers file, sudo no longer works, su does not work either, so no one can run commands with root previleges.

There must be more thorough ways to disable root though. Are they all vulnerable to programming errors allowing privilege escalation?
 
Old 05-04-2017, 06:53 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
you need to allow to become root somehow. Either by sudo or su or whatever you find safe/convenient. But remember, if you can do that anyone else can be able to use that too.
From the other hand see post #7.
 
Old 05-04-2017, 09:04 AM   #10
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Root could be used on another computer that is not used with a web browser but is reserved for cooking the .iso's that go into the bootable usb flash drive of the production system whenever you want a system change, such as an update.
 
Old 05-04-2017, 09:21 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
ok, probably I start to understand it.
for example openelec has a readonly root filesystem, which will simply disallow any modification of it. are you looking for something like this? Probably you need to boot from a live CD and that's all.
 
Old 05-04-2017, 09:39 AM   #12
perfectsecurity
LQ Newbie
 
Registered: May 2017
Posts: 21

Rep: Reputation: Disabled
On a server, every cracker trying to brute-force their way in will know it has an account named root and will try that first. What they don't know is what the usernames of your other users are. Since the root account password is locked, this attack becomes essentially meaningless, since there is no password to crack or guess in the first place. And yes it is possible via privilege escalation attacks through setuid programs (programs that run as root) running on your systems: type find / -perm -4000 -print to find these programs and change them to read only for everyone except for the root user.

Last edited by perfectsecurity; 05-04-2017 at 09:58 AM.
 
Old 05-04-2017, 09:46 AM   #13
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943Reputation: 3943
If your login id is a member of the wheel group, then you can simply sudo su, enter your own(!) login password, and ... "there you are!" The shell-prompt has become "#." You're now root.

A similar thing happens on OS/X or Microsoft Windows if you are "an Administrator."

These things are the reason why you should never use a login account "for ordinary purposes" which is a member of wheel. You're not Clark Kent. You can only step into a telephone booth to make a phone call – you won't emerge in blue tights.

- - -

Note that recent versions of Linux and OS/X have begun to impose limits on the root account: it is no longer "all-powerful."

- - -

The bottom line, however, is to never expose your system to "ssh hackers." Don't allow anyone on the outside world to be able to reach a login: prompt by any means at all. Secure your system using OpenVPN with tls-auth security and strong digital certificates. Anyone "port scanning" your system will see ... nothing. Anyone who suspects the existence of OpenVPN and tries to connect to it – will be silently and forever ignored. The only way to get to ssh (or to any other type of shell) is to pass through OpenVPN first – which they cannot do. (They can't even try. The door is shut, and hidden. There's 4096 + 1024 bits of pure entropy standing in the way.)

Last edited by sundialsvcs; 05-04-2017 at 09:54 AM.
 
Old 05-04-2017, 10:24 AM   #14
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by pan64 View Post
Probably you need to boot from a live CD and that's all.
Increasingly that's what I am gravitating to unfortunately. This is unfortunate because cd drives nowadays have a short working life, not to mention the long boot time and time to burn compared to flash.
 
Old 05-04-2017, 10:27 AM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,864

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
That's why I mentioned openelec, which can do that without CD. It uses squashfs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Should the root account be disabled in Fedora 18? LXer Syndicated Linux News 0 09-20-2012 12:10 PM
[SOLVED] how do i enable root account in mint 8 hoodooman Linux Mint 4 12-30-2009 06:19 PM
Do other distros have the Root Account Disabled Design LouArnold Linux - Distributions 40 09-21-2009 02:02 PM
Root Account Disabled (not smart) Can not root LOGIN mitchellray Slackware 12 06-30-2009 12:52 PM
URGENT (server down) : All account disabled ! (and also root) jmcollin92 Mandriva 2 01-10-2006 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration