The MiniPlasma exploit leverages a race condition in how the Windows kernel handles asynchronous I/O Request Packets (IRPs). By flooding a specific device driver with IOCTL requests from multiple threads, the attacker can force a condition where the kernel attempts to access an IRP object that has already been completed and freed by another thread. This 'use-after-free' (UAF) flaw allows the attacker to overwrite the freed memory with controlled data, eventually leading to the execution of arbitrary code with SYSTEM privileges.
void TriggerRace(HANDLE hDevice) {
  while(1) {
    IO_STATUS_BLOCK ioStatus;
    // Race between multiple threads calling DeviceIoControl
    // to trigger a use-after-free in the IRP handling logic
    NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &ioStatus, 
                          MINIPLASMA_IOCTL, buffer, size, NULL, 0);
  }
}
Standard patching is currently unavailable. Mitigation must focus on 'Kernel Mode Code Integrity' (KMCI) and 'Hypervisor-Protected Code Integrity' (HVCI). By enforcing strict driver signing and using virtualization-based security to protect kernel memory, organizations can prevent the execution of the shellcode even if the UAF condition is triggered.