Malware uses interesting techniques for hiding themselves from anti-malware software and more. They can polymorph themselves: practically change the code while it continuing to mean pretty much the same to the executing machine, making antivirus definitions invalid etc.I wonder if there is anything (non-malicious) developers could learn from studying the source of such, or reversing them and studying whatever you get from that process if the source isn't available, that could be useful outside this (dark?) realm.I am not interested in writing malware. (at least not for non-educational purposes) This question isn't meant to be a question about how to write malware or such, but what you could learn from already written malware.Also, maybe a bit unethical (I hope not), would there be any gains from writing your own piece of malware, just for better understanding of vulnerabilities/exploits/security, or the underlying operating system?
Could developers learn anything from studying malware?
learning;security
Absolutely.Of course, a stupid sife-effect of the DMCA is that because you'd have to reverse-engineer malware, you couldn't legally share what you learnt.The most significant things you'd learn are:What bugs malware exploits, so you'd know what you should protect against.How much trust you should really put in a given OS / application / APIUndocumented APIsAnd of course, it all depends what you know already. If you have never tinkered directly with the stack, then I'd expect this to come up