LinuxQuestions.org
Visit Jeremy's Blog.
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 06-05-2004, 03:35 PM   #1
HappyDude
Member
 
Registered: Jul 2003
Posts: 140

Rep: Reputation: 15
Quick Question About Sudo


I wrote a little application (see below) that activates eth0 so my noobishness doesn't make me reboot. I was just wondering is it safe to sudo root it?

Code:
#include <stdio.h>
#include <stdlib.h>

int main () {

  system("/etc/rc.d/rc.inet1");

}
 
Old 06-05-2004, 05:11 PM   #2
neuroX
LQ Newbie
 
Registered: Oct 2003
Distribution: Slackware 9.1
Posts: 10

Rep: Reputation: 0
suid root?
I don't think that it needs to be run as suid root, because any old user can execute rc.inet1.

but to answer the question:
since you have the absolute path of the program, in order to exploit that program to get root, the user would have to modify or replace rc.inet1.
 
Old 06-05-2004, 08:29 PM   #3
HappyDude
Member
 
Registered: Jul 2003
Posts: 140

Original Poster
Rep: Reputation: 15
Lol, that never occured to me that I might not need to be root... I'll just keep fiddling then, thank you.
 
Old 06-07-2004, 10:59 AM   #4
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
anyway. check #ifconifg and #service (man) they are system commands that allow you to work with your network or to simply start|stop|restart the 'network' service.
 
Old 06-08-2004, 07:28 PM   #5
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by neuroX
but to answer the question:
since you have the absolute path of the program, in order to exploit that program to get root, the user would have to modify or replace rc.inet1.
Or anything called in rc.inet1.
 
Old 06-09-2004, 12:33 AM   #6
neuroX
LQ Newbie
 
Registered: Oct 2003
Distribution: Slackware 9.1
Posts: 10

Rep: Reputation: 0
Quote:
Originally posted by stickman
Or anything called in rc.inet1.
your right....
it doesn't use the absolute path to grep, so maybe on some systems you could make a file in the current dir called 'grep' and make it "#!/bin/bash; /bin/sh" or something to that effect.
 
  


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
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
SUDO question sajjad02 Linux - Newbie 1 03-07-2005 10:21 PM
sudo question satimis Linux - Software 3 12-07-2004 08:47 AM
Sudo question satimis Fedora 6 11-24-2004 08:58 PM
Sudo question. wbdune Linux - Newbie 2 10-14-2003 12:40 AM

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

All times are GMT -5. The time now is 05:47 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