Observe Windows Kernel Modules, data structures, and functions

Source: Internet
Author: User

Observe Windows Kernel Modules, data structures, and functions

1. Start local Kernel debugging of WinDbg (File> Kernel Debug... > Local ).

2. type. symfix c: "symbols to set the symbol server and the local directory used to store the symbol file.

3. type. sympath to observe the current symbolic path. The result is as follows:

Lkd>. sympath

Symbol search path is: SRV * c: "symbols * http://msdl.microsoft.com/download/symbols

4. type. reload to reload the symbol. It may take a long time. Please wait.

5. Enter the lm command to list all kernel modules. Find HAL, NT, and other modules and observe their starting and ending positions in the memory.

6. type! Process 0 0 command to list all processes running in the current system.

7. type! Process 4 displays the overview of the System process and various threads. Record the PROCESS structure address of the PROCESS.

Lkd>! Process 4

Searching for Process with Cid = 4

PROCESS86fb7660 SessionId: none Cid: 0004 Peb: 00000000 ParentCid: 0000

DirBase: 00039000 ObjectTable: e1001c78 HandleCount: 396.

Image: System

VadRoot 86fae870 Vads 4 Clone 0 Private 3. Modified 124205. Locked 0.

DeviceMap e1005470

8. Run the dt command (dt nt! _ EPROCESS) observe the _ EPROCESS structure of the process.

9, in dt nt! Add the address recorded in step 1 after the _ EPROCESS command to display the values of the _ EPROCESS structure of the system process.

Lkd> dt nt! _ EPROCESS 86fb7660

+ 0x000 Pcb: _ KPROCESS

+ 0x06c ProcessLock: _ EX_PUSH_LOCK

10, Type x nt! * Command to list the symbols contained in the kernel file (NTOSKRNL. Try to use different expressions to select to display some symbols, such as x nt! Dbgk * displays all symbols starting with Dbgk.

11. Disable WinDbg and complete debugging.

Related Article

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.