Slashdot Mirror


Proof-of-Concept Linux Rootkit Leverages GPUs For Stealth

itwbennett writes: A team of developers has created a rootkit for Linux systems that uses the processing power and memory of graphics cards instead of CPUs in order to remain hidden. The rootkit, called Jellyfish, is a proof of concept designed to demonstrate that completely running malware on GPUs is a viable option. Such threats could be more sinister than traditional malware programs, according to the Jellyfish developers, in part because there are no tools to analyze GPU malware, they said.

67 comments

  1. Won't affect... by TWX · · Score: 2

    ...my Rage XL in my otherwise-headless server, will it?

    --
    Do not look into laser with remaining eye.
    1. Re:Won't affect... by khellendros1984 · · Score: 1

      The malware uses OpenCL. Nothing using a fixed graphics pipeline should be able to be infected, since they aren't capable of general purpose computation.

      --
      It is pitch black. You are likely to be eaten by a grue.
  2. Oh no! by Anonymous Coward · · Score: 0

    It's the end of the world!

    1. Re:Oh no! by gmhowell · · Score: 2

      It's the end of the world!

      I feel fine.

      --
      Jesus was all right but his disciples were thick and ordinary. -John Lennon
    2. Re:Oh no! by Anonymous Coward · · Score: 0

      It's the end of the world!

      I feel fine.

      For those who don't get the references...https://www.youtube.com/watch?v=Z0GFRcFm-aY

  3. Combined with homebrew radios by __aabppq7737 · · Score: 5, Interesting

    Recently it was discovered that certain GPUs can be manipulated to create a radio antennae via internal circuitry. Combine this with a relatively unmanaged kernel on the GPU to create silent malware and a peer-to-peer radio-communicating botnet

    1. Re:Combined with homebrew radios by Anonymous Coward · · Score: 0

      The article you linked used a monitor cable to act as the antenna. It would be much scarier if the antenna was actually made from circuits from GPU card/die. The article also does not mention if they are using a VGA (analog) or digital (HDMI/Display port) connection, since VGA is being phased out.

    2. Re:Combined with homebrew radios by Anonymous Coward · · Score: 0

      It can't be used for peer-to-peer since the antenna can only be used to transmit, not receive.

    3. Re:Combined with homebrew radios by citizenr · · Score: 1
      --
      Who logs in to gdm? Not I, said the duck.
    4. Re:Combined with homebrew radios by Anonymous Coward · · Score: 0

      Yeah, I was going to mention the same page. Unfortunately...

      I am sorry to announce that the source code won't be available any time soon.

      It's been ten years, you monster!!!

  4. More implications by halivar · · Score: 3, Interesting

    If Malware can do it, so can legitimate-ware, perhaps? Emergency tasks can run on cpu-pegged systems, like maybe Windows Task Manager, if they were designed to run on the GPU instead of the CPU?

    1. Re:More implications by jones_supa · · Score: 3, Insightful

      Remember still that GPU shines at mathematics stuff. You feed it some matrices and tell to do some transformation on them, and it's extremely fast. But any kind of branching, while possible, is very slow. It's hard to make Windows Task Manager a program that runs well on a GPU.

    2. Re:More implications by disposable60 · · Score: 2

      That must be true. It seems difficult to make it run well under Windows.

      --
      You're looking for quotes? See my journal.
    3. Re:More implications by Anonymous Coward · · Score: 0

      Only if you are a complete ludite that installs 13 tool bars and accepts video codecs because Random Porn Website requires them...

    4. Re:More implications by fisted · · Score: 1

      What is this legitimate-ware you're speaking of and where do I get some?

    5. Re:More implications by Anonymous Coward · · Score: 0

      If Malware can do it, so can legitimate-ware, perhaps? Emergency tasks can run on cpu-pegged systems, like maybe Windows Task Manager, if they were designed to run on the GPU instead of the CPU? /sprays drink all over monitor

      Windows Task Manager. Oh boy, that's rich...

    6. Re: More implications by Anonymous Coward · · Score: 0

      Go back to mom's basement with your hot pocket, it's ready now.

    7. Re: More implications by Anonymous Coward · · Score: 0

      I love your mum's hot pocket!

  5. Late to the party by Anonymous Coward · · Score: 0, Troll

    Don't worry Microsoft already has this feature built-in for any system running more than 8GB of RAM. It's called Windows.

  6. Linux rootkit by Anonymous Coward · · Score: 3, Insightful

    Really, there's no reason to single this out as Linux. It could be done to any OS. I would imagine the first ones we see in the wild will target Windows.

    1. Re:Linux rootkit by ArchieBunker · · Score: 0

      Probably because the lack of Linux GPU drivers. Might as well use it for something.

      --
      Only the State obtains its revenue by coercion. - Murray Rothbard
    2. Re:Linux rootkit by jones_supa · · Score: 0

      Really, there's no reason to single this out as Linux. It could be done to any OS. I would imagine the first ones we see in the wild will target Windows.

      Are you sure? Maybe it's easier to make rootkits for Linux.

    3. Re:Linux rootkit by Dutch+Gun · · Score: 1

      Maybe because it's a yawner of a story if Windows gets infected? Everyone sort of expects Windows to be infected with whatever new malware comes along first. Or maybe it's just that the researchers use Linux, so it's more of a "what you know" thing.

      You're right though... No criminal would be stupid enough to release malware for an OS that commands 1.5% of the desktop market share. Real attacks against Linux would much more likely be against the LAMP stack or other server-related services.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    4. Re:Linux rootkit by Delwin · · Score: 1

      Except for Android...

    5. Re:Linux rootkit by Anonymous Coward · · Score: 0

      It is easier to do just about anything in Linux (especially new stuff or POCs) because you are better able to control what goes on. However, it is also easier to detect and prevent anomalous behavior because you are better able to control what goes on. Once the bad guys start pushing in this direction, Windows will quickly become the target of choice.

    6. Re:Linux rootkit by Dutch+Gun · · Score: 1

      Well, when people talk about "Android" they tend to call it "Android", not "Linux". I'm pretty sure we're talking about PCs in this context, and since we need GPUs, that typically means desktop systems, not headless servers.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    7. Re:Linux rootkit by jellomizer · · Score: 1

      Unfortunately due to the confusion about this I have to call Linux GNU/Linux It really sucks, because I hate to RMS any credit.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    8. Re:Linux rootkit by MobileTatsu-NJG · · Score: 1

      . No criminal would be stupid enough to release malware for an OS that commands 1.5% of the desktop market share.

      Except for Android...

      Heh. Ever notice that Linux and Android are two distinct entities until somebody mentions marketshare?

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    9. Re:Linux rootkit by Penguinisto · · Score: 1

      Are you sure? Maybe it's easier to make rootkits for Linux.

      ...wouldn't you need a GPU driver that's worth a damn first?

      --
      Quo usque tandem abutere, Nimbus, patientia nostra?
    10. Re:Linux rootkit by Penguinisto · · Score: 1

      They may as well be in this case. Unless it's a phablet, tablet, a few high-end phone models, or suchlike? The percentage of Android phones in use that have a GPU on it are going to be fairly slim pickings (at least for now), and the GPUs that are out there aren't exactly powerhouses of computing.

      On the latter I mean this: I could theoretically haul a full-sized sectional couch from point A to point B by strapping it atop someone's Mini Cooper, but I think they're gonna notice once they get on the freeway...

      --
      Quo usque tandem abutere, Nimbus, patientia nostra?
    11. Re:Linux rootkit by Dutch+Gun · · Score: 1

      Is anyone actually confused that you might be talking about Android when you say "Linux"? I really doubt it. I'm not going to call Linux "GNU/Linux", and neither are most people, because it's just too damned awkward. There's already enough confusion among many non-tech people about the distinction between Linux the kernel and the myriad Linux-based distributions.

      Anyhow, I tend to disagree with Stallman 9 times out of 10, but I don't have any problems giving him props for what he's done and what he believes in. He's certainly been consistent in his message at least.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    12. Re: Linux rootkit by Anonymous Coward · · Score: 0

      It should be lennix linux. Not gnu linux

    13. Re:Linux rootkit by Plumpaquatsch · · Score: 1

      Really, there's no reason to single this out as Linux. It could be done to any OS. I would imagine the first ones we see in the wild will target Windows.

      Exactly - any Linux rootkit could easily be done on any OS, while rootkits for other OSs can't be done for Linux.

      --
      Of course news about a fake are Fake News.
  7. This is a scam! by Anonymous Coward · · Score: 5, Funny

    Everyone knows there are no working video drivers on Linux!

  8. it's broken by Anonymous Coward · · Score: 0, Interesting

    I've looked at the code, and all what it does, is storing buffer inside GPU. And when asked, it pickups the buffer and tries to run it...

    From my perspective, it's as usefull as storing instructions in some file in the filesystem - presumably the executable itself, and then running it...

    I don't see point. It still needs application to run, it cannot just run on the GPU itself.

    1. Re:it's broken by BarbaraHudson · · Score: 1

      Ever notice that when you do a soft reboot, the previous screen persists in ram for a fraction of a second when it switches to graphics mode? It's been possible for decades to have a small program copy the necessary bytes to system ram and execute them on reboot.

      --
      "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
  9. IOMMU by Anonymous Coward · · Score: 5, Interesting

    There's no mention of IOMMU devices in the article. An IOMMU is like an MMU for the I/O; it remaps the memory access of any DMA device to a different area of physical memory, so that:
    *The DMA device can't misbehave, as in the article
    *A virtual machine can work directly with that DMA hardware device
    *The I/O device can be remapped to a memory region it might not otherwise support (e.g. a 6GB offset, from a 32-bit PCI card)

    But, the article doesn't say anything about IOMMUs. Does an IOMMU help at all against this vector? Does it completely block it, or only make the attacks slightly harder? Do modern computers, which mostly have IOMMUs available, make use of their IOMMUs to mitigate this at all?

    I'd be grateful if anyone knew more about this.

    1. Re:IOMMU by MoonlessNights · · Score: 1

      I wish I had the points to mod this up since I am also very interested in this question.

      Exploits through hardware with too much access are discussed, from time to time, but I never hear what realistic impact they can have relative to whatever the current state of IOMMU is. I remember this same discussion, with the same missing data, regarding at least FireWire and Thunderbolt, over the past several years, and those don't even require physical access to the machine internals.

    2. Re:IOMMU by Anonymous Coward · · Score: 0

      In an IOMMU based system code running on the host CPU has to explicitly share address ranges with a given GPU. If you take over a node running in virtual addressing mode in such a system you only have access to a virtual address range backed by physical memory that has been explicitly shared by the operating system. The age of safely sharing a GPU between guest operating system instances on a single server is upon us :-)

    3. Re:IOMMU by Anonymous Coward · · Score: 1

      This so call exploit is a vaporware. It require a special kernel module to be loaded ie you need root privilege in the first place to be able to map the kernel memory to the GPU. In all modern GPU it is impossible for a GPU program to alter the GPU page table and thus impossible to map random memory from GPU program. Assuming proper video driver.

      Now you add on top of that the IOMMU and it becomes impossible for the device to access something that have not been mapped inside the IOMMU for the GPU and only the kernel driver can do that. So unless the kernel driver expose some broken API to do that from unprivilege userspace process then you are in the clear.

      People who wrote the article just did not read the researcher paper, although the researcher mislead people in his abstract not stressing the need for a specially crafted kernel module for his GPU to be able to work.

      Real threat on the GPU is one program using the GPU to access GPU memory of another program and even that is not doable on newer GPU where you have context isolation.

    4. Re:IOMMU by LoRdTAW · · Score: 1

      The IOMMU does take care of the DMA problem but I am betting this has something to do with how the GPU kernel talks to the OS kernel. The OS controls memory so perhaps some driver exploit fools the kernel into reading the wrong memory. The GPU says hey I need this memory and since the GPU driver lives in kernel space, it's possible it could randomly read protected memory.

  10. Difficult to hide GPU code by 140Mandak262Jamuna · · Score: 1

    My understanding of GPU coding environment (not as a programmer, thank God, I just listened to job applicants and their presentations) is that, it is quite limited, almost all interpreted code. Some strange combination of C like code being written and then passed to renderers and shaders. It gets kind of "compiled" in place and gets executed. The binary code obfuscation that could be done in a plain regular chipset is generally not possible for GPU. So the source code of the malware itself might be visible to the analysts if they are looking for it. On the other hand, these GPU computing codes are so damned complex they might not need additional obfuscation.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    1. Re:Difficult to hide GPU code by Anonymous Coward · · Score: 0, Informative

      My understanding of GPU coding environment

      Well, let me be the first to tell you that you have none.

    2. Re:Difficult to hide GPU code by jones_supa · · Score: 2

      My understanding of GPU coding environment (not as a programmer, thank God, I just listened to job applicants and their presentations) is that, it is quite limited, almost all interpreted code. Some strange combination of C like code being written and then passed to renderers and shaders. It gets kind of "compiled" in place and gets executed.

      Yep. Usually at application startup, shaders are compiled. Later in your renderer code you bind that shader just before you want to draw something using it.

      On the other hand, these GPU computing codes are so damned complex they might not need additional obfuscation.

      Not necessarily. Shaders can be very simple as well. They usually range from some tens to some hundreds of lines. Check out Shadertoy to see some.

    3. Re:Difficult to hide GPU code by MoonlessNights · · Score: 1

      As I understand it (which is also rather little), the "interpretation" you are talking about is just for portability. When the application starts up, it asks the driver to compile it for whatever the hardware is and then the application copies that to the video memory for execution. There are limitations around what that can do, but only because of limitations of the GPU instruction set (not sure of the current state but they historically avoided things like loops, etc, since they never wanted it to be possible to execute more than a statically-determined number of instructions for element).

      If you are allowed to copy data to the card (as most software is), then you could either use the driver's compiler or just copy a pre-built binary and try running that.

      There is little in terms of actual security once you are on the card. This is part of why one application can often read another's framebuffer or why an illegal instruction requires restarting the entire card (typically).

    4. Re:Difficult to hide GPU code by DrYak · · Score: 1

      Some strange combination of C like code being written and then passed to renderers and shaders. It gets kind of "compiled" in place and gets executed.

      The thing is OpenCL also uses a subset of C.
      That subset does include pointers (just like CUDA, btw).
      Which means that a piece of code can read any random memory location. (And the hardware works so under the hood).
      You need to do extensive code analysis and tracking to check wheter the memory location being read should legitimately be so.
      (Valgrind, address sanitizer, etc.)

      So without proper memory protection management (the IOMMU other are discussion about), even in the simple C-like language accessible to OpenCL, you can quite mess up the computer.

      As pointed by others, shader can be simple and short, and it's quite often the case that the pointer-math inside will be correct and they will work as intended. But it's still possible to make mistakes, and once you start mishandling pointers on purpose...

      --
      "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  11. Wait, no tools? by Anonymous Coward · · Score: 0

    there are no tools to analyze GPU malware

    Does that explain the Radeon drivers then?

  12. Pointless by Anonymous Coward · · Score: 2, Informative

    This is newsworthy? All it does is hide the original syscall pointers in the GPU. The hook code still needs to be visible to the CPU. pointless/10. 1995 called and their rootkits back.

    1. Re:Pointless by Anonymous Coward · · Score: 0

      1995 called and their rootkits back.

      Did you warn them?

  13. Even more viable now by Anonymous Coward · · Score: 0

    The rootkit, called Jellyfish, is a proof of concept designed to demonstrate that completely running malware on GPUs is a viable option.

    Umm...especially now when you released a base for blackhats to build upon.

  14. This could never work on Windows... by Anonymous Coward · · Score: 0

    ...because on Windows, you can't run rootkits; you'd have to run Appkits!

    Apps!

  15. OpenCL drivers have to be installed. by andydread · · Score: 1

    You have to have OpenCL drivers installed and up and running for this to affect you. So this will only affect a fraction of linux installations.

  16. Recently? Tempest ? by Anonymous Coward · · Score: 4, Interesting

    Here's a post from 10 years ago about a program that can turn your display into a radio transmitter. I think that the provided code plays a midi version of Beethoven's Fur Elise, but there are variations that play any mp3.

    Just to be clear: this works by calculating the pixelclock then using high/low (white/black) swings to generate Electro-Magnetic signals at the corresponding frequencies. I remember running this on an old 300MHz PII Thinkpad. It transmitted through the VGA port and could easily be picked up on portable radio 5 feet away without any antenna

    This was a bit of a reverse proof of concept for the NSA's Tempest project. Tempest listened to EM noise and tried to reconstruct what was on the screen (or in the chip / whatever). This demo crafted a display resolution/image such that tones were the EM byproduct

  17. not a serious security issue by a long shot by Anonymous Coward · · Score: 0

    This isn't really that scary as it won't survive a cold re-boot:

    "Malicious memory may be retained across warm reboots. (Did more conductive research on the theory of malicious memory still being in gpu after shutdown)"

    If you've properly secured your system this shouldn't be an issue. There are more serious threats than this. To get rid of the malware a simple cold boot plus OS reload should fix it. Most of the time people only even know they are infected because the malicious party has done a sloppy job coding the malware or it is otherwise interfering with the operation of the system.

  18. NOT NEW by Anonymous Coward · · Score: 0

    This has been around for a long time. It's a great attack vector against VMware.

  19. I'll download it by Anonymous Coward · · Score: 0

    ... if it can install drivers for this bloody gpu.

  20. free phone calls by Anonymous Coward · · Score: 0

    my android mobile phone has a GPU. i wonder if it could be made to make free phone calls or unlimited data?

  21. Just make sure you don't disable NSA mods by WillAffleckUW · · Score: 1

    They get really pissy when you mess with their GPU backdoors

    --
    -- Tigger warning: This post may contain tiggers! --
  22. Please, make sure you have all the drivers install by Anonymous Coward · · Score: 0

    Please, make sure you have all the drivers installed to be able to be vulnerable to this rootkit LOL

  23. It is only using the GPU for xor'ing strings by LightningTH · · Score: 2

    Please correct me if I am wrong.

    I looked through the code, it is not doing any form of hooking of system calls into the GPU to be directly called without it being known. What it does do is call out to the GPU to xor specific strings into a buffer stores on the GPU to hide it's log file. As far as I can tell, the syscall[x].syscall_func is simply a pointer to a GPU function to call which only has access to GPU memory. this is why in each of the "hooked" functions it has to transfer the data to be handled into the GPU. I don't see anything where direct memory access of the CPU is occurring by the GPU without there being a transfer from CPU to GPU.

  24. Research platform versus not by dbIII · · Score: 1

    Maybe because it's a yawner of a story if Windows gets infected?

    More like it being easier to quantify everything on an open system than one with obfiscated black boxes, a need for researchers to sign NDAs, or a worry that any criticism of security of a closed platform is going to put you into deep shit via the DMCA (eg. Adobe VS Dmitry S. - no bail!).
    They can follow the thread in linux and know what is going on at every step and tell everyone what is going on at each step. With MS there's at least going to be red tape in the way if not a lot of other things.

  25. Keywords... by DrYak · · Score: 1

    Assuming proper video driver.

    I think "assuming" is the keyword here.

    Now you add on top of that the IOMMU and it becomes impossible for the device to access something that have not been mapped

    IOMMU ? You mean that thing that Nvidia's engineer don't give a damn about because it won't bring them extra 2fps in benchmarks of Crysis 4 ?

    Yup in a theoretical beautiful world, such exploit shouldn't be doable.
    (And indeed, such protection has been added against other similar attacks: DMA attacks aren't possible anymore over Firewire, for example).

    But, in practice:
    - Currently, Nvidia produces closed source drivers only for Linux (except helping a bit Nouveau for Tegra...) They do this by more or less recompiling the Windows drivers which are more or less exclusively performance oriented.

    They aren't even able to properly use features that Linux offers differently than Windows (no KMS, no DMA-BUF - though that one is finally moving), they don't support Optimus (it required Linus publicly throwing a FU to get them moving a bit in that direction), texture corruption that happen randomly on laptops (sorry guys, Nvidia mostly test their driver for *Workstations* under linux), and according to industry insiders they don't even properly follow standards such as OpenGL (and thus code heavily optimized for Nvidia - with the help of their embed engineers - tends to barf on anything following OpenGL ?)
    And you hope that they'll implement proper security memory protection ?
    You can keep dreaming.

    - AMD are completely under staffed, and can barely pull a good Linux driver together. Yup in the long term, as they are moving more and more functionnality out of their closed source catalyst, and share more and more with the opensource dirvers, such kind of protection could be doable.
    (The long term plan for AMD, is that "Catalyst" will be just an alternative closed source OpenGL implementation that runs over the same stock open-source kernel driver as the free Mesa/Gallium. Thus any memory management and protection handled by the kernel will automatically benefit them).
    But that's not the case - yet.
    Until AMDGPU kernel derivers matures enough and gets proper IOMMU support, you're still stuck with the exploitable bugs.
    (But at least: thank you AMD for working in the correct direction, thank you for having opensource devs on your payroll).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  26. Theory vs. practice by DrYak · · Score: 1

    Saddly, the reality is that unlike other similar situation (it's not possible to do DMA attack on firewire anymore), IOMMU aren't yet much used by the binary proprietary drivers.
    Nvidia is mostly interested in having good performance. They won't lose resources with things that won't directly influence benchmark results.
    AMD is completely understaffed, so don't count on them neither (at least not before they finish the transition to AMDGPU kernel drivers, and until the opensource community add proper IOMMU support in them).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]