Closed psikore closed 8 years ago
That is not expected. If you could enable debug logging per the wiki and send me the logs I'll have a look.
Ok attached are my log files. I can reproduce the problems with a simple 'standard' hello world program compiled with gcc. Usually you will see the correct result (e.g. disassembly listing is disasm view) flash up before being replaced by the error message.
OK, can you do this for me:
Start GDB with the test inferior included with Voltron:
$ cc -o tests/inferior tests/inferior.c
$ gdb tests/inferior
Start a Python process in another terminal and paste in the following:
import voltron
c = voltron.core.Client()
while True:
print(c.perform_request('state', block=True))
In the debugger:
(gdb) b main
(gdb) run
(gdb) stepi
(gdb) stepi
(gdb) stepi
Step maybe 10 or so times and paste the output from the Python session here? I'll have to grab a Kali image to try to reproduce it locally, but something seems to be going wrong with the client<->server comms. From your debug logs the server is responding correctly but the client is getting None
back for some responses.
Ok I did that although I had to make sure I run to main before starting the python script otherwise python script dies with 'Connection refused'.
Once I 'run' in gdb... then start python script I get the following output... root@Kali:~# python vtest.py {"status": "error", "data": {"message": "The request timed out", "code": 4100}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "success", "data": {"state": "stopped"}, "type": "response"} {"status": "error", "data": {"message": "The request timed out", "code": 4100}, "type": "response"} {"status": "error", "data": {"message": "The request timed out", "code": 4100}, "type": "response"} {"status": "error", "data": {"message": "The request timed out", "code": 4100}, "type": "response"}
The timeouts happen while idle (no keys hit) where as the success msgs come from the steps...
In case it is useful later if/when you try it here is the Kali version (VM) I am on: Linux Kali 4.0.0-kali1-686-pae #1 SMP Debian 4.0.4-1+kali2 (2015-06-03) i686 GNU/Linux
Here is another result from further stepping after doing 'voltron view disasm' in another terminator pane: No handlers could be found for logger "core" {"status": "error", "data": {"message": "Empty response", "code": 4104}, "type": "response"} {"status": "error", "data": {"message": "The request timed out", "code": 4100}, "type": "response"}
"Empty response" is what I see in the disasm pane too.
OK, I'll have to try and reproduce it here.
Ok thanks. Let me know if you want me to help in any way. It seems like a great idea and I am hoping I can use it actively.
No problem. Just waiting on a Kali image to download on my slow internet.
Evidently I am bad at thread synchronisation. Should be fixed in 93e8fa947d8c683a01e559e3e9eb076c24c9e016.
I am running Voltron on Kali 32-bit () via terminator with 3 panes. In the bottom pane I start gdb on a sample program (gdb ./test) In the top right pane I set voltron view to register ("voltron view register") In the top left pane I set voltron view to disasm ("voltron view disasm") in bottom pane I set a breakpoint on main and run ("b main then run")
The panes update as desired. As I step through the code I find often both the disasm and the regs view will 'dropout' [regs:general] will display "No such target" [code] will display "Empty response"
Is this expected? Perhaps its because the code / registers are inaccessible at that point in time?