infobyte / faraday

Open Source Vulnerability Management Platform
https://www.faradaysec.com
GNU General Public License v3.0
4.87k stars 893 forks source link

Cannot select a workspace in faraday-client #377

Closed chadfurman closed 4 years ago

chadfurman commented 4 years ago

Issue Type

Faraday version

3.9.2

Paste the output of the ./faraday.py --version command

root@kali:/home/faraday/.faraday/report# faraday-server --version
bash: faraday-server: command not found
root@kali:/home/faraday/.faraday/report# faraday-client --version
Faraday v3.9.2
root@kali:/home/faraday/.faraday/report# systemctl status faraday-server
● faraday-server.service - Faraday Server
   Loaded: loaded (/etc/systemd/system/faraday-server.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2019-11-23 23:22:43 EST; 15min ago
 Main PID: 8792 (faraday-server)
    Tasks: 13 (limit: 4915)
   Memory: 148.4M
   CGroup: /system.slice/faraday-server.service
           └─8792 /opt/faraday/bin/python /opt/faraday/bin/faraday-server

Nov 23 23:22:46 kali faraday-server[8792]: /opt/faraday/lib/python2.7/site-packages/psycopg2-2.7.7-py2.7-linux-x86_64.egg/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed fr
Nov 23 23:22:46 kali faraday-server[8792]:   """)
Nov 23 23:22:46 kali faraday-server[8792]: 2019-11-23 23:22:46,699 - faraday - INFO {MainThread} [start_server.py:47 - setup_environment()]  Checking dependencies...
Nov 23 23:22:46 kali faraday-server[8792]: 2019-11-23 23:22:46,700 - faraday - INFO {MainThread} [start_server.py:52 - setup_environment()]  Dependencies met
Nov 23 23:22:46 kali faraday-server[8792]: 2019-11-23 23:22:46,700 - faraday.server.web - INFO {MainThread} [web.py:80 - __init__()]  Starting web server at http://localhost:5985/
Nov 23 23:22:46 kali faraday-server[8792]: 2019-11-23 23:22:46,704 - faraday.client.start_client - INFO {MainThread} [start_client.py:298 - setupPlugins()]  Removing old plugins folder.
Nov 23 23:22:47 kali faraday-server[8792]: 2019-11-23 23:22:47,025 - faraday.server.api.modules.upload_reports - INFO {Thread-1} [upload_reports.py:89 - run()]  Tool report processor started
Nov 23 23:22:47 kali faraday-server[8792]: 2019-11-23 23:22:47,028 - faraday.server.web - INFO {MainThread} [web.py:128 - __build_websockets_resource()]  Starting websocket server at port 9000 with bind add
Nov 23 23:22:47 kali faraday-server[8792]: 2019-11-23 23:22:47,029 - faraday.server.web - INFO {MainThread} [web.py:190 - run()]  Faraday Server is ready
Nov 23 23:22:52 kali faraday-server[8792]: 2019-11-23 23:22:52,278 - faraday.server - INFO {Thread-4} [__init__.py:41 - run()]  License status OK
lines 1-19/19 (END)

Steps to reproduce

  1. install faraday from deb using "dpkg -i faraday-client && dpkg -i faraday-server" after downloading
  2. init db, config db string, run migrations
  3. sudo systemctl start faraday-server and verify accessible via browser
  4. create a new workspace in web browser UI -- note it persists across server restarts
  5. faraday-client --login, login, and try to select a workspace
  6. note the error "No such file or directory, ~/.faraday/report/workspaceName"
  7. note that you're now back at the workspace selection screen

Expected results

Once you select a workspace in the client, you should not have any errors about "no such file or directory"

Debugging tracebacks (current results)

I'm unclear on how to get the server into debug mode, but this is on the client:

root@kali:/home/faraday/.faraday/report# faraday-client --login --debug

  _____                           .___
_/ ____\_____  ____________     __| _/_____   ___.__.
\   __\ \__  \ \_  __ \__  \   / __ | \__  \ <   |  |
 |  |    / __ \_|  | \// __ \_/ /_/ |  / __ \_\___  |
 |__|   (____  /|__|  (____  /\____ | (____  // ____|
             \/            \/      \/      \/ \/

[*[       Open Source Penetration Test IDE       ]*]
            Where pwnage goes multiplayer

2019-11-23 23:47:23,647 - faraday.client.start_client - INFO {MainThread} [start_client.py:408 - printBanner()]  Starting Faraday IDE.
2019-11-23 23:47:23,647 - faraday.client.start_client - INFO {MainThread} [start_client.py:359 - checkConfiguration()]  Checking configuration.
2019-11-23 23:47:23,647 - faraday.client.start_client - INFO {MainThread} [start_client.py:360 - checkConfiguration()]  Setting up plugins.
2019-11-23 23:47:23,647 - faraday.client.start_client - INFO {MainThread} [start_client.py:298 - setupPlugins()]  Removing old plugins folder.
2019-11-23 23:47:23,670 - faraday.client.start_client - INFO {MainThread} [start_client.py:362 - checkConfiguration()]  Setting up ZSH integration.
2019-11-23 23:47:23,670 - faraday.client.start_client - INFO {MainThread} [start_client.py:364 - checkConfiguration()]  Setting up user configuration.
2019-11-23 23:47:23,670 - faraday.client.start_client - INFO {MainThread} [start_client.py:339 - setupXMLConfig()]  Using custom user configuration.
2019-11-23 23:47:23,671 - faraday.client.start_client - INFO {MainThread} [start_client.py:366 - checkConfiguration()]  Setting up icons for GTK interface.
2019-11-23 23:47:23,680 - faraday.client.start_client - INFO {MainThread} [start_client.py:220 - setConf()]  Setting configuration.

Please enter the Faraday Server URL (Press enter for last used: http://localhost:5985): 

To login please provide your valid Faraday credentials.
You have 3 attempts.
Username (press enter for faraday): 
Password: 
Login failed, please try again. You have 2 more attempts
Username (press enter for faraday): 
Password: 
2019-11-23 23:47:39,498 - faraday.client.start_client - INFO {MainThread} [start_client.py:500 - doLoginLoop()]  Login successful: faraday
2019-11-23 23:47:39,921 - faraday.client.start_client - INFO {MainThread} [start_client.py:429 - checkUpdates()]  You have available updates. Run ./faraday.py --update to catchup!
2019-11-23 23:47:40,102 - faraday.client.start_client - INFO {MainThread} [start_client.py:252 - startFaraday()]  All done. Opening environment.
2019-11-23 23:47:40,103 - faraday.client.plugins.manager - ERROR {MainThread} [manager.py:100 - _loadPlugins()]  Plugins path could not be opened, no pluging will be available!
2019-11-23 23:47:40,198 - faraday.client.start_client - INFO {MainThread} [start_client.py:258 - startFaraday()]  Main application ExceptHook enabled.
2019-11-23 23:47:40,198 - faraday.client.start_client - INFO {MainThread} [start_client.py:261 - startFaraday()]  Starting main application.

* Faraday UI is ready
Point your browser to: 
[http://localhost:5985/_ui]

2019-11-23 23:47:40,198 - faraday.client.model.api - DEBUG {MainThread} [api.py:495 - devlog()]  Starting application...
2019-11-23 23:47:40,198 - faraday.client.model.api - DEBUG {MainThread} [api.py:495 - devlog()]  Setting up remote API's...
2019-11-23 23:47:40,198 - faraday.client.model.api - DEBUG {MainThread} [api.py:495 - devlog()]  starting XMLRPCServer with api_conn_info = ('localhost', 9876)
2019-11-23 23:47:40,199 - faraday.client.model.api - INFO {MainThread} [api.py:117 - _setUpAPIServer()]  XMLRPC API server configured on ('localhost', 9876)
2019-11-23 23:47:40,199 - faraday.client.model.api - DEBUG {MainThread} [api.py:495 - devlog()]  Starting model controller daemon...
2019-11-23 23:47:40,200 - faraday.client.model.api - DEBUG {MainThread} [api.py:495 - devlog()]  starting xmlrpc api server...
2019-11-23 23:47:40,218 - faraday.client.apis.rest.api - INFO {MainThread} [api.py:65 - startAPIs()]  REST API server configured on ('localhost', 9977)
2019-11-23 23:47:40,240 - faraday.client.model.api - DEBUG {MainThread} [api.py:495 - devlog()]  Faraday ready...
2019-11-23 23:47:40,509 - faraday.GTK - ERROR {Thread-7} [application.py:489 - background_process()]  Workspace metasploitable wasn't found
2019-11-23 23:47:42,939 - faraday.GTK - ERROR {Thread-8} [application.py:489 - background_process()]  [Errno 2] No such file or directory: '~/.faraday/report/catdog'
2019-11-23 23:47:45,382 - faraday.server - INFO {Thread-3} [__init__.py:41 - run()]  License status OK

Please attach the result of pip freeze > requirements_freeze.txt

adns-python==1.2.1
alembic==1.0.11.dev0
argcomplete==1.8.1
asn1crypto==0.24.0
atomicwrites==1.1.5
attrs==18.2.0
autobahn==17.10.1
Automat==0.6.0
Babel==2.6.0
backports-abc==0.5
backports.functools-lru-cache==1.5
BBQSQL==1.0
bcrypt==3.1.6
bdfproxy==0.0.0
beautifulsoup4==4.8.0
BlindElephant==1.0
blinker==1.4
bottle==0.12.15
cbor==1.0.0
certifi==2018.8.24
Chameleon==2.24
chardet==3.0.4
CherryTree==0.38.8
## FIXME: could not find svn URL in dependency_links for this package:
chirp===daily-20190718
Click==7.0
colorama==0.3.7
ConfigArgParse==0.13.0
configobj==5.0.6
configparser==3.5.0b2
constantly==15.1.0
construct==2.8.16
contextlib2==0.5.5
cryptography==2.6.1
cssselect==1.1.0
Cython==0.29.2
deprecation==2.0.6
dhcpig==0.0.0
distorm3==3.4.1
Django==1.11.23
dnslib==0.9.7
dnspython==1.16.0
docutils==0.15.2
easygui==0.96
EditorConfig==0.12.1
Elixir==0.7.1
entrypoints==0.3
enum34==1.1.6
et-xmlfile==1.0.1
feedparser==5.2.1
filedepot==0.5.2
Flask==1.0.2
Flask-BabelEx==0.9.3
Flask-Classful==0.14.1
Flask-KVSession==0.6.2
Flask-Login==0.4.1
Flask-Mail==0.9.1
Flask-Principal==0.4.0
Flask-Restless==0.17.0
Flask-Security==3.0.0
Flask-Session==0.3.1
Flask-SQLAlchemy==2.4.0
Flask-WTF==0.14.2
FormEncode==1.3.0
funcsigs==1.0.2
fuse-python==1.0.0
future==0.16.0
futures==3.3.0
GeoIP==1.3.2
gevent==1.3.7
gpg==1.12.0
greenlet==0.4.15
h2==3.0.1
hpack==3.0.0
html2text==2018.1.9
html5lib==1.0.1
httplib2==0.11.3
hupper==1.5
hyperframe==5.2.0
hyperlink==17.3.1
idna==2.6
impacket==0.9.19
importlib-metadata==0.19
incremental==16.10.1
ipaddress==1.0.17
IPy==0.83
itsdangerous==0.24
jdcal==1.0
Jinja2==2.10.1
jsbeautifier==1.6.4
jsonpickle==0.9.5
keyring==17.1.1
keyrings.alt==3.1.1
killerbee==1.0
ldap3==2.5.1
ldapdomaindump==0.9.1
lxml==4.3.3
lz4==1.1.0
M2Crypto==0.31.0
Mako==1.0.7
MarkupSafe==1.1.0
marshmallow==2.15.3
mechanize==0.2.5
mercurial==4.9
metaconfig==0.1.4a1
mimerender==0.6.0
more-itertools==4.2.0
msgpack==0.5.6
mysqlclient==1.3.10
netaddr==0.7.19
NfSpy==1.0
nplusone==1.0.0
numpy==1.16.2
olefile==0.46
openpyxl==2.4.9
packaging==19.0
paramiko==2.6.0
passlib==1.7.1
Paste==3.1.0
PasteDeploy==2.0.1
PasteScript==2.0.2
pathlib2==2.3.4
pcapy==0.10.8
peepdf==0.4.2
pefile==2019.4.18
pexpect==4.6.0
Pillow==6.1.0
plaster==1.0
plaster-pastedeploy==0.5
pluggy==0.12.0
prettytable==0.7.2
psycopg2==2.7.7
py==1.8.0
py-ubjson==0.14.0
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycairo==1.16.2
pycrypto==2.6.1
pycryptodomex==3.6.1
pycurl==7.43.0.2
pydns==2.3.6
pydot==1.4.1
pyenchant==2.0.0
Pygments==2.3.1
PyGObject==3.32.2
pygtkspellcheck==4.0.5
pyinotify==0.9.6
pylibemu==0.3.3
pymongo==3.7.1
pymssql==2.1.4
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyparsing==2.2.0
pypcapfile==0.12.1
pyperclip==1.6.4
pypng==0.0.20
PyQRCode==1.2.1
pyquery==1.2.9
pyramid==1.10.2
pyrit==0.5.1
pyscard==1.9.9
pyserial==3.4
PySocks==1.6.8
pysqlite==2.7.0
pytest==3.10.1
python-dateutil==2.7.3
python-editor==1.0.3
python-Levenshtein==0.12.0
python-magic==0.4.16
python-mimeparse==1.6.0
python-openid==2.2.5
python-slugify==3.0.2
python-snappy==0.5.3
pythonaes==1.0
PyTrie==0.2
pytz==2019.2
pyusb==1.0.2
PyV8==1.0.dev0
pyxdg==0.25
PyYAML==3.13
qrcode==6.1
repoze.lru==0.7
requests==2.21.0
rfidiot==1.0
roman==2.0.0
scandir==1.10.0
scapy==2.4.2
scgi==1.13
SecretStorage==2.3.1
selenium==3.14.1
service-identity==18.1.0
simplejson==3.16.0
simplekv==0.13.0
singledispatch==3.4.0.3
sip==4.19.18
sipvicious==0.2.8
six==1.12.0
soupsieve==1.9.2
speaklater==1.3
SQLAlchemy==1.3.1
sqlalchemy-schemadisplay==1.3
sqlparse==0.2.4
syslog-rfc5424-formatter==1.2.2
tcpwatch==1.3.1
Tempita==0.5.2
tornado==5.1.1
tqdm==4.28.1
translationstring==1.3
trollius==2.0.1
Twisted==18.9.0
txaio==2.10.0
typing==3.6.6
u-msgpack-python==2.1
Unidecode==1.1.1
urllib3==1.24.1
urwid==2.0.1
uTidylib==0.5
venusian==1.2.0
vinetto==0.7b0
volatility==2.6
waitress==1.2.0b2
webencodings==0.5.1
WebOb==1.8.5
websocket-client==0.53.0
WebTest==2.0.32
webunit==1.3.10
Werkzeug==0.14.1
wifite==2.2.5
wsaccel==0.6.2
WTForms==2.2.1
wxPython==3.0.2.0
wxPython-common==3.0.2.0
xmlbuilder==1.0
yara-python==3.10.0
zenmap==7.80
zim==0.69.1
zipp==0.5.2
zope.component==4.3.0
zope.deprecation==4.4.0
zope.event==4.2.0
zope.hookable==4.0.4
zope.interface==4.3.2

Configuration files

standard config files with connection_string for db

OS

Linux kali 5.2.0-kali2-amd64 #1 SMP Debian 5.2.9-2kali1 (2019-08-22) x86_64 GNU/Linux
chadfurman commented 4 years ago

wow I wrote this ticket after battling with this for 2 hours. 30 seconds after writing it, I thought to delete the /root/.faraday folder (now that the server has a /home/faraday/.faraday folder) and it works fine.