Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I don't know if such a question is allowed on this site, sorry if it's not

For educational purposes I am asked to write a small virus running on Linux, which should just be able to inject itself into other binaries (but not anything else). I thought of injecting its code with a technique described here: http://www.securelist.com/en/weblog?weblogid=183651915 and this one (playing with the ELF format) but I couldn't find the assembly source. Do you have any links showing how to do such things? Thanks!

share|improve this question

3 Answers 3

Here's sample code for run-time process injection on linux. This is how meterpreter does it.LibHiJack

share|improve this answer

You can probably write one using Alexander Bartolich's ELF Virus Writing How-To

A fellow by the name of Silvio Cesare had a Unix Virus mailing list in the mid-90s. Search for his name and "unix virus" and you'll find goodies like this.

You could also benefit from Tom Duff's Viral Attacks on Unix System Security . He gives an example sh-script virus, but I think you could transliterate that code to C and have a working virus.

share|improve this answer

In addition to @BruceEdiger's excellent answer, you might enjoy the following paper: Hunting for metamorphic.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.