The Linux Virus Writing HOWTO describes how to write parasitic file viruses which infect ELF executables on Linux/i386. Contains a lot of source code. Every mentioned infection method is accompanied with a practical guide to detection.
c3eab65349d14045e1c71e01c0eee10c930954db406d18e2ef4fb2c4edc148d3