码迷,mamicode.com
首页 > 数据库 > 详细

windbg-.process切换进程(内核)

时间:2017-01-07 15:13:28      阅读:290      评论:0      收藏:0      [点我收藏+]

标签:tail   express   static   images   nts   word   指定   code   cpp   

.process


.process 命令指定要用作进程上下文的进程(Set Process Context)
.process显示当前进程的EPROCESS,这里显示当前进程为test.exe

  1. kd> .process  
  2. Implicit process is now 821f5da0  
  3. kd> ? @$proc  
  4. Evaluate expression: -2111873632 = 821f5da0  
  5. kd> !process 821f5da0 0  
  6. PROCESS 821f5da0  SessionId: 0  Cid: 06e8    Peb: 7ffde000  ParentCid: 0620  
  7.     DirBase: 02b40380  ObjectTable: e1112818  HandleCount:  20.  
  8.     Image: test.exe  
kd> .process
Implicit process is now 821f5da0
kd> ? @$proc
Evaluate expression: -2111873632 = 821f5da0
kd> !process 821f5da0 0
PROCESS 821f5da0  SessionId: 0  Cid: 06e8    Peb: 7ffde000  ParentCid: 0620
    DirBase: 02b40380  ObjectTable: e1112818  HandleCount:  20.
    Image: test.exe


可以通过/r /p来切换进程上下文,意味着接下的命令都使用新的进程上下文,比如内存,但这没有改变目标系统,只是影响了windbg的输出

  1. kd> .process /r /p 81e74b58    
  2. Implicit process is now 81e74b58  
  3. .cache forcedecodeuser done  
  4. Loading User Symbols  
  5. PEB is paged out (Peb.Ldr = 7ffdc00c).  Type ".hh dbgerr001" for details  
  6. kd> db 1000000  
  7. 01000000  4d 5a 90 00 03 00 00 00-04 00 00 00 ff ff 00 00  MZ..............  
  8. 01000010  b8 00 00 00 00 00 00 00-40 00 00 00 00 00 00 00  ........@.......  
  9. 01000020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................  
  10. 01000030  00 00 00 00 00 00 00 00-00 00 00 00 e0 00 00 00  ................  
  11. 01000040  0e 1f ba 0e 00 b4 09 cd-21 b8 01 4c cd 21 54 68  ........!..L.!Th  
  12. 01000050  69 73 20 70 72 6f 67 72-61 6d 20 63 61 6e 6e 6f  is program canno  
  13. 01000060  74 20 62 65 20 72 75 6e-20 69 6e 20 44 4f 53 20  t be run in DOS   
  14. 01000070  6d 6f 64 65 2e 0d 0d 0a-24 00 00 00 00 00 00 00  mode....$.......  
  15. kd> .process /r /p 821f5da0    
  16. Implicit process is now 821f5da0  
  17. .cache forcedecodeuser done  
  18. Loading User Symbols  
  19. .........  
  20. kd> db 1000000  
  21. 01000000  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  22. 01000010  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  23. 01000020  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  24. 01000030  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  25. 01000040  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  26. 01000050  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  27. 01000060  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
  28. 01000070  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????  
kd> .process /r /p 81e74b58  
Implicit process is now 81e74b58
.cache forcedecodeuser done
Loading User Symbols
PEB is paged out (Peb.Ldr = 7ffdc00c).  Type ".hh dbgerr001" for details
kd> db 1000000
01000000  4d 5a 90 00 03 00 00 00-04 00 00 00 ff ff 00 00  MZ..............
01000010  b8 00 00 00 00 00 00 00-40 00 00 00 00 00 00 00  ........@.......
01000020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
01000030  00 00 00 00 00 00 00 00-00 00 00 00 e0 00 00 00  ................
01000040  0e 1f ba 0e 00 b4 09 cd-21 b8 01 4c cd 21 54 68  ........!..L.!Th
01000050  69 73 20 70 72 6f 67 72-61 6d 20 63 61 6e 6e 6f  is program canno
01000060  74 20 62 65 20 72 75 6e-20 69 6e 20 44 4f 53 20  t be run in DOS 
01000070  6d 6f 64 65 2e 0d 0d 0a-24 00 00 00 00 00 00 00  mode....$.......
kd> .process /r /p 821f5da0  
Implicit process is now 821f5da0
.cache forcedecodeuser done
Loading User Symbols
.........
kd> db 1000000
01000000  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
01000010  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
01000020  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
01000030  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
01000040  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
01000050  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
01000060  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????
01000070  ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ??  ????????????????

可以用/i来切换,它会进行实际的进程切换,所以执行后先g一下,如果使用了 /i,必须使用g (Go)命令来执行目标。数秒之后,目标会再次中断到调试器中,并且指定的Process 被激活并用作当前进程上下文。 


jpg改rar技术分享

windbg-.process切换进程(内核)

标签:tail   express   static   images   nts   word   指定   code   cpp   

原文地址:http://www.cnblogs.com/kuangke/p/6259333.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!