Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <tchar.h>
- #include <stdlib.h>
- #include <Windows.h>
- #include <winternl.h>
- #define UNICODE
- #define _UNICODE
- PEB func() {
- _asm
- {
- mov eax, fs:0x30
- }
- }
- int _tmain()
- {
- PEB fuck = func();
- PPEB_LDR_DATA peb_ldr_data = (PPEB_LDR_DATA)fuck.Ldr;
- //peb_ldr_data->InMemoryOrderModuleList.Flink;
- LIST_ENTRY *a = &(peb_ldr_data->InMemoryOrderModuleList);
- a = a->Flink;
- PLDR_DATA_TABLE_ENTRY le = (LDR_DATA_TABLE_ENTRY*)((PBYTE)(a) - 8);
- UNICODE_STRING dll_name = (UNICODE_STRING)(le->FullDllName);
- while (le->DllBase != NULL)
- {
- dll_name = (UNICODE_STRING)(le->FullDllName);
- wprintf(TEXT("The loade dll name is %s\n"),dll_name.Buffer);
- a = a->Flink;
- le = (LDR_DATA_TABLE_ENTRY*)((PBYTE)(a) - 8);
- }
- //{
- //_tprintf(("%s", le->FullDllName.Buffer));
- // le = (LDR_DATA_TABLE_ENTRY*)(PBYTE)(a.Flink - 8);
- //}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement