-
Notifications
You must be signed in to change notification settings - Fork 253
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
post injection failed to init, drakvuf will not run, stop at polling loop #1533
Comments
Some of my markups have been removed -- my fault. previously received output: and using a bash shell script used: |
Looking at the configure output, I see all plugins, except syscalls is disabled -- looks like I did it correctly. the received output from injection: |
I can also get the vmi-process-list, so libvmi must be working. |
I want back to Debugging Drakvuf when run the output shows: ..... My kernel is 5.15.0-41-generic, running Ubuntu 20.04.01, ..... Then there are a bunch of these lines: .......There there is this: ..... then lines similar to this over and over: The VM showed nothing in xl list state '-----' If I run with no debug procmon output up to PID:1149 PPID: 1 RunningProcess:"/usr/libexec/ibus-x11" The xl state then goes from 'r----' to '--p---' to '------' and drakvuf has no output past procmon. ....... I then tried to start up my VM with just 1CPU, and now I get data from drakvuf, but nothing is output. I would appreciate any help I can get. |
To be honest I have not gotten injection to run on my linux VM Guests -- currently my local version of drakvuf is 1e8078e Are there injection tests being run on each build, and if so, do injection test cases exist that run on perhaps a test harness, test cases I can look at to see how I can perform injection on known good test cases? That would be a really big help. Perhaps on another git repo? If things have changed in injection, I can git pull and re-insert my code and try again (with some effort), if things have been fixed. Here is some code snips: I have tried ExecFile, WriteFile, ReadFile -- I cannot get anything to work yet. *1 When I try using the pid of the process to be injected, using exec, I get: all these rt_sigaction's look suspicious, like something is trying to run. |
There are injection tests run on each PR but only targeting Windows. The Linux injection method was tested manually before it got merged but there is no test of it in the CI currently. |
I hacked into syscall plugin and searched for a process that I run on dom0, when I find that process, I run injection. user1@xhf:~$ cat log-src-libinject-injector_utils.txt user1@xhf:~$ cat log-src-libinjector-linux-linux_injector.c.txt user1@xhf:~$ cat log-src-libinject-linux-methods-linux_write.txt Std Output: On the VM I created an executable and compiled it for running on vm1, so I can run the injection command line int main() {
root@xhf:/home/user1/git/drakvuf# src/injector -r /root/vm1.json -d 4 -e /home/user1/readme.txt -B /home/user1/aaa -m writefile -i 1097
root@xhf:/home/user1/git/drakvuf# src/injector -r /root/vm1.json -d 4 -e /home/user1/aaa -B /home/user1/readme.txt -m writefile -i 1099 root@xhf:/home/user1/git/drakvuf# xl list
root@xhf:/home/user1/git/drakvuf# src/injector -r /root/vm1.json -d 5 -e /home/user1/readme.txt -B /home/user1/readme.txt -m writefile -i 974 ...... I have not gotten injection to work on linux. Am I doing something wrong, or is injection broken? |
I ran in debug mode: But there was no output that was additional -- A nice to have feature for the command line (src/injector) is for a debug verbose mode (if it is possible and makes sense). I also performed a pull today, just a few minutes ago, as I saw work being performed on injection yesterday (really thankful!!), but the version I pulled did not work yet. |
Compiling with debug target makes the |
for some reason I did not get -v to work: cd git/drakvuf/root@xhf:/home/cdprince/git/drakvuf# src/injector -r /root/vm1.json -d 1 -e /home/user1/readme.txt -B /home/user1/aaa -m writefile -v -i 1009 BTW -- I no longer get the Segmentation fault |
If |
xhf: DRAKVUF (C) Tamas K Lengyel 2014-2023 1.1 Version Plugins (-Dplugin-) Deprecated plugins Configuration Install path Option buildtype is: debug [default: release] I did not see that the install path was /usr/local/bin/ |
The program stops, I was using gdb Seems that injection is stuck in poll |
I tried version: I rebuilt libvmi ?Could the problem be the Xen version does not match? Or perhaps I need a test case? |
I also ran like: |
I had previously run injection and I received in the output "inject..,Shellcode,InitFail"
As an aside, is there any start sequence/stop sequence, or is the shellcode just a sequence of values: e.g.; file == \xeb\x06\x48...
After which I could not run drakvuf again, the tool just stops. The VM guest would work slowly for one command, then freeze up.
I have since reset my code hard to the origin
Now version FETCH_HEAD shows 95d1759
I have configure --enable-debug and --disable-plugin ...I perform this in a shell script because the line is so long.
I ran drakvuf with verbose, -v: # src/drakvuf -v -r /root/vm2.json -d 15 2>&1 |tee myoutfile
The output shows "starting plugin " -- perhaps I should assume that the plugins are attempted, but do not start? This is confusing and does not show syscalls as being run, while the other plugins are not to be run.
... looking through the output, I see the last two calls before execution seemingly stops:
Beginning DRAKVUF main loop
Started DRAkVUF polling loop ... then nothing, but the VM Guest seems fine (while using screen utility)
I press CTRL-C and then the guest VM is paused -- I find this to be typical when I run using the tee utility in this way.
BTW I can run drakvuf with all plugins disabled, but no output happens either.
The text was updated successfully, but these errors were encountered: