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

<"x_mitre_is_subtechnique": false> field is missing for most of the techniques. #24

Open
shankararavind opened this issue Jul 29, 2022 · 1 comment
Assignees

Comments

@shankararavind
Copy link

No description provided.

@slincoln-aiq
Copy link

Bumping this, as it conflicts with documentation here and threw me for a loop for a bit.

An example of a technique with this field missing is T1615 - Group Policy Discovery.

If using example code from the documentation, one could query for this specific technique with the following Filters:

query_results = src.query([
    Filter('type', '=', 'attack-pattern'),
    Filter('x_mitre_is_subtechnique', '=', False),
    Filter('external_references.external_id', '=', 'T1615')
])

Which returns a list of length 0

However, when removing the x_mitre_is_subtechnique filter:

query_results = src.query([
    Filter('type', '=', 'attack-pattern'),
    Filter('external_references.external_id', '=', 'T1615')
])

This returns the result as expected, and without the x_mitre_is_subtechnique field.

The workaround I am using now to filter out subtechniques is to not include the x_mitre_is_subtechnique filter, then use Python's built-in filter() function to filter out subtechniques after the query:

techniques = src.query(Filter("type", "=", "attack-pattern"))
only_techniques = list(filter(lambda x: not x.get('x_mitre_is_subtechnique', False), techniques))

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

No branches or pull requests

3 participants