[Writeup] Suicide ================= Section: Malware & Analysis Started: 2026-12-03 07:47 UTC by noqs Replies: 2, last post 2026-12-03 08:11 UTC Page: 1 of 1 Web: https://romdump.net/t/143 ------------------------------------------------------------------------------ #199 noqs, 2026-12-03 07:47 UTC [OP] (edited) Source: https://romdump.net/raw/199 legal disclaimer: this shit is only for educational purposes i am not held responsible for any misuse god forbid Hello romdump community and malware lovers INTRO: You are ofcourse familiar with BYOVD (bring your own vulnerable driver) well 99% of the time this driver we are talking about is a driver which is a part of a microsoft signed third party software. So it makes sense to say bring right? because we cannot gurantee that the target windows machine is having that third party software along with the drivers installed. BUT... what happens when the software is Microsoft's own? 1. The bring part is no longer necessary the binary IS already on disk, and loaded (or one sc start away) 2. The driver is still there on disk even in secure boot mode so the attack vector is still viable 3. This creates a golden opportunity, we expect that adding this specific driver to the blocklist will break this software and that is what happened and funny enough there is no CVE assigned to the vulnerability in this driver but the miscrosoft villians silently patched it without rewarding the "researcher/s"? yes when i was preparing this article i found 4 or 5 researchers saying they independently came up with this My dear reader this is KslD.sys, KslD.sys this is my dear reader KslD.sys provides kernel level support for microsoft defender components across windows and defender updates hope you both get well along this article. so in this article i will take your hand and we will identify the exact vulnerablility in this driver and we will detail the exact exploit chain to make use of this vulnerability. i will also show you how the patch was "done" later in the article Finding clues: This klsD.sys is a KMDF driver, kmdf is a microsoft framework built in C/C++ to help the devs build and maintain windows kernel-mode device drivers this is critical for our reverse engineering journey because it will require us to do the following: 1. Summon satan himself 2. break 3 or 4 ribs for the love of the game 3. align all the galaxies in the observable universe [image: https://romdump.net/img/801f028a5c7c86c9b4110cbb386f6bd6fe7c04b86a139f7320a5bbac6fb44b60] so with that in mind let us start to understand what is the difference between a normal WDM driver and KMDF, Kmdf drivers are object-oriented abstraction layer on top of wdm Every Driver has a DriverEntry function which recieves two things 1. DriverObject 2. RegistryPath [image: https://romdump.net/img/3778def8545ac22fd0f0ef8527285f8cd3a3c46417be561511f9cd05e4482c03] as you can see in the image above FxDriverEntry clearly takes in the two args mentioned above it then calls sub_1c004faec() which is basically _security_init_cookie after that it calls its helper FxDriverEntryWorker passing down the two args to it now we notice that the worker calling a function with the two args this function is likely the developer driver entry now in the case of Wdm inside the DriverObject there is MajorFunction[] which is simply an array of function pointers indexed by the operation type for example IRP_MJ_CREATE = open handle IRP_MJ_DEVICE_CONTROL = DeviceIoControl so when you open \\.\KslD and call the DeviceIoControl api the io manager packages your request into an irp and calls the driver's registered routine however in case of a Kmdf or Umdf (the one for usermode) driver , those drivers dont fill MajorFunction[] manually they register event callbacks into the framework when creating an io queue so the real ioctl handler will be found via WdfIoQueueCreate xrefs not by DriverObject ->MajorFunction[0x0E] so you can already see that this task won't be easy add to that, that this driver is written in cpp and the symbols are heavily stripped looking for wdfioqueuecreate or similar is impossible in all this mess [image: https://romdump.net/img/2e2cf250388bc0dfa013dbc793e883c15732b34d1ed3dae04c9f17cbae933d8d] searching for the ioctl 0x222044 is cheap work and there is no fun in this so i needed to find a way to reach to the vulnerable subcommand handler in case you are not familiar on how the command routing arch is on linux or windows drivers it is typically like the following: Caller --(passes the ioctl code + buffer with subcommand id)---> ioctl dispatcher (validates the buffer and routes by major ioctl code) ---> ioctl handler ---> subcommand dispatcher (extracts the subcommand id and matches against it and calls the function we are interested in) ---> subcommand handler (the core logic is here this is where the vulnerability resides) ofcourse tracing all this chain is very hard so i noticed a pattern that is commonly used in the code of the driver the dev/s typically uses MmGetSystemRoutineAddress frequently to resolve kernel routines at runtime [image: https://romdump.net/img/4be059db1923a81fd90c2d45d7637b17bbb352f10739513587a4707acac47df3] and since MmGetSystemRoutineAddress takes a pointer to a unicode string that lead me immediately to inspect rdata when i stumbled across [image: https://romdump.net/img/d2437f5c358bb8f8db010412ac12c12d2fc3f28d9ba3cb9d30104912c34f2d4a] and since i know that the vulnerability is about arbitary read behaviour so i felt that this will lead us to some function which is somehow related to our subcommand handler! i cross referenced MmCopyMemory to find this specific function sub_1c0006a74() [image: https://romdump.net/img/ca5be5abe2f2fa9f6d5fa59b1abcc4a003969078ce376b68a72515c303ea6723] let us see what it does: looking at the HLIL code above the function intializes a variable var_18 then it calls sub_1c000b954() which just returns the os major version the function checks if the version is above 6 (windows vista and above) we can see then a call to MmGetSystemRoutineAddress with a pointer to the unicode string MmCopyMemory and the NTSTATUS in rax_1 gets checked if != 0 which indicates a failure and then eventually the function returns 0xc00000bb which means STATUS_NOT_SUPPORTED all that is good but the most interesting line is what happens on success the function stores rax_1 which now holds the memory address of the function MmCopyMemory inside which looks like an object or a vtable at offset of 0x18 memorize this offset we will come to it later now judging from this move it means this function must have been called from another function which might give us more definitive clue so i xreffed it again that is when we land on this big ass important function (forget about the xref for now) this function does something pretty interesting look:[image: https://romdump.net/img/f18dbfd7587dddd74b59db786f89da58b31dcd903f74111b2d8749ade7ef2b40] This function reads couple of registry keys associated with the driver that based upon it the function will construct plugins and objects to be used the function fills these objects with vtables which contains pointers to specific interesting functions and couple of args now congrats here is our first chain in the vulnerability Chain(1) Poor caller verification: if we look at the reg keys in regedit [image: https://romdump.net/img/63b8a0c9443063a29d258ae564b3a9e9cb0ef22a5c257044280f69b7aa014cb8] we can conclude that the so called AllowedProcessName contains the path to the PE of the process that is only allowed to open a handle to the device \.\KslD which is supposed to be the microsoft chud defender in that case but that also means that any process with admin privs can edit on this regkey value and point to its PE path instead granted it is not protected by Defender tamper protection and compared as a string - no signature check, no integrity-level check, no DACL on the device which IS literally the case The driver only does a full-NT-path string comparison. When a process opens \\.\KslD, the driver calls ZwQueryInformationProcess with ProcessImageFileName (class 0x1B) and compares the returned path against the registry value now scrolling through these objects being structured and prepared we find this snippet of code [image: https://romdump.net/img/82b8b148c0ef299ae302933d02a472321a492fd4cab9c4bd481aeefa7230a474] we intialize a pointer to the object rax_30 then we call a function that will assign a tag named K400 (0x3030344b in little endian) thx to the api call to ExAllocatePool2 inside this function now the main function checks if the tagging suceeded or no by checking if rax_30 is zero if yes it handles that error in label_1c0005353 but if not zero the main function places the arg1 passed to it into rax_30[2], then most importantly we see a vtable data_1c00458e0 stored in rdata being placed inside rax_30 this will hold the clue for the next step, then inside the if statement we call the SAME FUNCTION we just xreffed earlier !! that is where it was cross referenced we pass rax_30 to it as an arg aha now it explain why this function was treating the arg1 earlier in *(arg1 + 0x18) = rax_1 as an object because it was really an object we check if the function returned a value above zero because remember we saw the function returning status not supported if the MmCopyMemory function address was not resolved and then we do something important that will indicate that data_1c00458e0 is indeed a vtable structure we double dereference rax_30 once to access the vtable then again to call the first function in the vtable slots with an args of rax_30, 1 ahha we know have our second clue this vtable must hold a very promising clue when we double click on data_1c00458e0 we are presented with this [image: https://romdump.net/img/235027a2e4e6cc5d9940b56d30e6dd714d7fb3c994e0579e6009071fb2f12ea9] i manually navigated to the function at offset 0x0 and beforehand deduced that it will be some kind of destructor for the object because remember we called it on failure of the function that resolves MmCopyMemory and i was indeed correct now if we move to the next offset which should be at 8 bytes away from this one (because we are on a 64 bit system) we land on a function not relevant here now we find something interesting at the next 8 bytes offset 0x10 [image: https://romdump.net/img/aacdd8d4ef68460149e8587d591130762f506c557c2ee83024e3e515be148d33] [image: https://romdump.net/img/d293ddc4b2591cca98b2716b247e37c924012595c363f149eef0156c7e18bfd3] YES look at the hex values being compared against in multiple if else statments and more interestingly we clearly see the value 0XC which is the subcommand id for the vulnerable function we want !! yay congrats cannot tell you how satisfied i was when i saw it after all the black magic i was doing on the pc [image: https://romdump.net/img/a581272ecbcf601fdf57357e3d96eaf511592715859e43f11d9e68a1d593ae84] now we have the keys to the kingdom and the keys are this specific highlighted else if statement let us see what it does we compare rax which holds our subcommand id passed to the subcommand dispatcher sub_1c0006b60() in arg2 the screenshot just did not get it trust me boss we check if the 4th arg is more than or equal to 0x20 which is 32 bytes why? because the args passed to our subcommand dispatcher is as follows arg1 pointer to the k400 object we were talking about arg2 subcommand id as i told you arg3 pointer to the caller input buffer arg4 input buffer byte length arg5 pointer to the output buffer arg6 pointer to the output length now you can see that this all is passed down as args to our vulnerable function sub_1c00075e0() now let us inspect this function to see what does it offer to us: ``` int64_t sub_1c00075e0(void* arg1, void* arg2, int32_t arg3, int64_t arg4, int32_t arg5, uint64_t* arg6) int64_t var_18 = 0 if (arg3 != 0) int64_t r8 = *(arg2 + 0x10) if (r8 u<= zx.q(arg5)) int64_t r10_1 = *(arg1 + 0x18) if (r10_1 == 0) if (data_1c00490c8 != &data_1c00490c8) void* rcx = data_1c00490c0 int64_t rsi int64_t rdi if (*(rcx + 0x48) != 0) sub_1c00010ac(rdi, rsi, arg2, *(rcx + 0x40), (r10_1 + 1).d, (r10_1 + 0x14).w, &data_1c0045e48) return 0xc00000bb char rcx_2 = (*(arg2 + 0x18)).b int32_t rax_2 = 1 if ((1 & rcx_2) == 0) rax_2 = 2 if ((1 & rcx_2) != 0 || (2 & rcx_2) != 0) r10_1(arg4, *(arg2 + 8), r8, zx.q(rax_2), &var_18) *arg6 = zx.q(var_18.d) return 0 return 0xc000000d ``` we start by intializing var_18 to zero which will later hold our numberofbytes transferred then we check if arg3 != 0 if yes then we assign to r8 the requested byte size residing at offset 0x10 in arg2 now we check if the requested byte size is less than or equal to the output buffer length just to make sure no bufferoverflow happen god forbid, this is only check the function makes now enter r10_1 if the previous (if) arm evaluated to true (the no bufferoverflow check) we populate the r10 register with something at the offset 0x18 of the k400 object remember? when i told you to be a good boy and memorize this offset it was the pointer to the memory address of the function MmCopyMemory moving forward the function checks if the r10_1 is zero which means that we did not load the function pointer. idk who is the stupid dev who checked here again if the function pointer was not loaded, dumbass we already previously made a check before and we called a destructor function to destruct k400 if the function which resolves MmCopyMemory address failed anyway we then load something pretty powerful and important into rcx_2 it is the flag bytes which will determine if the caller chose MM_COPY_MEMORY_PHYSICAL or MM_COPY_MEMORY_VIRTUAL we read the flag bytes at input offset +0x18 , default rax to 1 which corresponds to MM_COPY_MEMORY_PHYSICAL switches rax to 2 which is MM_COPY_MEMORY_VIRTUAL only if bit 0 (1 & rcx_2) is clear and verifies that the least bit 0 or bit 1 ((1 & rcx_2) != 0 || (2 & rcx_2) != 0) is set till now it is all fine and the next move should be verifying the source address which is supplied by the user which is not the case we do a legendary r10_1 call (r10_1 was loaded with MmCopyMemory pointer) and passing the dst_buf, src_addr, copy_size, flag, &var_18 then we finally return 0 !! see It never checks whether the physical or virtual range is one the caller has any business reading - not a whitelist, not a bounds check, not even MmIsAddressValid. THAT IS THE SECOND CHAIN you can now build a standard minidump SystemInfoStream + ModuleListStream + Memory64ListStream, then feed it to pypykatz lsa minidump lsass.dmp for offline NT hash extraction but.. to avoid the object manager which do ppl checks we set the flag to MM_COPY_MEMORY_PHYSICAL why this works? because mmcopymemory doesnot respect ppl [image: https://romdump.net/img/b00171d0a2b1687cd02c98fb7b11d30a080e89683205d8999c8689a03c6b1f6f] why? because ppl relies on virtual memory translation and hardware enforced page permissions rather than physical bus isolations! that is the arbitary read vuln now similar thing happens to all the rest of the subcommands that we saw in the dispatcher! we will need the one with id 2 to translate the physical mem back to virtual SubCmd | Native function | Impact 0x01 | ZwMapViewOfSection on \Device\PhysicalMemory | arbitrary physical read 0x02 | DPC-based CPU register dump (IDTR, CR3, ...) | instant KASLR defeat 0x07 | MmGetSystemRoutineAddress | kernel symbol resolution 0x08 | ZwOpenProcess (any PID) | process handle acquisition 0x0C | MmCopyMemory wrapper | arbitrary physical and kernel-virtual read 0x11 | MmMapIoSpace (SMBus MMIO) | independent arbitrary physical read now the full poc looks something like this | | 1. Registry edit - point AllowedProcessName at our binary, restart the KslD service 2. KASLR bypass - SubCmd 0x02 returns IDTR/CR3 via a DPC; read the IDT, take any ISR address, scan backwards page-aligned for the MZ header => ntoskrnl base. (NtQuerySystemInformation works too as admin, but the register path avoids the API entirely.) 3. EPROCESS walk - from PsInitialSystemProcess, follow ActiveProcessLinks and find lsass.exe; all reads via SubCmd 0x0C, Direction=2 (virtual) 4. Extract the lsass CR3 - KPROCESS.DirectoryTableBase at offset 0x28 (stable across builds) 5. Page table walk in usermode - translate each lsass virtual address manually through PML4/PDPT/PD/PT using physical reads (Direction=1), handling 2 MB large pages via the PS bit 6. Physical acquisition - pull the lsass pages by physical address. The Object Manager is never involved, no handle is opened, PPL is never evaluated 7. Standarad dump process now this dumping method is completely unique and different. The well-known approach to dumping LSASS in the presence of PPL is to strip the PPL protection from the lsass.exe EPROCESS and then open a process handle and read it as usual. If you are interested in that approach, read this masterpiece: https://g3tsyst3m.com/byovd/BYOVD-and-Looting-LSASS-in-the-Modern-EDR-Era/ This exploit does something ruder: we never touch the Protection field and we never open a handle to LSASS at all. PPL is enforced by the Object Manager on the usermode handle path. We simply never use that path. also a third part in the chain is that single call can exfiltrate megabytes of physical RAM there is no size limit checks Anything but a patch and rewarding the researchers: MSRC ofcourse didnot assign a cve because they said "The described attack depends on pre-existing administrative privileges. No evidence was provided showing how those privileges were obtained. Reports that assume administrative or root access without demonstrating a vulnerability that grants those privileges are considered lower impact, as an attacker with such access could already perform more severe actions." [image: https://romdump.net/img/092d4b062c3af28a1f637b58c3920ff49eab0a44a27296a1b7ef5807afc20468] Mr dumbass Is mr dumbass a ragebaiter? Or is mr dumbass a irl dumbass? Or option c Atleast if this means anything it would be that this is a golden driver that provides golden opportunity for dumping lssas covertly and you absolutely must use in your pentests. Now to the patch part this was the fix : ``` // patched (82 KB): resolve the pointer, then deliberately clear it v3 = MmGetSystemRoutineAddress(L"MmCopyMemory"); if (v3 >= 0) { *(a1 + 24) = 0; // SubCmd 0x0C is dead } // vulnerable (333 KB): resolve the pointer, keep it ptr = MmGetSystemRoutineAddress(L"MmCopyMemory"); if (ptr) { *(this + 0x18) = ptr; // SubCmd 0x0C works } ``` this patches only one path which is the patch to the subcommand 12 the rest of the subcommands remains intact moreover Defender platform updates (KB4052623) move drivers into drivers\wd, but the original System32\drivers\KslD.sys is a CBS/WinSxS-backed component file kept on disk via NTFS hard links until the component store is cleaned - so it is simply never removed. here is a link to the poc https://github.com/andreisss/KslDump/blob/main/ksldump.py and the demo in same repo by this researcher no rust port this time tired asf ngl thx for reading <3 ------------------------------------------------------------------------------ #200 admin, 2026-12-03 08:06 UTC Source: https://romdump.net/raw/200 I thought you were going to commit suicide on the forum and this was your suicide note, I was already thinking about starting forum lore about your suicide on the forum ------------------------------------------------------------------------------ #201 admin, 2026-12-03 08:08 UTC [deleted] This post was deleted. ------------------------------------------------------------------------------ #202 noqs, 2026-12-03 08:11 UTC Source: https://romdump.net/raw/202 I thought you were going to commit suicide on the forum and this was your suicide note, I was already thinking about starting forum lore about your suicide on the forum All I want to do is go to bed ngl But just for clarification the title comes from the fact that like the defender own driver is vulnerable and can be abused for dumping lssas so in a way I thought of suicide as a title ofc ------------------------------------------------------------------------------ Page 1 of 1. End of thread.