-
Notifications
You must be signed in to change notification settings - Fork 143
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
drakplayground: Transfer files from guest os to host. #823
Comments
It is not offered by current version of drakplayground, but you can hack current methods to get the injector instance and call *** Welcome to drakrun playground ***
Your VM is now ready and running with internet connection.
You can connect to it using VNC (password can be found in /etc/drakrun/scripts/cfg.template)
Run help() to list available commands.
[2023-09-20 11:46:59,901][DEBUG] Using selector: EpollSelector
In [1]: copy
Out[1]: <bound method DrakmonShell.copy of <drakrun.playground.DrakmonShell object at 0x7f6a52bd8130>>
In [2]: copy.__self__.injector
Out[2]: <drakrun.injector.Injector at 0x7f6a52bd80a0>
In [3]: copy.__self__.injector.read_file("C:\\Windows\\system32\\ntdll.dll", "./ntdll.dll")
Out[3]: CompletedProcess(args=['injector', '-o', 'json', '-d', 'vm-0', '-r', PosixPath('/var/lib/drakrun/profiles/kernel.json'), '-i', '1800', '-k', '0x187000', '-m', 'readfile', '--timeout', '55', '-e', 'C:\\Windows\\system32\\ntdll.dll', '-B', './ntdll.dll'], returncode=0, stdout=b'{"Plugin": "inject", "TimeStamp": "1695203326.029329", "Method": "ReadFile", "Status": "Success", "ProcessName": "C:\\\\Windows\\\\system32\\\\ntdll.dll", "Arguments": "", "InjectedPid": 0, "InjectedTid": 0}\n', stderr=b'DRAKVUF injector v1.1-git20230913113759+b38d7ed-1 Copyright (C) 2014-2023 Tamas K Lengyel\n') I will leave the issue open as it is good feature request, I'm also missing that option. |
Great idea.
and added it in main() as:
Finally, I can copy file from guest using copy1(), like copy1("log.txt", "/home/log.txt"). and it worked as expected! |
Hi,
I know there is a way to copy file from the host onto the guest, using drakplayground 0 and then executing copy(host_file_path) method.
Is it possible to go the reverse direction? copy files from the guest to the host.
Thanks.
The text was updated successfully, but these errors were encountered: