This reminds me of my first mention in a Linux kernel commit message:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....
It's the fix for a bug I found in the kernel. This sounds quite boring, but the fun part is the background story:
Antivirus vendor X (actually forgot which one) bragged about a new, dangerous virus that can spread on Windows as well as Linux platforms. Joe Barr reported on that for NewsForge, claiming that the Virus didn't work at all (on Linux). I jumped in and tested too, and found that it wouldn't work (meaning: infect other binaries) on newer kernels since there was an actual bug in the kernel preventing it from doing so.
Why I'm reciting that story is this: It is perfectly fine for a binary to write executable code to other files. Your typical compiler does. The kernel isn't there to prevent that. The kernel is supposed to prevent it if you configure a security policy that forbids it - starting with things as simple as file ownership and permissions. This is pretty much clear for anyone who knows some things about what the computer does. For people who only have some fuzzy ideas, fixing the Linux kernel to make (in this case) a virus work again sounded a bit weird.
Well, ransomware is in the news these days because of the raid in the Netherlands, and here there's another "security specialist" trying to use this for its PR. But again there is nothing that indicates that this is all about standard functionality. Yes, you can encrypt all your own files on a typical machine. Yes, a piece of software can do it for you. Yes, you can run such software. And if you're careless and follow orders easily, someone else might give you the software to do it.