Jellyfish GPU Rootkit
github.com
github.com
And even if "hook logic" runs on the GPU, the actual function calls still have plenty of CPU parts. Check out rootkit/kit.c -- it is just plain old LD_PRELOAD rootkit, with a ton of calls running on CPU. Workingmem detector should have no problems matching this code.
But yes, It would have been a lot more interesting if there are cases where the executable is attacker controlled and the exploit would end up running code as the privileged parent process or some other user that has more rights.
That's why we have IOMMU
Hopefully this cannot jump MxGPU or GVTg or GRID barrier - GPU virtualization.
So if IOMMU is disabled you would still have to be able to find a way to re-program your process GPU page table which is not map in anyway to the process (ie only accessible by the kernel driver).
So i say good luck to you sir.
P.S. Perfect, now Google disabled the option to turn off webgl in Chrome
Up until very, very recently, driver coders had no idea at all that GPU instructions can be used offensively, and it is still common for buggy GPU code to crash your program/driver/os or the GPU itself.
Sandboxing is nearly useless when you let so much executable code through it.
GL does allow uploading some code to card sometimes, in form of shaders for example, but this is fairly constrained and limited language.
E.g. uploading a fake "already compiled" shader binary in OpenGL 4 via glProgramBinary. I'd be surprised if these are actually validated. (Well more than a CRC plus length. On GCN it is CRC32. On Intel's, some hacked SHA256-alike.)
SPIR-V probably is better checked, but I wouldn't trust it farther than I can throw it. There's too many vendor and architecture specific extensions.
You probably seen this, but in case you haven't: https://arstechnica.com/information-technology/2017/02/now-s...
Ideally, zero. Of course in real life this will be non-zero, but I like to believe that with the huge bounty Google offers on chrome vulns, those bugs will be fixed before they could exploit me.
(Note that the original page says "Can snoop on cpu host memory via DMA" -- this only works within the process boundary via approved APIs. So basically no extra security risks, this is exactly the same thing that CPU-based LD_PRELOAD files can do already)
Many of those CPUs were originally constrained to only run vendor-supplied routines in vendor-supplied ROM on the graphics card -- those cards (assuming we discount the potential of Nation-State tampering) would have been more-or-less secure, by virtue of the fact that a PC supplied program couldn't interact with the graphics card's CPU (GPU).
The most secure graphics card (aside from those early ones - Hercules MDA anyone?) might be NO graphics card -- that is, you have a computer on the one hand, and an RS-232 (or other) connection to a dumb terminal, on the other...
Benefit: Any data going to or from the dumb terminal, at least could be captured and audited... And if you really wanted good auditing, you'd stay away from cursor positioning routines, like ANSI/Curses/Termcap/etc, and use straight text... but then of course you wouldn't be able to run cool programs like text emacs...<g>
Anyway, this repository is more proof (Spectre, Meltdown, Foreshadow, etc.) that that which is claimed to be secure -- might not be all that secure... which is sad, but the state of our current reality...
They sometimes had ability to follow non turing complete command lists though (eg Amiga Copper programs)
Really, the only thing bad here is that some memory scan engines in antiviruses cannot monitor this. But how many memory scanning Linux antivirusesave you seen?