Giter Site home page Giter Site logo

upstream rooter about cape HOT 20 CLOSED

ctxis avatar ctxis commented on July 19, 2024
upstream rooter

from cape.

Comments (20)

doomedraven avatar doomedraven commented on July 19, 2024

https://github.com/ctxis/CAPE/blob/master/utils/rooter.py

from cape.

wizkidnc avatar wizkidnc commented on July 19, 2024

brain fog on my part. thanks @doomedraven

from cape.

wizkidnc avatar wizkidnc commented on July 19, 2024

So I just took a look at this and it is trying to import from core and that may be where my issue is I think.

from cape.

wizkidnc avatar wizkidnc commented on July 19, 2024

so possibly this is missing in CAPE I guess from the latest commit. I could however be wrong.

from cape.

enzok avatar enzok commented on July 19, 2024

My bad. The rooter file is indeed missing from my commit. I will add it ASAIC.

from cape.

wizkidnc avatar wizkidnc commented on July 19, 2024

from cape.

enzok avatar enzok commented on July 19, 2024

@wizkidnc The commit has been merged. Please check it out.

from cape.

Kuzuto avatar Kuzuto commented on July 19, 2024

I just updated the new merged.
I'm getting :

Traceback (most recent call last):
File "cuckoo.py", line 138, in
test=args.test)
File "cuckoo.py", line 63, in cuckoo_init
init_rooter()
File "/home/cuckoo/CAPE/lib/cuckoo/core/startup.py", line 657, in init_rooter
if not Config("vpn").vpn.enabled and cuckoo.routing.route == "none":
AttributeError: Config instance has no attribute 'vpn'

If I rename conf/vpn.conf.py to vpn.conf as the other .conf files, it can load the config, but then gets

Traceback (most recent call last):
File "cuckoo.py", line 138, in
test=args.test)
File "cuckoo.py", line 64, in cuckoo_init
init_routing()
File "/home/cuckoo/CAPE/lib/cuckoo/core/startup.py", line 782, in init_routing
if not rooter("nic_available", cuckoo.routing.tor_interface):
File "/home/cuckoo/CAPE/lib/cuckoo/core/rooter.py", line 23, in rooter
if not os.path.exists(cfg.cuckoo.rooter):
File "/usr/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

I can't see what's wrong, but it can't startup on my installation.

from cape.

enzok avatar enzok commented on July 19, 2024

Ugh, sorry about that. My IDE must have appended the .py to that conf file. It should be vpn.conf.

As for the other error:

From the cuckoo.conf file:

# Path to the unix socket for running root commands.
rooter = /tmp/cuckoo-rooter

Have you started the rooter daemon?

I use the following script (make sure you sudo as rooter needs to run as root):

$CUCKOO_PATH=/opt/cuckoo

# Stop and Start rooter.py
pkill -f rooter.py
python $CUCKOO_PATH/utils/rooter.py /tmp/cuckoo-rooter &

from cape.

Kuzuto avatar Kuzuto commented on July 19, 2024

thanks for the quick reply..
I tried to set the route=none and internet=none or to internet and also starting up rooter.py, but getting the following error on every startup :

Traceback (most recent call last):
File "cuckoo.py", line 138, in
test=args.test)
File "cuckoo.py", line 64, in cuckoo_init
init_routing()
File "/home/cuckoo/CAPE/lib/cuckoo/core/startup.py", line 782, in init_routing
if not rooter("nic_available", cuckoo.routing.tor_interface):
File "/home/cuckoo/CAPE/lib/cuckoo/core/rooter.py", line 23, in rooter
if not os.path.exists(cfg.cuckoo.rooter):
File "/usr/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

The error : coercing to Unicode: need string or buffer
looks like the same from this https://stackoverflow.com/questions/16169035/coercing-to-unicode-need-string-or-buffer-nonetype-found-when-rendering-in-dja

But what is it that returns empty.. ?

from cape.

enzok avatar enzok commented on July 19, 2024

Fix incoming...

from cape.

kevoreilly avatar kevoreilly commented on July 19, 2024

How's this shaping up? Any joy getting it sorted?

from cape.

enzok avatar enzok commented on July 19, 2024

This was fixed (hopefully) in #40.

from cape.

Kuzuto avatar Kuzuto commented on July 19, 2024

Hi.. sorry for not getting back on this. My environment needed to be restored before I could test.

After the new #40, The errors is fixed, but I still have some problems getting it started.
Is it true I can't start it up without Internet rooter running?
I put all config to 'none' and off in the cuckoo.conf, and auxiliary.conf->tor to no, but I get this when running cuckoo.py :
CuckooStartupError: The network interface that has been configured as tor line is not available.

from cape.

Kuzuto avatar Kuzuto commented on July 19, 2024

Ah .. Even Inetsim & Tor is set to "off" in cuckoo.py, the script still looks if the interface i valid.
Is it possible to skip the interface check, if you set it to "off" ?

from cape.

enzok avatar enzok commented on July 19, 2024

I added a check for the enabled value in the conf file. Pull request submitted.

from cape.

kevoreilly avatar kevoreilly commented on July 19, 2024

Merged pull request - let me know if this fixes up all the issues!

from cape.

Kuzuto avatar Kuzuto commented on July 19, 2024

For me it all worked now 👍

from cape.

wizkidnc avatar wizkidnc commented on July 19, 2024

from cape.

kevoreilly avatar kevoreilly commented on July 19, 2024

Thanks for the help with this one guys. Closing 👍

from cape.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.