- Kernel is a core for whole OS. So if I take control over kernel can I do everything in victim's computer?
Some things are hardware protected from even the kernel. For example, on most modern systems you won't be able to flash the
BIOS chip from the kernel.
- Can I write in for example C++ malicious kernel module that can open backdoors or force kernel to do malicious things? If yes, can I do it on all platforms (Windows, Linux, Mac OS, Android, iOS etc.)?
Well, you have to find a vulnerability in each platform that gets you into kernel mode. But yes, once you're in kernel mode, you can do all sorts of nasty to the system. Usually, kernel code is programmed in C rather than C++ but with some shimming you may be able to get C++ code to work.
- Is it possible to inject this malicious kernel module or malicious code to kernel (by forcing it to do that or whatever like that)?
Well, that's the hard part. If you are entering the system via, e.g., the browser, you have to find a browser exploit to get local user, find an exploit that gives local
root, and then find a way to get in the kernel. Sometimes
root to kernel is trivial, for example,
Linux with module loading enabled. But
Linux can also be configured without module support, so that requires really finding an exploit.
- And what is kernel patch attacks? I totally don't understand this term.
Never heard of this. It could be referring to
kpatch, a mechanism for patching the kernel at runtime. Obviously, if you can get an exploit into a
kpatchable update, that can be a way to get into a
Linux kernel (for example, one that has module loading disabled).