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

VIRTS-3996 Add everything adversary #2563

Merged
merged 5 commits into from
Jul 22, 2022

Conversation

sgianvecchio
Copy link
Contributor

Description

This change adds a new "everything" adversary with all adversary abilities. The everything adversary is automatically created during startup and updated whenever abilities are created or deleted via the UI.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Launched Caldera and confirmed all adversary abilities show up under everything adversary
  • Ran operations with atomic and batch planners, confirmed both work as expected
  • Ran operations on Windows, Linux and Mac hosts

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

* Create everything adversary during startup

* Update everything adversary when abilities are created or deleted via UI
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wohoo! Your first PR -- thanks for contributing!

@elegantmoose
Copy link
Contributor

elegantmoose commented May 4, 2022

@sgianvecchio super clean. I still need to test locally.

@CDJellen
Copy link
Contributor

I'll echo @elegantmoose 's comments, the code is clean and parsimonious.

In performing some local testing, I've noticed a few behaviors which may be worth verifying and documenting.
The "Everything Bagel" Adversary:

  • Abilities under the adversary object appear to be grouped first by their source plugin (e.g. access or stockpile) and then by their tactic (e.g. discovery or multiple).
  • The order of the constituent abilities (and thus the atomic_order) appears to depend on the order in which abilities are located by the data_svc. As an example, abilities from the pathfinder plugin may appear above or below abilities from the access plugin between different sessions if the --fresh flag is applied on server startup.
  • New abilities created through the UI or API are appended to the end of the "Everything Bagel" adversary as soon as they are saved with the data_svc.

Additional Thoughts:
This PR will fulfill the stated requirements of the "Everything Bagel" adversary. Adding these new methods directly to the data_svc has benefits in ensuring new abilities are registered and all abilities from across all plugins are included (these results may be harder to achieve if this were implemented in a plugin).

If, in the future, it is determined that there is a better place for these changes to live, we can discuss options. For now, the PR looks great to me, and I have identified no issues or edge cases in testing.

Thank you for this excellent first PR @sgianvecchio !

@sonarcloud
Copy link

sonarcloud bot commented May 26, 2022

Please retry analysis of this Pull-Request directly on SonarCloud.

@elegantmoose elegantmoose added the vesuvius vesuvius label May 31, 2022
@github-actions
Copy link

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions
Copy link

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 5 days

@sonarcloud
Copy link

sonarcloud bot commented Jul 21, 2022

Please retry analysis of this Pull-Request directly on SonarCloud.

@sonarcloud
Copy link

sonarcloud bot commented Jul 21, 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

90.0% 90.0% Coverage
0.0% 0.0% Duplication

@elegantmoose elegantmoose merged commit 594a217 into master Jul 22, 2022
@elegantmoose elegantmoose deleted the virts-3996-everything-adversary branch July 22, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vesuvius vesuvius
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants