код инструкций, которым ищу кернел: MOV EAX,-1h MOV EDI,DWORD PTR FS:[0h] далее заводим цикл ------------------------------------------ В общем при попытке найти кернел при третьей или четвертой итерации вываливается олька с Access violation when reading 7FFA0000 Начальным адресом является 7FFD7000. Просмотр шелл-кода выполняется из си программы прямым запуском: ..... ..... __asm { mov eax,[shellcode] int 3 call eax
актуальный код для Win2k-7RC1 Код (Text): cld // clear the direction flag for the loop xor edx, edx // zero edx mov edx, [fs:edx+0x30] // get a pointer to the PEB mov edx, [edx+0x0C] // get PEB->Ldr mov edx, [edx+0x14] // get the first module from the InMemoryOrder module list next_mod: mov esi, [edx+0x28] // get pointer to modules name (unicode string) push byte 24 // push down the length we want to check pop ecx // set ecx to this length for the loop xor edi, edi // clear edi which will store the hash of the module name loop_modname: xor eax, eax // clear eax lodsb // read in the next byte of the name cmp al, 'a' // some versions of Windows use lower case module names jl not_lowercase sub al, 0x20 // if so normalise to uppercase not_lowercase: ror edi, 13 // rotate right our hash value add edi, eax // add the next byte of the name to the hash loop loop_modname // loop until we have read enough cmp edi, 0x6A4ABC5B // compare the hash with that of KERNEL32.DLL mov ebx, [edx+0x10] // get this modules base address mov edx, [edx] // get the next module jne next_mod // if it doesn't match, process the next module // when we get here EBX is the kernel32 base (or change to suit). (с) Harmony Security Blog