mitre / magma

MITRE Caldera's user interface plugin powered by VueJS
Apache License 2.0
2 stars 6 forks source link

Feature - Manage payloads #54

Closed jbaptperez closed 5 days ago

jbaptperez commented 1 month ago

This is the GUI part of the payload management, which depends on the Caldera PR #2989.

elegantmoose commented 2 weeks ago

@jbaptperez reviewing and testing today. Apologies for delay.

elegantmoose commented 2 weeks ago

@jbaptperez How hard would it be also show all the payloads loaded in the Caldera, and then have just the local ones the user uploaded have the the ability to delete?

*might be useful to show all the payloads (and their source plugins) in the table as well. Or we should make it clear on the payloads view, that it is ignoring all loaded payloads from plugins.

elegantmoose commented 2 weeks ago

Tested on Mac. All functionality works as described.

jbaptperez commented 2 weeks ago

@jbaptperez How hard would it be also show all the payloads loaded in the Caldera, and then have just the local ones the user uploaded have the the ability to delete?

*might be useful to show all the payloads (and their source plugins) in the table as well. Or we should make it clear on the payloads view, that it is ignoring all loaded payloads from plugins.

@elegantmoose, I made the changes you asked for.

Technically, I had to use complete relative paths to payloads returned by the API (the GET new parameters I added in the previous caldera PR). Then, I processed the returned paths at the frontend side to properly extract the plugins name, whether the payload belongs or not to a plugin, etc. This kind of data process may be directly done at the backend side, but this would imply an API breaking change and (above all) a new PR on both caldera and magma repository: Too long.

elegantmoose commented 1 week ago

This LGTM, just that one new comment I left above, and then the move the payloads under the Configuration menu.

jbaptperez commented 1 week ago

This LGTM, just that one new comment I left above, and then the move the payloads under the Configuration menu.

@elegantmoose, done and rebased.

I also fixed the upload modal width (insufficient when using files with long names) and, as I just discovered there were another existing upload modal in the adversaries view, I adapted the payload one for consistency.

elegantmoose commented 5 days ago

@jbaptperez Thank you. 👏 Great PR.