Skip to content

VIRTS-3996 Add everything adversary#2563

Merged
mkultraWasHere merged 5 commits into
masterfrom
virts-3996-everything-adversary
Jul 22, 2022
Merged

VIRTS-3996 Add everything adversary#2563
mkultraWasHere merged 5 commits into
masterfrom
virts-3996-everything-adversary

Conversation

@sgianvecchio
Copy link
Copy Markdown
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
Copy Markdown

@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!

@mkultraWasHere
Copy link
Copy Markdown
Contributor

mkultraWasHere commented May 4, 2022

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

@CDJellen
Copy link
Copy Markdown
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 !

@sonarqubecloud
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

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 github-actions Bot added the no-pr-activity Needs Attention label Jun 21, 2022
@github-actions github-actions Bot closed this Jun 26, 2022
@sgianvecchio sgianvecchio reopened this Jun 26, 2022
@sgianvecchio sgianvecchio removed the no-pr-activity Needs Attention label Jun 26, 2022
@github-actions
Copy link
Copy Markdown

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 github-actions Bot added the no-pr-activity Needs Attention label Jul 17, 2022
@mkultraWasHere mkultraWasHere removed the no-pr-activity Needs Attention label Jul 18, 2022
@sonarqubecloud
Copy link
Copy Markdown

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

@sonarqubecloud
Copy link
Copy Markdown

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

@mkultraWasHere mkultraWasHere merged commit 594a217 into master Jul 22, 2022
@mkultraWasHere mkultraWasHere 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants