How to use the pyattck.tools.AttckTools function in pyattck

To help you get started, we’ve selected a few pyattck examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swimlane / pyattck / pyattck / pyattck.py View on Github external
def tools(self):
        """Creates AttckTools objects
        
        Returns:
            (AttckTools) -- Returns a list of AttckTools objects
        """
        tools_list = []
        for tools in self.attck['objects']:
            if (tools['type'] == 'tool'):
                tools_list.append(AttckTools(attck_obj=self.attck, **tools))
        return tools_list
github swimlane / pyattck / pyattck / actor.py View on Github external
def tools(self):
        '''Returns all tool object as a list that are documented as being used by an Actor or Group'''
        from .tools import AttckTools
        tools_list = []
        for item in self.attck_obj['objects']:
            if 'source_ref' in item:
                if self.stix in item['source_ref']:
                    for o in self.attck_obj['objects']:
                        if o['type'] == 'tool':
                            if item['target_ref'] in o['id']:
                                tools_list.append(AttckTools(**o))
        return tools_list
github swimlane / pyattck / pyattck / tools.py View on Github external
def __init__(self, attck_obj = None, **kwargs):
        """Creates an AttckTools object.  
           The AttckTools object is based on software which have been categorized as software used in attacks
        """

        self.attck_obj = attck_obj

        self.id = super(AttckTools, self)._set_id(kwargs)
        self.name = super(AttckTools, self)._set_attribute(kwargs, 'name')
        self.alias = super(AttckTools, self)._set_attribute(kwargs, 'aliases')
        self.description = super(AttckTools, self)._set_attribute(kwargs, 'description')
        self.reference = super(AttckTools, self)._set_reference(kwargs)
        self.created = super(AttckTools, self)._set_attribute(kwargs, 'created')
        self.modified = super(AttckTools, self)._set_attribute(kwargs, 'modified')
        self.stix = super(AttckTools, self)._set_attribute(kwargs, 'id')
        self.type = super(AttckTools, self)._set_attribute(kwargs, 'type')
        self.wiki = super(AttckTools, self)._set_wiki(kwargs)
        self.contributor = super(AttckTools, self)._set_attribute(kwargs, 'contributor')

pyattck

A Python package to interact with the Mitre ATT&CK Frameworks

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis