Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix command modal for manual commands #2668

Merged
merged 4 commits into from
Oct 10, 2022
Merged

Conversation

argaudreau
Copy link
Contributor

Description

When viewing the command for a manual command in an operation, the "Obfuscated" and "Plaintext" command outputs didn't always make sense, even if obfuscation wasn't used. This PR ensures that the command is always accurately displayed, as the user entered it.

Worth noting that we're still aware that command and plaintext_command as returned from the API are always base64 encoded. i.e., if no obfuscation is used, command and plaintext_command will be base64 obfuscated, but they will equal each other. When they don't equal each other, it means obfuscation was used. The View Command modal in the UI will always decode those commands for you.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Running a command with an adversary and adding a manual command showed the correct command in the View Command modal each time.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@sonarcloud
Copy link

sonarcloud bot commented Oct 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@argaudreau argaudreau merged commit 7873cad into master Oct 10, 2022
@argaudreau argaudreau deleted the manual-command-cmd-display branch October 10, 2022 19:52
Aledangelo pushed a commit to secureware-srl/caldera that referenced this pull request Apr 28, 2023
* Fix command display modal for manual commands

Co-authored-by: Chris Lenk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants