How to use the pyattck.malware.AttckMalware 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 / malware.py View on Github external
self.attck_obj = attck_obj

        self.id = super(AttckMalware, self)._set_id(kwargs)
        self.created_by_ref = super(AttckMalware, self)._set_attribute(kwargs, 'created_by_ref')
        self.name = super(AttckMalware, self)._set_attribute(kwargs, 'name')
        self.aliases = super(AttckMalware, self)._set_list_items(kwargs, 'x_mitre_aliases')
        self.platforms = super(AttckMalware, self)._set_list_items(kwargs, 'x_mitre_platforms')
        self.labels = super(AttckMalware, self)._set_list_items(kwargs, 'labels')
        self.description = super(AttckMalware, self)._set_attribute(kwargs, 'description')
        self.external_references = super(AttckMalware, self)._set_reference(kwargs)
        self.created = super(AttckMalware, self)._set_attribute(kwargs, 'created')
        self.modified = super(AttckMalware, self)._set_attribute(kwargs, 'modified')
        self.stix = super(AttckMalware, self)._set_attribute(kwargs, 'id')
        self.type = super(AttckMalware, self)._set_attribute(kwargs, 'type')
        self.wiki = super(AttckMalware, self)._set_wiki(kwargs)
        self.contributor = super(AttckMalware, self)._set_list_items(kwargs, 'x_mitre_contributors')
        self.revoked = super(AttckMalware, self)._set_attribute(kwargs, 'revoked')
github swimlane / pyattck / pyattck / pyattck.py View on Github external
def malwares(self):
        """Creates AttckMalware objects
        
        Returns:
            (AttckMalware) -- Returns a list of AttckMalware objects
        """
        malware_list = []
        for malware in self.attck['objects']:
            if (malware['type'] == 'malware'):

                malware_list.append(AttckMalware(attck_obj=self.attck, **malware))
        return malware_list
github swimlane / pyattck / pyattck / actor.py View on Github external
def malwares(self):
        '''Returns all malware objects as a list that are documented as being used by an Actor or Group
        '''
        from .malware import AttckMalware
        malware_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'] == 'malware':
                            if item['target_ref'] in o['id']:
                                malware_list.append(AttckMalware(**o))
        return malware_list

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