TransportSocket object has no attribute 'send'
ansiballZ opened this issue · 2 comments
Describe the bug
When deploying the Manx agent (Windows and Linux), the agent will connect to the C2 and after a while it will show dead although it is still beaconing out.
When running Caldera with Debug I receive a transport error. Tested with ragdoll and sandcat agents and those remained "alive."
To Reproduce
Steps to reproduce the behavior:
- Start the caldera server (python3 server.py --insecure -l DEBUG)
- Deploy Manx agent
Expected behavior
Agent remains alive and trusted while beaconing.
Desktop (please complete the following information):
- OS: [e.g. Mac, Windows, Kali] Kali Linux
- Browser [e.g. chrome, safari] Chrome
- Version [e.g. 2.8.0] 5.0.0
Additional context
Add any other context about the problem here.
The issue is that the TransportSocket class, which is from the core Python library asyncio and had deprecated a number of methods from trsock.py that were used in contact_tcp.py in Python 3.8. They were then removed from the class in Python 3.11. You can see the changes here. Affected methods that are used by TransportSocket include:
- send
- recv
To work around the issue, you can use an older version of Python that is supported by Caldera, such as Python 3.9.
I posted a possible workaround for Python3.11+ at:
#3072