LWN.net Logo

Follow up: How to write a Linux virus

Follow up: How to write a Linux virus

Posted Feb 13, 2009 12:33 UTC (Fri) by tzafrir (subscriber, #11501)
In reply to: Follow up: How to write a Linux virus by foo-bar
Parent article: Follow up: How to write a Linux virus

This would then be enforced by the application and not the OS.

E.g.: what should happen if you mount /home noexec ?


(Log in to post comments)

Follow up: How to write a Linux virus

Posted Feb 13, 2009 13:10 UTC (Fri) by roblucid (subscriber, #48964) [Link]

Won't it succeed if the interpreter is in /usr/bin like perl for example?

Do not allow direct execution of any binaries on the mounted file system. (Until recently it was possible to run binaries anyway using a command like /lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.)

For ~/bin to work for trad shell scripts and such, you need the file to be opened for processing by the exec-ed interpreter, in another filesystem.

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