mitre / magma

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

Bug: Potential Link Executor Selection #56

Closed d3vco closed 2 weeks ago

d3vco commented 1 month ago

Description

This issue is identical to Caldera v4.2's issue #2842.

When adding a Potential Link to an operation, links are matched on executor name only. This has the potential of selecting an executor platform that does not match the agent's platform.

To Reproduce

Steps to reproduce the behavior:

  1. Fresh install Caldera v5 with stockpile plugin included
  2. Deploy an agent to a linux platform
  3. Start a new operation
  4. Open the add potential link modal
  5. Select the linux agent
  6. Select the "sh" executor
  7. Search for and select the "Parse ssh config" ability
  8. Observe that the command populated on the next screen is the darwin specific command (pip install stormssh && storm list)

Expected Behavior

Following the steps above, the pre-populated command should be the linux command: pip install -q stormssh 2> /dev/null && storm list | sed 's/\x1b\[[0-9;]*m//g'

Fix

Bugfix created. Will submit PR.