LinuxQuestions.org
Help answer threads with 0 replies.
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 09-19-2010, 01:34 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question Super user in Terminal and surfing the Web


If i logged in as a super user in Terminal and I surf the Web pages which contain dangerous scripts, can those scripts be executed as root because of the Terminal which has super user logged in? So if i logged in as a super user in Terminal, is it 100% safe to surf web-pages? Can anything in those pages use super user's privileges which is logged in Terminal?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-19-2010, 02:28 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
I don't know what the full level of risk you face is, but at the very least the process uses your user and group ownership, to be able to access files and directories belonging to you. And since the superuser has access to the whole system surfing as root is definitely not safe.
 
Old 09-19-2010, 02:50 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by Mr. Alex View Post
if i logged in as a super user in Terminal, is it 100% safe to surf web-pages?
It's the other way around: root is NOT a generic account for use by human users. You should not be using it to surf the web or whatever day to day stuff you do. Use it for systems administration and only that.
 
Old 09-20-2010, 08:39 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Guys, you got me wrong. I mean Firefox doesn't have root privileges, only Terminal. The Firefox is started from regular user. But at the same time there is a Terminal which currently has root logged in.
 
Old 09-20-2010, 08:48 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885
If Firefox runs as normal user, any script that will be started from within Firefox will also only run as normal user. So I think there is no risk at all. Please correct me if I am wrong here.
 
2 members found this post helpful.
Old 09-23-2010, 01:17 PM   #6
PenguinWearsFedora
Member
 
Registered: Jul 2009
Distribution: Slackware-14
Posts: 52

Rep: Reputation: 1
If you log in with root, then it's a problem. Since, you are logged in as a normal user you are fine. Unless you are starting firefox from that root Terminal emulator as "firefox &" then whatever firefox will do, will be done as a root user and that's just shooting yourself in the foot. Atleast, that's what my understanding is.

You know, I saw one guy who is working as a Linux admin always logs in as root and do browing etc. I asked him and he said with normal user you have to keep entering passwords all the time (in GUI mode). He does use the computer for personal use and for learning. I think it's just a security risk and just plain bad Linux practice.

Last edited by PenguinWearsFedora; 09-23-2010 at 01:19 PM.
 
Old 09-24-2010, 07:30 AM   #7
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
You should explain him why he shouldn't do this. Maybe he just doesn't understand...
 
Old 09-24-2010, 08:49 PM   #8
PenguinWearsFedora
Member
 
Registered: Jul 2009
Distribution: Slackware-14
Posts: 52

Rep: Reputation: 1
The guy worked as a Solaris Admin and he is Solaris certified & RHCE. I'm pretty sure he understands.
 
Old 09-25-2010, 06:11 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
As evidenced by his lack of respect and discipline and performing unprivileged user tasks as root account user he clearly does not. Period. Also let's not continue this SA discussion here as it is potential hijack material and definitely OT wrt the OPs questions.
 
Old 09-25-2010, 11:14 PM   #10
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
In all respect unSpawn, the OP's follow-up post states clearly that he is NOT performing unprivileged user tasks as root. He's simply worried that having a root terminal open at the same time may provide a channel for exploitation. While this shows a bit of uncertainty on his part about the exact nature of the risk, I see no evidence that he doesn't understand the basic risk of root privilege itself. Indeed, the fact that he even asked the question indicates that he does.

Speaking of which, I suppose there's a very remote chance that someone could create an exploit that would emulate the keyboard and attempt to type some malicious command into whatever console windows are open. But I think that's such an unlikely possibility that it isn't worth worrying about.
 
1 members found this post helpful.
Old 09-26-2010, 02:57 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by David the H. View Post
In all respect unSpawn, the OP's follow-up post states clearly that he is NOT performing unprivileged user tasks as root.
I was addressing PenguinWearsFedora's post. Since it's gotten this far it has become a nice example of how a hijack skews a thread.


Quote:
Originally Posted by David the H. View Post
I suppose there's a very remote chance that someone could create an exploit that would emulate the keyboard and attempt to type some malicious command into whatever console windows are open. But I think that's such an unlikely possibility that it isn't worth worrying about.
If I would create an exploit then I wouldn't try to sense if there's a terminal window open (no matter who owns the process) and try to type in commands. Way too much work when you can have the user pull in a payload by accessing a Flash movie stub or .pdf file.

Last edited by unSpawn; 09-26-2010 at 04:25 AM.
 
1 members found this post helpful.
Old 09-26-2010, 03:10 AM   #12
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
I missed the redefinition of the pronoun. You're absolutely right then. Mea culpa.

And I was just trying to imagine some way such a situation could be at risk. I didn't think it was anything to be taken seriously.
 
Old 09-26-2010, 05:26 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
No mea culpa necessary, I'm not accusing you of hijacking, if anything I should have used a quote to anchor my reply.

As far as taking things serious that kind of goes with the territory. After all this forum is home to several otakus (not derogatory but with positive connotations). Unless the OP shows clear signs of trolling, being part of the TFH crowd or strong stability issues of the pill-popping kind we should take things serious by default in the Linux Security forum.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How can I trace user's web surfing & delete large mail sent by the user by? mostafaashish Linux - Networking 4 08-07-2009 08:43 AM
web surfing Seith Linux - Networking 4 01-28-2006 01:18 AM
how to run ifconfig as root without super user terminal GUIPenguin Linux - General 1 01-15-2005 10:06 AM
How to use the "super" to add user from web? beelzebub888 Linux - Security 5 12-28-2002 11:06 AM
How to use the "super" to add user from web? beelzebub888 Programming 1 12-27-2002 04:20 AM

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

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