spender-sandbox / cuckoo-modified

Modified edition of cuckoo
392 stars 178 forks source link

Distributed Cuckoo #505

Closed nakir closed 6 years ago

nakir commented 6 years ago

I'm trying to make my cuckoo modified distributed, but something go wrong. On the master, I run dist.py (x.x.x.x:8081), api.py (x.x.x.x:8090), and cuckoo.py. The slave is running api.py (y.y. y.y:8091) and cuckoo.py. Then I register 2 cuckoo nodes. So, I can see my registered cuckoo nodes in x.x.x.x:8081/node. Then I sumbit my samples by api to x.x.x.x:8091, but they are never loaded on the slave node, only on the master machine. In fact, I'm sure that dist.py is not even affected during the loading of samples, they are simply loaded into the cuckoo as usual. P.S. In docs I found this line: "Submit a new analysis task The method of submission is always the same: by rest, web-gui, both only pointing on the "master node". "I did not do it, maybe this is the problem, but I do not understand where I can point on the" master node ".

doomedraven commented 6 years ago

you should submit task to master node only, and master do the rest for you

doomedraven commented 6 years ago

see this

your master web - 1.1.1.1:8000 api - 1.1.1.1:8081

slaves 1.1.1.2:8081 1.1.1.3:8081 etc

you should submit all tasks to 1.1.1.1 doesnt metter if that is gui or api, and dist will do the rest, anyway i have improved dist.py a lot since last update here, i will upload it somewhere later maybe

nakir commented 6 years ago

Oh, I'm sorry. My master node was disabled for some reason. I enable it, and now everything works. Still have one question. Why are samples loaded into the slave only when the number of pending samples is greater than the number of virtual machines, and not greater than zero?

doomedraven commented 6 years ago

if you saw master node has 2 options, storage only or processing, so if it is in processing, is better to not send all tasks to slaves, when master can process it. + you may have different servers with different numbers of vms, so it kinda to balance tasks a bit

nakir commented 6 years ago

Ok. Thanks for help. Closing issue.