Skip to content

Work with Stix2 and ATT&CK #543

Open
@dynamic-modeller

Description

@dynamic-modeller

Hi,

I am enjoying working with your library, thanks for writing it. However i want to clariy how to work with ATT&CK.

Now one great feature is, if i import stix 2.1 data, (using python's json.load()) i can ensure that i only`have stix-compliant data, by parsing the bundle and each object without any flags set. In this case, any non-standard properties, or objects cause the parsing operation to fail. If I want to allow custom properties, then if i set the flag, enable_custom=True, then it:

  1. enables parsing of packets with custom objects and proeprties
  2. creates those custom classes as part of the parsing operation

But what if I want to load and work with ATT&CK? At the moment there is no flag to enable ATT&CK-only objects and properties, and one assumes that i would need to use the enable_Custom=True flag., thereby ATT&CK data cannot be easily checked for consistency/compatibility with the standard.

However, when one checks the ATT&CK Stix2 documentation, this flag is never used (https://github.com/mitre-attack/attack-stix-data/blob/master/USAGE.md#accessing-attck-data-in-python). Instead they use the Memory Store and the load_from_file method

from stix2 import MemoryStore

src = MemoryStore()
src.load_from_file("enterprise-attack/enterprise-attack.json")

All of the code examples they then use, access all of the variables and custom objects without a problem.

How does this work? I thought the intent of the library was to ensure stix standard data only, but this could be extended using enable custom flags? Yet this example shows i do not need to use those flags to import ATT&CK data which is mightily confusing.

Can you advise the best practice way to load in ATT&CK data, make sure it is correct, and then query it? Is it only the parsing library that requires the enable_custom=True flag,? If i implement a data source/sink, with a load_from_file method, should it be able to import either Stix or ATT&CK data? What about other custom variants? How should i best setup parsing and a typedb data source/sink to handle both Stix 2.1 and ATT&CK?

Can you advise please, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions