Open nogitsune-youkai opened 3 months ago
It seems that PEB_LDR_DATA structure fields are initialized in
void PeEmulation::InitLdrModuleList()
peb.ProcessHeap = (PVOID)m_HeapBase; // this is initialized to 0x0000000010000000
peb.ProcessHeap = NtCurrentPeb()->ProcessHeap; // // this is intialized to 0x000002413f480000. Which one to keep?
Which peb.ProcessHeap should i keep? This field gets overwritten in peb.ProcessHeap = NtCurrentPeb()->ProcessHeap;
but the values are different. It seems that first time it's initialized with heap base address, but next time it's getting initialized with simple address of ProcessHeap. Is there a big difference and do we really need it???
so we need to use dynamic addr of heap peb.ProcessHeap = NtCurrentPeb()->ProcessHeap; // this is intialized to 0x000002413f480000. Which one to keep?
to prevent detection of pevisor and also u need to emulate Heap structure for avoiding of debugger detection by heap
so we need to use dynamic addr of heap
peb.ProcessHeap = NtCurrentPeb()->ProcessHeap; // this is intialized to 0x000002413f480000. Which one to keep?
to prevent detection of pevisor and also u need to emulate Heap structure for avoiding of debugger detection by heap
So if i get this right, we should go with my solution and use NtCurrentPeb()->ProcessHeap;
instead of peb.ProcessHeap = (PVOID)m_HeapBase;
. Right? Just to clarify
so we need to use dynamic addr of heap
peb.ProcessHeap = NtCurrentPeb()->ProcessHeap; // this is intialized to 0x000002413f480000. Which one to keep?
to prevent detection of pevisor and also u need to emulate Heap structure for avoiding of debugger detection by heapSo if i get this right, we should go with my solution and use
NtCurrentPeb()->ProcessHeap;
instead ofpeb.ProcessHeap = (PVOID)m_HeapBase;
. Right? Just to clarify
Yeah, but for errorless and bugless code check all places which using static m_HeapBase or peb.ProcessHeap
so we need to use dynamic addr of heap
peb.ProcessHeap = NtCurrentPeb()->ProcessHeap; // this is intialized to 0x000002413f480000. Which one to keep?
to prevent detection of pevisor and also u need to emulate Heap structure for avoiding of debugger detection by heapSo if i get this right, we should go with my solution and use
NtCurrentPeb()->ProcessHeap;
instead ofpeb.ProcessHeap = (PVOID)m_HeapBase;
. Right? Just to clarifyYeah, but for errorless and bugless code check all places which using static m_HeapBase or peb.ProcessHeap
Gotcha
Hmm, it seems that i forgot to initialize fields inside unions, need to fix it
I started to initialize fields of PEB structure in InitTebPeb(), do not merge, this is work in progress