Websocket Profile Updates #423
sysophost
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a bid to make the Websocket C2 profile more robust I have added support for multiple callback hosts (similar to HTTPX) and added handling logic for this in Poseidon.
This differs from the multiple callback hosts implemented in HTTPX which can rotate hosts for every request, callback host rotation is only used at the time the initial websocket connection is established or any time there is a connection retry. The callback hosts array can be manually rotated/updated via the
update_c2
command in Poseidon for running agents.Changes
callback_host
andcallback_port
withcallback_hosts
which consumes an array of hosts in the formatws[s]://foo.bar[:8080]
to attempt for callback connections.domain_rotation_method
to dictate how callback domains are selected fromcallback_hosts
(currently this isfall-back
orrandom
)domain_rotation_delay
to define a delay in seconds between attempts to communicate with callback domains.domain_rotation_failure_threshold
to define a failure threshold, i.e number of allowed failures for a given callback domain before it is removed fromcallback_hosts
.USER_AGENT
anddomain_front
withheaders
which provides an array for custom headers. Currently this defaults to includinguser-agent
andhost
but any other headers can be specified here.ENDPOINT_REPLACE
withendpoint
this is literally just a rename of this param to align with the rest of the params.Future Plans
Update
endpoint
to perform similarly tocallback_hosts
to support multiple endpoints. This would ideally use something akin todomain_rotation_method
to provide multiple methods for selecting an endpoint.Right now these are maintained in private forks of Websocket and Poseidon due to the number of breaking changes this introduces. At some point I would like to make these changes available to merge.
Beta Was this translation helpful? Give feedback.
All reactions