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

Some payloads coming from Atomic Red team are marked as "Manual" #46

Open
SamuelHassine opened this issue Oct 17, 2024 · 10 comments · May be fixed by OpenBAS-Platform/openbas#1867
Open
Assignees
Labels
bug use for describing something not working as expected
Milestone

Comments

@SamuelHassine
Copy link
Member

Description

image

https://filigran.obas.filigran.io/admin/payloads

Should be "community"

@SamuelHassine SamuelHassine added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Oct 17, 2024
@EllynBsc EllynBsc removed the needs triage use to identify issue needing triage from Filigran Product team label Oct 28, 2024
@EllynBsc EllynBsc added this to the Release 1.9.0 milestone Oct 28, 2024
@savacano28 savacano28 self-assigned this Oct 28, 2024
@savacano28 savacano28 removed their assignment Oct 29, 2024
@johanah29
Copy link
Member

Hello @EllynBsc and @jborozco
After investigation, it turns out that the payloads mentionned earlier do no longer exist in the atomic red team folder. We now need to figure out what we should when such an event happens. We have three options:

  • Delete the payload from the database
  • Keep the payload with a "deprecated" or "no longer exist" flag
  • Keep things unchanged

@johanah29 johanah29 added the needs more info use to identify issue needing additional info to be triaged or solved label Oct 31, 2024
@EllynBsc
Copy link
Member

EllynBsc commented Oct 31, 2024

Hi @johanah29 👋

2 solutions here IMO:

👉 Solution 1: Keep the payload with a "deprecated in version XX" flag, i think it's important to state to our user that it's deprecated in the current repo version of Atomic Red Team we're using but it might not be the case in a previous version.

👉 Solution 2: Delete the payload from the database, IMO it's not useful for the user to end up on a payload that does not exist in the atomic red team folder. And we should also specify what version of Atomic red team we're using.

=> I'd say we go for solution 1 for now, and then if we realize that atomic red team updates a lot and we end up with a ton of payloads deprecated then we can put solution 2 in place. WDYT ?

@jborozco
Copy link

jborozco commented Nov 4, 2024

@johanah29 @EllynBsc Hello, I would say let's delete the payload to make sure our offer is reflecting functioning payloads.

@jborozco jborozco removed the needs more info use to identify issue needing additional info to be triaged or solved label Nov 4, 2024
@EllynBsc
Copy link
Member

EllynBsc commented Nov 4, 2024

Hi @jborozco 👋

Good for me!

@RomuDeuxfois
Copy link
Member

RomuDeuxfois commented Nov 12, 2024

Solution 2: If we delete the payload, the user might end up with a scenario/simulation/atomic test that no longer exists (possibly while it’s still running), leading to unpleasant surprises.

Proposals:
-> Retain the payload in "read-only" mode (it can no longer be used but can be duplicated) – more complex

-> Convert it to a manual payload (removing all links with Atomic Red Team) with a "deprecated" tag? – easier to implement

  1. Duplicate the payload, add the "deprecated" tag, change the source from "community" to "manual"
  2. Delete the original payload

Technical brainstorm:

Collector side

  1. Call the API with all payloads (batch process with a boolean flag to mark as "clean" or "not clean")
  2. OpenBAS platform -> If it doesn’t exist: create it; if it does exist: update it; if removed: duplicate it

Should we apply this approach to the MITRE ATT&CK collector as well?

@helene-nguyen & @flavienSindou
How do you handle the case on your side when the MITRE matrix changes and a phase or an attack pattern is removed? For your MITRE ATT&CK connector.

@EllynBsc
Copy link
Member

EllynBsc commented Nov 12, 2024

As discussed during our R&D call, @RomuDeuxfois let's:

-in the UI, display the 'deprecated' tag for the payload not existing (nothing to do in DB)
-some infos in the UI for the possibility to delete the payload (based on updated date and connector updated)

TBD in the longer run, a more generic approach for the payloads deprecated

@johanah29 johanah29 removed their assignment Nov 13, 2024
@RomuDeuxfois RomuDeuxfois removed their assignment Nov 14, 2024
@isselparra isselparra self-assigned this Nov 15, 2024
@EllynBsc
Copy link
Member

@isselparra @jborozco @RomuDeuxfois quick recap for the logic of status + sources of our payloads:

  • Logic for our payloads status:

    Verified: OpenBAS ensures that the payload works correctly.

    Unverified: OpenBAS has not verified it; the payload may or may not work.

    Deprecated: The source has deprecated the payload, but OpenBAS has kept a record of it; the payload may or may not work.

  • Logic for the payloads sources:

    Community: Comes from an external source.

    Manual: Custom payload.

    OpenBAS (our filigran payloads library repo later): Comes from our repository.

@isselparra
Copy link
Member

isselparra commented Nov 15, 2024

After looking at the code on the Atomic Red Team collector, one can see that the payload_source with the value COMMUNITY was set at the beginning of July
Image

On testing, we can see that the Payload indicated as MANUAL was last updated on June and its collector on November:
Payload: Driver Enumeration using DriverQuery
Updated: Jun 28, 2024, 2:15:00 PM
Collector: Atomic Red Team
Collector last update: Nov 15, 2024, 5:20:43 PM

On https://filigran.obas.filigran.io/, the Payload indicated as MANUAL from the Atomic Red Team collector was last updated on June also and its collector on November:
Payload: Driver Enumeration using DriverQuery
Updated: Jun 27, 2024, 2:58:48 PM
Collector: Atomic Red Team
Collector last update: Nov 15, 2024, 5:21:29 PM

For me, we need to make sure that our data is coherent.

I propose a migration that addresses the two problems we have:

  • Set payload source as COMMUNITY if from a collector, instead of MANUAL
  • Set status as DEPRECATED when a community payload was updated before the update of the collector (proposed interval: one week)

OpenBAS-Platform/openbas#1867

This is the result on the UI, note the filter on the status with DEPRECATED and the enabling of the Delete option but with the Update disabled.
Image

@isselparra
Copy link
Member

For the longer run, for the payloads depreciation, one approach could be that the Collector at the end of processing all the payloads, provide to the OBAS platform all the updated external IDs and on the OBAS side, based on this list, deprecate the necessary payloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected
Projects
None yet
7 participants