-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can't enable Builder plugin: Error enabling plugin=builder, request() got an unexpected keyword argument 'chunked' #2793
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Hey @heyquentin did you ever get this figured out? I opened PR mitre/builder#23 that resolves the chunked issues with Docker-Py. However, I cannot seem to get a payload generating dynamically with the builder plugin based on the example here (https://caldera.readthedocs.io/en/latest/Dynamically-Compiled-Payloads.html#basic-example) or yours. Any further luck debugging this? |
Do you have this specific version of the requests module: (pip install requests==2.29.0). I'm running Caldera in a virtual environment which I think is nice for stuff like this. This is what I have in my notes for setup. I've used these notes to setup Caldera on a few machines and I think they should be good to go. See if there's any differences between your env:
I also made notes specifically on this problem (I take notes on everything that takes me more than 30 seconds to fix lol) See if these help you:
|
Thanks for the quick reply! Interesting you mention using requests here. I was able to resolve the issue of builder not starting by upgrading docker-py and did not have to touch requests. But I think both are "fixes" to the problem. Ultimately we are running into a dependency issue that will need to get resolved. Either the urllib/requests needs to be sorted out or docker-py needs to be bumped to accommodate the issue. Anyway, getting the builder plugin enabled was not my issue. My issue was trying to figure out why the payload was not generating. I realized after following the code that the actual payload generation is not triggered unless and until the ability is linked in an actual operation under the planning service ( caldera/app/service/planning_svc.py Line 356 in cdb3d58
access plugin and therefore the executor.HOOK to generate the payload and command was never actually being triggered. So for those scratching their head at this, make sure you are running your abilities in an actual operation and not in a one-off setting such as access plugin!
|
I wanted to try out Caldera's dynamically compiled payloads so I read the docs and set up my abilities but nothing was happening. Eventually I clued in to the plugin not being actually enabled but when I tried to enable it I got the following error when starting up the server:
2023-07-24 17:39:18 - ERROR (c_plugin.py:70 enable) Error enabling plugin=builder, request() got an unexpected keyword argument 'chunked'
So I started putting debug strings in the plugin's hook.py, build_svc.py and c_plugin.py and eventually I figured out it had something to do with Docker. I did some digging and found this: docker/docker-py#3113
I do not have docker-py installed but once I set requests to 2.29.0 (pip install requests==2.29.0) the docker images started downloading. When you make an ability then check out the yml file, the format is a little different than the example format on the builder plugin's github page. This is what worked for me:
And this version, which should compile HelloWorld.cs, failed for some reason.
It looks like it created the exe but didn't xfer it to the target system? Idk, will play with it and see if I can get it working.
The text was updated successfully, but these errors were encountered: