-
Notifications
You must be signed in to change notification settings - Fork 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:
![vmware_aeep0UETSO](https://private-user-images.githubusercontent.com/25093410/255784940-8e5c2468-98f6-4fe3-a601-1c107e34c3be.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NTI5NDMsIm5iZiI6MTcyNDU1MjY0MywicGF0aCI6Ii8yNTA5MzQxMC8yNTU3ODQ5NDAtOGU1YzI0NjgtOThmNi00ZmUzLWE2MDEtMWMxMDdlMzRjM2JlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDAyMjQwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3YzViMGY4ZGIxYWY1YTAyYWVlNjM3OGIwM2ZlZGEzYTU1ZjkwZDE0MTk5M2M5N2QyMDIyNGNkYjc4MGQ0MDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4HGLun4AXllbeeXxVlFa89jjLwoGGl3JQcOwGHwDFGQ)
And this version, which should compile HelloWorld.cs, failed for some reason.
![vmware_1ybN9nAQTo](https://private-user-images.githubusercontent.com/25093410/255785010-9230ec6a-1f15-45eb-84c3-1f18ef74ebd2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NTI5NDMsIm5iZiI6MTcyNDU1MjY0MywicGF0aCI6Ii8yNTA5MzQxMC8yNTU3ODUwMTAtOTIzMGVjNmEtMWYxNS00NWViLTg0YzMtMWYxOGVmNzRlYmQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDAyMjQwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRlOTUzZTVkM2U0NGUxZTM1ZGJlNjAzNmM2Y2I1MjgzZTZhNmQ1ZDZjZWVhMjIzMGE4MGU4M2QzZTUyZTZmNjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IwufT0nFXHlcygUn0JoThjlgWrO-uAaoHsLfBNvSngg)
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: