-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitoring Mem Events #32
Comments
Well, simply because this memevent example here doesn't catch syscalls, only memory events when a certain address (symbol) is being executed. |
Hmm firstly what's meaning of gfn and Is there a way to monitor all syscall events? (after i can convert it to symbol name) |
you need to read the libvmi headers, its the official documentation ATM:
You would need to translate each symbol to their virtual address, and setup a memory event on each guest frame (physical memory) where your symbols are located.
see generic memory events as I told you above |
@dscdo can you already monitor
|
Yes it's working but with some symbol(Process create or delete file) i cant get result @Wenzel |
The script might fail if the page where the symbol is located is not mapped in the virtual address space. |
If we find a way to watch/save all syscall without symboll adress the problem will be solved. In addition how we can give sysenter_eip to as gfn. |
You still need to have the page mappped in the virtual address space, it doesn't change your problem if you already have the [symbol] -> [address] association.
Make a PR to add support for it 👍 |
Yes i understand but i cant find logical way to do it with python module |
@dscdo can you describe your use case ? |
My main goal is understand the system. So that tracing all syscall from vm is my personel homework 😄 I used drakvuf but as i said i want to learn the technique. |
Drakvuf is open-source and you are welcome to review the code to better understand it. There is also the publication describing it in detail. Or you may also find this (old) example useful https://github.com/tklengyel/troopers-training/blob/master/exercise3-solution/syscalls.c |
Hi @Wenzel
I'm looking examples about monitoring syscall and in native examples mem events constant setted as lstar or cstar to catch syscall
But in your sample
vaddr = vmi.translate_ksym2v(symbol)
paddr = vmi.translate_kv2p(vaddr)
frame = paddr >> 12
....
mem_event = MemEvent(MemAccess.X, cb_mem_event, gfn=frame,data=user_data)
you are using symbol adress to set mem_event
What is the reason?
With cstar or lstar can we catch same RIP adress?
The text was updated successfully, but these errors were encountered: