POC: Returning the http server location instead of the C2 connection string in the agent profile #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A fix for the behavior seen in mitre/caldera#2165
The way things currently run, the C2 connection string is what gets returned in the agent profile to the server, which is used to construct the agent object. The C2 string is nice to have, but places of replacement of
#{server}
in abilities are expecting the http server, so that seems the more appropriate value to send back.Ideally we would send back both the http server and the connection strings, so that we could send payloads back and initialize agents with the same C2 channels. This all is more involved as P2P agents beacon in as upstream agents will have to implement web servers for file uploads and C2 channels for communications (all this work is done already for sandcat and it works in this specific way)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Tested the same scenario as the issue, and was able to reproduce it, then implement a fix that populates out the ability values correctly.
Checklist: