Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
b
committed
Jun 18, 2019
1 parent
18115e6
commit 46495cc
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import pykd | ||
import os | ||
import sys | ||
|
||
curr_info=pykd.dbgCommand("!process -1 0") | ||
|
||
if curr_info.split(" ")[-1].strip() != "avp.exe": | ||
print "[+] Looking up AVP..." | ||
|
||
avp_info=pykd.dbgCommand("!process 0 0 avp.exe") | ||
avp_eprocess=avp_info.split(" ")[1] | ||
print("[+] Found EPROCESS: %s" % avp_eprocess) | ||
print("[+] Changing context...") | ||
pykd.dbgCommand(".process -r -i -p %s" % avp_eprocess) | ||
print("[+] Context changed") | ||
|
||
print("[+] Currently in AVP!") | ||
if len(sys.argv)>1 and sys.argv[1]=="switch": | ||
print("[+] My job is done.") | ||
exit() | ||
|
||
print("[+] Setting BP struct check failure") | ||
pykd.dbgCommand('bu prcore+0x12912') | ||
print("[+] Setting packet monitor") | ||
pykd.dbgCommand('bu prremote+0x1bb26 ".echo pkt:;dd ebx L20;g"') | ||
print("[+] Setting BP on call") | ||
pykd.dbgCommand('bu prremote+0x1d4f4') |