Open azza39925 opened 7 years ago
I was able to fix this by changing the iptables manually, and adding the rule to accept connections back to the default gateway. Also i noticed that when rooter closes it doesn't cleanup the iptable rules. Then what happens if it doesn't flush the rules they will double up and cause issues.
Yeah, that's kind of the task of the Cuckoo daemon rather than the Cuckoo Rooter. The Rooter is, currently, a simple state-less API for a set of root
commands. Ideas on improving this in Cuckoo would be great, perhaps we should implement some additional cleanup methods or so.
I think some better cleanup methods throughout are probably needed for iptables. I just got into a strange situation where every other analysis job would fail because the agent couldn't reach the result server. I managed to fix it by restoring the initial iptables and restarting cuckoo services and seems to be gone for now, but I imagine the state will get messed up again if I restart cuckoo services more.
For me, it seems as though the rules to accept from guest destined for resultserver were not created for some jobs and everything was simply being dropped.
This is also using internet mode fwiw.
The rooter crash has now been addressed, see also the commit above. With regards to the iptables
rules not being cleaned up correctly, I hope to address that properly in Cuckoo sometime. Will keep this issue alive, but change the title accordingly.
Idea: clean up all of the iptables
rules on Cuckoo startup - or at least those rules that are known for the VMs that have been configured. In the end there's not much we can do in Cuckoo if somebody decides to killall
/ kill -9
our processes. Doing cleanup at startup would still work in that case.
When I try to use rooter with the internet routing I seem to not get any communication from the agent. Then after a while, the rooter will crash. Everything was working before i used rooter. Everything like agent having admin rights and network settings is correct. All "#" have been removed and changed to "//" for readability
rooter error
routing.conf
/etc/iproute2/rt_tables