Follow up: How to write a Linux virus
Posted Feb 13, 2009 20:46 UTC (Fri) by
iabervon (subscriber, #722)
In reply to:
Follow up: How to write a Linux virus by tzafrir
Parent article:
Follow up: How to write a Linux virus
Add to the iceape binary these ELF sections:
.desktop.chatzilla:
options:
-chat\0\0
.desktop.iceape-addressbook:
options:
-addressbook\0\0
.desktop.iceape:
filearg:
.desktop.iceape-navigator:
filearg:
options:
-browser\0\0
symlink /usr/share/applications/{chatzilla,iceape,iceapi-navagator,etc} to the iceape binary.
In the dynamic linker, check for a .desktop.(basename of $0) section, and rewrite argv to have the given options, if any, between $0 and $1. In the launcher, offer a filename argument if the section has a "filearg" symbol. The launcher could also pull out other information, like icons, names, suitable MIME types, etc. And the launcher actually executes "/usr/share/applications/iceape foo", so if it's looking at isn't executable, it'll get an error.
As a bonus, you can actually execute these from the command line with the same effect that they have in the launcher.
(
Log in to post comments)