mitre / caldera

Automated Adversary Emulation Platform
https://caldera.mitre.org
Apache License 2.0
5.49k stars 1.05k forks source link

Issue with running Caldera on Kali #3028

Open barelyaveragedev opened 1 month ago

barelyaveragedev commented 1 month ago

Summary:

When installing caldera on the Kali 2024.4 post updating and upgrading, I encounter the below errors when running the caldera command:

Errors and Screenshots:

Image 2024-07-26 at 16 29 20_79f31935

Text Output of error encountered:

Traceback (most recent call last): File "/usr/share/caldera/server.py", tine 8, in import aiohttp_apispec File "/usr/1ib/python3/dist-packages/aiohttp_apispec/ init .py", line I, in from .aiohttp_apispec import AiohttpApispec, setup_aiohttp_apispec File "/usrAib/python3/dist-packages/aiohttp_apispec/aiohttp_apispec.py", line 10, in from apispec . ext .marshmallow import MarshmallowP1ugin, common File "/usrAib/python3/dist-packages/apispec/ext/marshma110w/ init .py", line 85, in from .openapi import OpenAPIConverter File "/usr/1ib/python3/dist-packages/apispec/ext/marshma110w/openapi .py", line 28, in from . field_converter import FieldConverterMixin File "/usrAib/python3/dist-packages/apispec/ext/marshma110w/fie1d_converter.py", line 41, in marshmallow. fields .IP: ("string" , AttributeError: module 'marshmallow. fields' has no attribute 'IP'

Steps to replication of issue:

  1. Fresh installation of Kali Linux
  2. sudo apt update && sudo apt upgrade ran
  3. sudo apt install caldera command ran and completed without error
  4. cd to /user/share/caldera
  5. run caldera command
  6. error displayed.

Steps attempted to remediate issue:

  1. Python version checked: 3.11.9
  2. Pip version checked: 24.1.1
  3. pip install aiohttp: completed successfully
  4. pip install marshmallow: returned requirement already satisfied.

Any assistance and advice on what I am doing wrong would be appreciated.

github-actions[bot] commented 1 month ago

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

elegantmoose commented 1 month ago

Thats odd. The only thing I can think of is if you have multiple python environments and the wrong one is being used.

And you also checked that aiohttp_apispec is right version?

c/p from Caldera requirements.txt:

aiohttp==3.9.3
aiohttp_session==2.12.0
aiohttp-security==0.4.0
aiohttp-apispec==3.0.0b2
cfzq088 commented 1 month ago

NodeJS v16 or later (for Caldera v5) GoLang 1.17+ (for optimal agent functionality) Maybe you should check whether you have installed npm and Go-lang in Kali, then run the command again.

barelyaveragedev commented 1 month ago

Hi all,

I'm sorry for the delay.

So I checked for other virtual environments using the command locate -b '\\activate' | grep "/home" , but I couldn't find any evidence of other virtual environments.

I then ran the commands to check the versions of the various aiohttp requirements, and the below was outputted:

image

I then checked the NodeJS, NPM and GoLang versions installed:

image

I then reinstalled caldera using sudo apt install caldera, but I received the same error message:

image

mgonzcast commented 1 week ago

In my case using Kali 2024.2 I am getting the following error when starting caldera:

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/config.py", line 509, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/caldera/plugins/fieldmanual/sphinx-docs/conf.py", line 28, in <module>
    import_plugin_docs(caldera_root_dir, sphinx_root_dir)
  File "/var/lib/caldera/plugins/fieldmanual/sphinx-docs/../../../plugins/fieldmanual/utils/plugin_docs.py", line 24, in import_plugin_docs
    doc_paths = copy_plugin_docs(caldera_root_dir, sphinx_root_dir)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/caldera/plugins/fieldmanual/sphinx-docs/../../../plugins/fieldmanual/utils/plugin_docs.py", line 51, in copy_plugin_docs
    copied_files = copy_tree(plugin_docs_dir, sphinx_plugin_dir)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/caldera/plugins/fieldmanual/sphinx-docs/../../../plugins/fieldmanual/utils/plugin_docs.py", line 17, in copy_tree
    before = set(glob.iglob(f"{dst}/**", recursive=True))
                 ^^^^
NameError: name 'glob' is not defined
elegantmoose commented 4 days ago

@mgonzcast what python version are you using?

elegantmoose commented 4 days ago

@barelyaveragedev I missed this the first time but I wouldnt use apt to install Caldera. We only recommend cloning directly from the repo. See README.