run ethereal as root

This is a discussion on run ethereal as root within the Linux Security forums, part of the System Security and Security Related category; Greetings, I compiled ethereal and it works fine. The problem is that I must launch it as root to be ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-13-2004
Gabriel
 
Posts: n/a
Default run ethereal as root

Greetings,

I compiled ethereal and it works fine.
The problem is that I must launch it as root to be able to capture packets.
Could somone explain to me how I could allow a non-root user to launch
ethereal, without providing any passwd ?

I think of sudo but I'm not sure.
any tip,url most welcome :)

thank you people.
Reply With Quote
  #2 (permalink)  
Old 12-13-2004
k
 
Posts: n/a
Default Re: run ethereal as root

Gabriel wrote:

> Greetings,
>
> I compiled ethereal and it works fine.
> The problem is that I must launch it as root to be able to capture
> packets. Could somone explain to me how I could allow a non-root user to
> launch ethereal, without providing any passwd ?
>
> I think of sudo but I'm not sure.
> any tip,url most welcome :)
>
> thank you people.


use sudu.. just add whatever users access to ethereal with no password in
the sudoers file.
Reply With Quote
  #3 (permalink)  
Old 12-14-2004
Gabriel
 
Posts: n/a
Default Re: run ethereal as root [SOLVED]


> use sudu.. just add whatever users access to ethereal with no password in
> the sudoers file.

Yes, it was as simple as that, I wasn't sure.

thank you very much :)
Reply With Quote
  #4 (permalink)  
Old 12-14-2004
k
 
Posts: n/a
Default Re: run ethereal as root [SOLVED]

Gabriel wrote:

>
>> use sudu.. just add whatever users access to ethereal with no password in
>> the sudoers file.

> Yes, it was as simple as that, I wasn't sure.
>
> thank you very much :)


yer welcome
Reply With Quote
  #5 (permalink)  
Old 12-14-2004
John Thompson
 
Posts: n/a
Default Re: run ethereal as root

On 2004-12-13, Gabriel <cy_rainchapeau26@yahoo.fr> wrote:

> I compiled ethereal and it works fine.
> The problem is that I must launch it as root to be able to capture packets.


It needs root privileges to access the raw ethernet device.

> Could somone explain to me how I could allow a non-root user to launch
> ethereal, without providing any passwd ?
>
> I think of sudo but I'm not sure.


Use visudo to set this up. Eg:
john starfleet = NOPASSWD:/usr/X11R6/bin/ethereal

Then when you want to run ethreal, use "sudo ethereal"

--

-John (john@os2.dhs.org)
Reply With Quote
  #6 (permalink)  
Old 12-15-2004
Jon Gomez
 
Posts: n/a
Default Re: run ethereal as root

Gabriel wrote:

> Greetings,
>
> I compiled ethereal and it works fine.
> The problem is that I must launch it as root to be able to capture
> packets. Could somone explain to me how I could allow a non-root user to
> launch ethereal, without providing any passwd ?
>
> I think of sudo but I'm not sure.
> any tip,url most welcome :)
>
> thank you people.


Or if you feel up to patching a kernel, you can run it as an unprivileged
user with just the needed capabilities modification:

http://lwn.net/Articles/80239/

Jon.

-- * Does the walker choose the path, or does the path choose the walker?
(fr. Sabriel) * --
Reply With Quote
  #7 (permalink)  
Old 12-19-2004
Tim Smith
 
Posts: n/a
Default Re: run ethereal as root

In article <41be0b0e$0$11905$636a15ce@news.free.fr>, Gabriel wrote:
> I compiled ethereal and it works fine. The problem is that I must launch
> it as root to be able to capture packets. Could somone explain to me how
> I could allow a non-root user to launch ethereal, without providing any
> passwd ?
>
> I think of sudo but I'm not sure. any tip,url most welcome :)


Uhm...are you *sure* you want to do this? This will allow those non-root
users to overwrite any file on your system, by saving a capture over it
from ethereal.

I haven't actually tried this...but in the preferences for printing from
ethereal, you can set the program to use (default is "lpr")....so what
happens if the user changes that to something of theirs? Will that let them
run their code as root?

--
--Tim Smith
Reply With Quote
  #8 (permalink)  
Old 12-20-2004
john@starfleet.os2.dhs.org
 
Posts: n/a
Default Re: run ethereal as root

On 2004-12-19, Tim Smith <reply_in_group@mouse-potato.com> wrote:

> In article <41be0b0e$0$11905$636a15ce@news.free.fr>, Gabriel wrote:
>> I compiled ethereal and it works fine. The problem is that I must launch
>> it as root to be able to capture packets. Could somone explain to me how
>> I could allow a non-root user to launch ethereal, without providing any
>> passwd ?
>>
>> I think of sudo but I'm not sure. any tip,url most welcome :)


> Uhm...are you *sure* you want to do this? This will allow those non-root
> users to overwrite any file on your system, by saving a capture over it
> from ethereal.


How so? sudo lets you enable this on a per-user basis. If the root user
enables ethereal access for me using sudo, then I am the only one able to
run ethereal from my non-root account.

If the root user doesn't trust me to use ethereal responsibly, then this
access should not be allowed in the first place. But since I am the root
user as well as an ordinary user, I have no problem configuring sudo to
give me access to ethereal from my user account.

--

John (john@os2.dhs.org)
Reply With Quote
  #9 (permalink)  
Old 12-20-2004
Hue-Bond
 
Posts: n/a
Default Re: run ethereal as root

john@starfleet.os2.dhs.org, lun20041220@20:07:38(CET):
>
> But since I am the root user as well as an ordinary user, I have no
> problem configuring sudo to give me access to ethereal from my user
> account.


Which means that now there is another way to get root in your system. Anyone
that gets the privileges of your user has instant access to the root
account. Are you sure that all the programs you run *as user* are safe? I
prefer to capture packets using tcpdump -w and analyze the log afterwards.


--
David Serrano
Reply With Quote
  #10 (permalink)  
Old 12-22-2004
John Thompson
 
Posts: n/a
Default Re: run ethereal as root

On 2004-12-20, Hue-Bond <responder_solo_en_el_grupo@yahoo.es> wrote:

> john@starfleet.os2.dhs.org, lun20041220@20:07:38(CET):
>>
>> But since I am the root user as well as an ordinary user, I have no
>> problem configuring sudo to give me access to ethereal from my user
>> account.


> Which means that now there is another way to get root in your system. Anyone
> that gets the privileges of your user has instant access to the root
> account.


No; it means that they could only run ethereal with root privileges. But
first they'd have to figure out that ethereal is sudo-enabled with root
privileges, and then they'd have to figure out how they could use that to
escalate other privileges.

Sudo allows fine-tuned control over privileged access -- on a per-user and
per program basis. Just because I can run ethereal with root privileges
doesn't mean that everything can run with root privileges.

--

John (john@os2.dhs.org)
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:25 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0