Address of 8.asm-peb, TEB (ntdll! RTLGETCURRENTPEB get Peb)

Source: Internet
Author: User

If you don't want to write the assembly, you can use this.

Ppeb Ntapi Rtlgetcurrentpeb ();
Ppeb Peb=rtlgetcurrentpeb ();

Its assembly is:

ntdll! RTLGETCURRENTPEB:
7c97efa9 64a118000000    mov     eax,dword ptr fs:[00000018h]
7c97efaf 8b4030          mov     Eax,dword ptr [eax+30h]
7C97EFB2 c3              ret

FS:[0X18] point to TEB itself

Come on, Almighty WinDbg:

0:000> DD fs:[0x18] L1
0053:00000018  7efdd000
0:000> r $teb
$teb =7efdd000

0:000> DT _teb-y processenvironmentblock @ $teb 
test1!_teb
   +0x030 processenvironmentblock:0x7efde000 _PEB


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.