Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run BaseObfuscator - Web UI Not Loading #2943

Open
wilczekj opened this issue Apr 10, 2024 · 7 comments
Open

Failed to run BaseObfuscator - Web UI Not Loading #2943

wilczekj opened this issue Apr 10, 2024 · 7 comments
Assignees
Labels

Comments

@wilczekj
Copy link

Describe the bug
When deploying an operation that makes use of the steganography Obfuscator, the web UI becomes unresponsive and I cannot log back in without a refresh. This has happened for me now on both 4.2.0 and 5.0.0.

To Reproduce
Steps to reproduce the behavior:

  1. Create an operation
  2. Choose steganography for the Obfuscator
  3. Deploy

Expected behavior
For steganography to work. If there is an underlying package or config needed, there should be some error or documentation.

Screenshots
Image shows the UI spinning and not loading after trying to use Steganography Obfuscator.
image

Desktop (please complete the following information):

  • OS: Caldera 4.2.0 on Ubuntu 22.04
  • Browser: Chrome Version 123.0.6312.106 (Official Build) (64-bit) and Edge Version 123.0.2420.81 (Official build) (64-bit)
  • Version: 4.2.0

Additional context
Error logs when the UI is unresponsive.

2024-04-10 19:14:37 - ERROR (base_obfuscator.py:21 run) Failed to run BaseObfuscator, returning default decoded bytes
2024-04-10 19:14:37 - DEBUG (connectionpool.py:978 _new_conn) Starting new HTTPS connection (1): aws.random.cat:443
2024-04-10 19:16:48 - ERROR (base_obfuscator.py:21 run) Failed to run BaseObfuscator, returning default decoded bytes
2024-04-10 19:16:48 - DEBUG (connectionpool.py:978 _new_conn) Starting new HTTPS connection (1): aws.random.cat:443
2024-04-10 19:18:59 - ERROR (base_obfuscator.py:21 run) Failed to run BaseObfuscator, returning default decoded bytes
2024-04-10 19:18:59 - DEBUG (connectionpool.py:978 _new_conn) Starting new HTTPS connection (1): aws.random.cat:443
2024-04-10 19:21:13 - ERROR (base_obfuscator.py:21 run) Failed to run BaseObfuscator, returning default decoded bytes
2024-04-10 19:21:13 - DEBUG (connectionpool.py:978 _new_conn) Starting new HTTPS connection (1): aws.random.cat:443

Running a tcpdump shows traffic flowing to port 8888, but caldera is unresponsive.

Copy link

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/

@Guil33
Copy link

Guil33 commented Apr 11, 2024

I am unable to reproduce this behavior on Edge 123.0.2420.81 & Chrome 123.0.6312.123 with Caldera v5. Does it happen with any adversary, or maybe a specific one?

@wilczekj
Copy link
Author

wilczekj commented Apr 11, 2024

It happens with any Operation using any Adversary. Are there any additional logs I can look at?

@Guil33
Copy link

Guil33 commented Apr 11, 2024

You already have the server in Debug mode, so none that I know of. However, you could probably try to debug manually, the base_obfuscator.py file is very small, and in fact there are 3 possible lines for your error.

For starters, maybe just modify lines 20/21 to see what's happening, e.g.:

except Exception as e:
    logging.error('Failed to run BaseObfuscator, returning default decoded bytes. Error: ', e)

@Guil33
Copy link

Guil33 commented Apr 11, 2024

I find it weird that it happens so consistently on your instance while I can not see it. Did you customize any part of the code?

EDIT: on a fresh codebase, no configuration nor code change, this doesn't happen to me.

@wilczekj
Copy link
Author

Are you on Ubuntu 22.04?

I performed an install exactly per the docs for version 5.0.0 and then experienced a ton of issues (some of which are currently tracked as issues, others were not)
Example issues on 5.0.0 (both of which were solved using the suggested steps)

After all the issues with 5.0.0, I created a new Ubuntu 22.04 VM and installed 4.2.0 where I encountered many of the same issues.

In both instances, this was a base Ubuntu install with no other packages/installations installed beyond those requested in the Caldera install instructions (which are very, very minimal - meaning it's 4 commands, copy/pasted to the command line - not sure how I would have messed that up twice).

@Guil33
Copy link

Guil33 commented Apr 12, 2024

I'm on Ubuntu (Server) 22.04, the only issue I encounter when following the README (I think the docs are outdated) is for the remote access, solved in #2885.

Assuming we have the same code, I can only imagine a difference in the dependencies. I had some trouble with vue when I upgraded to V5 (right when it got released), a guy on Slack gave this which ended up working for me:

FYI all, I was able to get a functional caldera v5 with the following installation steps on a fresh ubuntu 22.04:
1) Install git\python\pip\virtualenv
sudo apt update && sudo apt upgrade -y && sudo apt install python3-venv python3-dev npm git -y
2) Update Node & NPM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm install stable
3) Download Caldera
git clone https://github.com/mitre/caldera.git --recursive
4) Create environment & activate
cd caldera
python3 -m venv venv
source venv/bin/activate
5) Install requirements
pip install -r requirements.txt
pip install donut-shellcode==1.0.2
6) Install Go & UPX
sudo snap install go --classic && sudo snap install upx
7) Run caldera
python3 server.py --insecure --build 

Here are my versions:

  • Python 3.10.12
  • node v21.6.2
  • go v1.22.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants