GH*master Expert Cheater Reputation: 8
Joined: 10 Jan 2008 Posts: 159
|
Posted: Wed Jan 15, 2020 5:47 am Post subject: Need example for "dbvm_watch_writes" |
|
|
Hello! Can you help me to make an example about dbvm_watch_writes for memory region?
This my script throw two errors.
1) Check Init DBVM (I can do it manually in a different way)
2) Call dbvm_watch_writes - throw error in Lua console
Code: |
-- Tutorial-x86_64.exe+2B3A9 - 81 BB F0070000 E8030000 - cmp [rbx+000007F0],000003E8 { 1000 }
local addressStructure = 0x00322000
local sizeStrucure = 0x1000
if dbkInited == nil or not dbkInited then
dbkInited = dbk_initialize()
if not dbkInited then
print("Can't load DBK")
return
end
end
string.format('Start watching address: = %016X size: %X', addressStructure, sizeStrucure)
--local physicalAddress = dbk_getPhysicalAddress(addressStructure)
local CR3 = dbk_getCR3()
local physicalAddress = getPhysicalAddressCR3(CR3, addressStructure)
--To watch for structure
IDscanner = dbvm_watch_writes(physicalAddress, sizeStrucure)
function PrintResult(IDscanner)
data = dbvm_watch_retrievelog(IDscanner)
if data == nil then
print('Inforamtion: Data nil')
return
end
if #data <= 0 then
print('Inforamtion: #data <= 0')
return
end
--print(string.format('RIP = %016X',data.RIP))
for i=1,#data do
print(disassemble(data.RIP))
end
dbvm_watch_disable(IDscanner)
end
tmer = createTimer(nil, false)
tmer.OnTimer = function(timer)
print "Stop Timer"
PrintResult(IDscanner)
end
tmer.Interval = 20000
tmer.Enabled = true |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Jan 15, 2020 6:12 am Post subject: |
|
|
what is the error you get ? (Access violation? If so, DBVM wasn't loaded)
anyhow, dbvm_initialize(true) will load DBVM if it's not yet loaded
dbk_getPhysicalAddress(addressStructure) should return the same result as the getPhysicalAddressCR3 method
is IDScanner a negative value on return ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|