A big collection of source code of various malware for Windows, Linux and Android
“If you know your enemies and know yourself, you will not be imperiled in a hundred battles”
(Yes, it’s a quote by Sun Tzu)
The GitHub account of infosecguerrilla is a precious source of information about malware.
Obviously this is very varied code, sometimes well-written, sometimes spaghetti-code.