Skip to content
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

Question about setup test vm. #61

Open
bigbigbanana opened this issue Dec 18, 2017 · 22 comments
Open

Question about setup test vm. #61

bigbigbanana opened this issue Dec 18, 2017 · 22 comments

Comments

@bigbigbanana
Copy link

Sorry about hijack other people's issue,i just want to know can i use virt-manager to create win7 test vm or use qemu-img and virt-install orders?

@Wenzel
Copy link
Member

Wenzel commented Dec 18, 2017

The win7 VM is created using a packer template.
Then, with the import_libvirt.py script, you can view it in virt-manager.

Read closely the README.

@bigbigbanana
Copy link
Author

When i run ./main.py --nobackend win7,it reports errors,how can i fix it?
2017-12-20 08-31-48

@bigbigbanana
Copy link
Author

And after i install libvmi,then i run ./main.py --nobackend win7,it still exits errors.
2017-12-20 09-42-22

@Wenzel
Copy link
Member

Wenzel commented Dec 20, 2017

Read the error messages.
too many aruments to function X
There is an API mismatch between your installed libvmi version and the one i'm using in Nitro.

Have you installed the nitro branch version of libvmi ? or just pulled master ?

@bigbigbanana
Copy link
Author

For the question exists in the first picture i uploaded,did it means i should install libvmi and then i can run ./main.py --nobackend win7?

@Wenzel
Copy link
Member

Wenzel commented Dec 20, 2017

the --nobackend option was meant to just listen to raw hardware events.
Libvmi is only required in the backend, to rebuild the context of the virtual machine.

In the first picture you uploaded, the error state that CFFI tried to compile the libvmi wrapper, but you were lacking a compiler, gcc for example.

@bigbigbanana
Copy link
Author

bigbigbanana commented Dec 21, 2017

But i have installed gcc,am i lack of other packages?
2017-12-21 08-53-05

@Wenzel
Copy link
Member

Wenzel commented Dec 21, 2017

@bigbigbanana please to try google and search by yourself.
This was really easy to figure out.
First link on google.
https://stackoverflow.com/questions/26053982/error-setup-script-exited-with-error-command-x86-64-linux-gnu-gcc-failed-wit

@bigbigbanana
Copy link
Author

bigbigbanana commented Dec 22, 2017

I have solved the above questions by installing libvmi used in nitro,thank you for your suggestions!But i have a question,the rax register stores syscall number,but in th picture,i found 0x1002,0x10162 and so on,these syscall numbers should not be so big,are these results wrong?
2017-12-22 14-09-16

@Wenzel
Copy link
Member

Wenzel commented Dec 22, 2017

Windows has 2 main SSDT : the NT and the win32k syscall tables.
To differentiate between them, Windows sets a prefix which will should which SSDT to use for a given syscall number.
Take a look at Windows Internals.

@bigbigbanana
Copy link
Author

When i run ./main.py win7,there exists some errors,what's wrong with it?
2017-12-25 10-21-14
2017-12-25 10-21-54

@Wenzel
Copy link
Member

Wenzel commented Dec 25, 2017

Install docopt from your package manager. It's available in your distro.

Also nitro is python3 but you are using pip2 not pip3 here

@bigbigbanana
Copy link
Author

But i indeed use python3 to install cffi,docopt,ioctl-opt and in nitro repo,i use python3 ./setup.py install order to install the required installation packages,but there still exists errors.
2017-12-26 08-55-52
2017-12-26 08-45-06

@Wenzel
Copy link
Member

Wenzel commented Dec 26, 2017

You need docopt for python2 also. Nitro is calling a symbols.py python2 with subprocess which imports docopt.

@bigbigbanana
Copy link
Author

I used apt-get install python-docopt and after that i run ./main.py win7,it shows no module named rekall but i have installed rekall.
2017-12-26 10-29-34

@Wenzel
Copy link
Member

Wenzel commented Dec 26, 2017

which rekall ?
How did you install it ?

@bigbigbanana
Copy link
Author

I use sudo pip3 install --upgrade setuptools pip wheel and sudo pip3 install rekall orders to install rekall.
2017-12-26 10-58-14

@Wenzel
Copy link
Member

Wenzel commented Dec 26, 2017

You have installed the python3 release of Rekall.
However our symbols.py is Python2, and therefore searches for Rekall modules in the Python2 search path.
You can use the same commands you used to install Rekall, but with pip2 instead, it will work.

@Wenzel
Copy link
Member

Wenzel commented Dec 26, 2017

Reason we have not switched to Rekall python3 is that the latest official release contains some bugs that are only fixed in the upstream git repository.
We are waiting for the next release of Rekall.

@bigbigbanana
Copy link
Author

@Wenzel
Hello,as the output of captured linux vm's syscalls is seperated,if i want to get the singe process's full syscalls like the picture below shows,how can i achieve this?Could you give me some advices?
default

@Wenzel
Copy link
Member

Wenzel commented Jan 29, 2018

Just post-process the JSON with Python.

@bigbigbanana
Copy link
Author

Hello,i want to get sin_port and ip_addr of connect syscall,i use libvmi.read32(the base addr of struct sockaddr_in+offset of sin_port,pid),but i got wrong results.Is this method wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants