LWN.net Logo

Advertisement

Interested in hardware, diags, validation, Linux, C, ARM, Microcode and low level programming and blazing networks?

Advertise here

How to write a Linux virus in 5 easy steps

How to write a Linux virus in 5 easy steps

Posted Feb 13, 2009 16:29 UTC (Fri) by flewellyn (subscriber, #5047)
In reply to: How to write a Linux virus in 5 easy steps by nix
Parent article: How to write a Linux virus in 5 easy steps

Well, all it really has to do is examine a .desktop file's permissions and ownership, and return success if they're good, or failure if they're bad. That could be used from any environment.


(Log in to post comments)

How to write a Linux virus in 5 easy steps

Posted Feb 13, 2009 17:03 UTC (Fri) by nix (subscriber, #2304) [Link]

I was expecting it to handle the Exec line itself: i.e., with this in place, running an executable-marked .desktop file from bash would exec() the command stated in its Exec line, by way of the interpreter.

Just having the interpreter return a return code without actually running anything seems profoundly counterintuitive. (Imagine if Perl scripts just returned 1 or 0 when you ran them, indicating whether 'perl $SCRIPTNAME' should be allowed to work!)

How to write a Linux virus in 5 easy steps

Posted Feb 13, 2009 17:06 UTC (Fri) by flewellyn (subscriber, #5047) [Link]

Oh, right, I knew that. Just forgot.

Either way, though, I can see something like that being useful in any number of contexts. I can't help but think "If you write it, they will come."

Write the program, audit it carefully, release it under a permissive license, and push for the major desktop environments to start using it. I think they have an interest in better security.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds