![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
The Community Cafe The Community Chat area is for lighthearted and enjoyable discussions, like you might find around a water cooler at work. Almost any non-tech-support topic may be discussed here. Discussions on religion and politics are not allowed, except for politics directly related to free and open source issues. Any topic or discussion that causes problems or drama will be closed. This area is intended for fun and community building, not arguments. Please take those elsewhere. Thanks! |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
May the Ubuntu Be With You!
![]() |
Hypothetical virus for Ubuntu
A user (who uses su or sudo, but is not root) downloads an executable program and runs it. The program creates a directory ~/.virus and adds it in the beginning of the path in his .bashrc. Now, the virus copies all (or just some of the most commonly used) programs that are often used with sudo to ~/.virus and modifies them (injection of binary code or adding something to the source and compiling a new binary) to record the sudo password. At this point, the password can be sent home to the attacker, or used by the virus automatically to do ... anything to the system.
My question: is this possible? Have I missed something? ![]()
__________________
But I mean no harm nor put fault On anyone that lives in a vault But it's alright, Ma, if I can't please him. |
|
|
|
|
|
#2 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Nov 2005
Location: Canada
My beans are hidden!
|
Re: Hypothetical virus for Ubuntu
Sure, though I don't think the author of the virus would be so conspicuous to leave ~/.virus
The problem is the users use of su/sudo, as long as he/she is tricked into giving up the password, a cracker wouldn't have to be so clever to cause great harm. On a somewhat related note, wasn't there a bug in Breezy where the users password was stored in a file viewable by anyone? I'll post the link if I find it |
|
|
|
|
|
#3 |
|
May the Ubuntu Be With You!
![]() |
Re: Hypothetical virus for Ubuntu
Well, the point here is that the user will not actually enter the sudo password when running the untrusted program. (and .virus is just an example. It could be hidden deep inside .themes or something) Instead, he will run a program as a regular user, thinking that it's perfectly safe, and the program will later steal the sudo password.
__________________
But I mean no harm nor put fault On anyone that lives in a vault But it's alright, Ma, if I can't please him. |
|
|
|
|
|
#4 |
|
HP Mini 1120nr User
![]() Join Date: May 2005
Location: US
My beans are hidden!
Ubuntu 9.10 Karmic Koala
|
Re: Hypothetical virus for Ubuntu
Here's that link, Nalmeth.
I don't know all the technical details, but my feeling is that if you're running random executables from untrusted sources, your computer is going to be compromised sooner or later. |
|
|
|
|
|
#5 |
|
Dark Roasted Ubuntu
![]() Join Date: Apr 2005
Location: Hampshire, UK
Beans: 1,083
|
Re: Hypothetical virus for Ubuntu
I see nothing wrong with your analysis, and it's a pretty hard vector to guard against. In fact, the only thing I can think of is that sudo be modified to check your current $PATH to make sure that "common" root-only executables (e.g. apt-get) are not "hidden" by identically-named executables that reside in a path writable by non-root users, and to issue a warning if such a "shadow" executable is found. This is far from elegant/ foolproof, though.
|
|
|
|
|
|
#6 |
|
Dark Roasted Ubuntu
![]() Join Date: Aug 2005
Location: Boston (British Expat)
Beans: 1,121
Ubuntu 8.04 Hardy Heron
|
Re: Hypothetical virus for Ubuntu
hmmm, we basicly have a list of known safe software and all the files involved in those programs. if someone where to come up with a stupid user computer checker that could be run on computers via a cron job just to check for things such a .bashrc modifications, cron modifications and files which don't belong to any packages and are executable.
That wouldn't stop damage being done by a virus but it would stop one from remaining in the system. the biggest threat is when it goes into the cron because those system crons run as root unlike .bashrc which runs as the user and they'd have to type in their password all the time to allow the virus to do more harm or send more spam. Obviously the programs outlines above wouldn't be useful to a technical user whos compiling things but they should know better.
__________________
42 is not an anwser, it's an error code. the universe is saying 'Error 42: meaning to universe not found' Unemployed Programmer and Massachusetts LoCo Leader |
|
|
|
|
|
#7 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Nov 2005
Location: Canada
My beans are hidden!
|
Re: Hypothetical virus for Ubuntu
I see, I misunderstood the sentence.
Here is that thread, stickied in the Security & Servers section: http://ubuntuforums.org/showthread.php?t=143334 I don't quite understand how this virus would work though, can you explain in greater detail? |
|
|
|
|
|
#8 |
|
May the Ubuntu Be With You!
![]() |
Re: Hypothetical virus for Ubuntu
Well, the virus can work in two ways once it's set up:
1. have its own version of, say, gnome-terminal which grabs the password when it is typed. 2. have its own versions of commands commonly run with sudo (things as simple as apt-get) and add to them viral code that will be executed as root as soon as the user tried to run these programs.
__________________
But I mean no harm nor put fault On anyone that lives in a vault But it's alright, Ma, if I can't please him. |
|
|
|
|
|
#9 |
|
Dark Roasted Ubuntu
![]() Join Date: Aug 2005
Location: Boston (British Expat)
Beans: 1,121
Ubuntu 8.04 Hardy Heron
|
Re: Hypothetical virus for Ubuntu
nah, I'd just alias sudo in .bashrc then you just capture the password from the command line.
but then thats going to be limited to advanced users anyway.
__________________
42 is not an anwser, it's an error code. the universe is saying 'Error 42: meaning to universe not found' Unemployed Programmer and Massachusetts LoCo Leader |
|
|
|
|
|
#10 | |
|
Dipped in Ubuntu
![]() Join Date: May 2006
Location: Madras, India.
Beans: 531
Ubuntu 8.04 Hardy Heron
|
Re: Hypothetical virus for Ubuntu
Quote:
1. When the user opens the terminal, he'll be running /usr/bin/gnome-terminal, and the virus won't have permissions to modify that until it has the sudo password. 2. As above. I can think of a third way though. It modifies the script that runs at startup (which is in the home directory?) to run another part of itself which logs all keys entered (a normal keylogger), then poof? Fortunately, the way package management is in ubuntu (and I guess other debian based OSes), you have trusted repositories. So you use the trusted repositories
__________________
May the FOSS be with you! |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|