LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-02-2015, 02:05 PM   #1
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Could sudo be modified to give instant root access?


Been wondering this for a while, and seems pretty straightforward. Why hasn't someone modified the freely available sudo source, took out the part where it asks for the user's password, compile it, and use it on most any box to instantly gain root privileges? If this does work, I'd like to try it on Android to see how far I can get.

Thanks for the input.
 
Old 04-02-2015, 02:08 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Just use the NOPASSWD option in your sudoers file. Not to mention that it is a very bad idea to grant everyone root privileges without password.
 
1 members found this post helpful.
Old 04-05-2015, 12:03 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
The sudo binary needs to be setuid root to evalate privileges of the user running the command. You can't install sudo on a system that you don't already have root access to because you won't be able to install the binary setuid root.
 
Old 04-06-2015, 04:17 PM   #4
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616

Original Poster
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by btmiller View Post
The sudo binary needs to be setuid root to evalate privileges of the user running the command. You can't install sudo on a system that you don't already have root access to because you won't be able to install the binary setuid root.
Ah, OK. So it's not as simple as deleting a few lines of code and (re)compiling?
 
Old 04-07-2015, 04:41 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Again, there is no need to recompile. sudo has that functionality already, it just has to be configured to work that way.
 
Old 04-07-2015, 05:02 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by Ihatewindows522 View Post
Ah, OK. So it's not as simple as deleting a few lines of code and (re)compiling?
You are right, there is no way to modify a few lines of code and rebuild - to achieve it. sudo should be installed by root first, and also root can configure it to skip that step (so that feature is already implemented, but by default not in use).
 
Old 04-07-2015, 06:41 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
It's already quite easy for most people to gain root access. Simply do sudo su and enter your own login password (if you have one), and ... there you are.

Mind you, it shouldn't be that easy ... it shouldn't be possible at all. But many Unix/Linux/OSX users are just as lazy as the next bloke.
 
  


Reply

Tags
exploit, root, source, sudo



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
Always give root (sudo) privileges in Ubuntu 11.10? mkirsch72 Linux - General 11 02-16-2012 10:19 PM
[SOLVED] Using sudo to give read access to specific directory savona Linux - Security 14 01-31-2012 10:50 AM
Crash results in modified menus and no sudo access Ubuntu mg92865 Linux - Newbie 2 02-05-2008 10:23 AM
Give root access to user's display + sudo problems Ephracis Linux - General 12 01-11-2006 11:25 PM
Instant Root Access! LinuxSeeker Mandriva 2 09-05-2004 04:35 AM

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

All times are GMT -5. The time now is 05:26 PM.

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