Question: I'm working on malware analysis at my university and I'm trying to develop ransomware. I'm planning to publish the source code after it's finished. Is there any open source ransomware sample so I can take a look?

Answer: 
There is an open source ransomware called [Hidden Tear](https://github.com/utkusen/hidden-tear). The code encrypts files with the following extensions: ".txt", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".odt", ".jpg", ".png", ".csv", ".sql", ".mdb", ".sln", ".php", ".asp", ".aspx", ".html", ".xml", ".psd" by default with AES 256 bit encryption. 

It is open source so it could be easily customized to not only look for additional files but also the way encryption is done.
No. There is not and I am quite sure there will never be: imagine nuclear weapons are available to buy in the shop.

The spirit of the Open Source community is luckily investing positive efforts to develop tools that protect users ranging from anti viruses such as [ClamAV](http://www.clamav.net/index.html) to web vulnerability scanners such as [Grabber](http://rgaucher.info/beta/grabber/), passing by tools that are rather intended to assess users' systems such as [those](http://tools.kali.org/tools-listing) you can find in Kali Linux used for pentesting (of course, you can always use the knife to kill someone instead).

But it is true that there are some open source *nefarious* tools such as [ZombieBrowserPack](https://github.com/Z6543/ZombieBrowserPack) which is a plugin can be manipulated remotely to steal authentication credentials and even bypass two-factor authentication mechanisms such as the ones implemented by Yahoo and Google, or simply hijack your Facebook account and much more. However, this must not lead to misunderstanding: this plugin is developed by [Zoltan Balazs](https://nl.linkedin.com/in/zbalazs) as a POC for academic purposes as similar other tools in the same context: virus code is present freely on Internet but it is intended for academic purposes and it can not harm because any malware which code is released its life is ended as anti-virus companies conceive a protection against it.