INNER CODE UNIT · Python

to_stix

infosecB/LOOBins · src/pyloobins/models.py:133

    def to_stix(self) -> Tool:
        """Convert a LOOBin to a STIX2 Tool object
        https://docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html#_z4voa9ndw8v

        Required fields per STIX2 spec:
            - type: must be 'tool'
            - name: str

        Optional fields:
            - description (str)
            - tool_types (list of open-vocab -> tool-type-ov)
            - aliases (list of str)
            - kill_chain_phases (list of kill-chain-phase)
        """
        return Tool(
            name=self.name,
            description=self.full_description,
            created=datetime.combine(self.created, time(0, 0, 0), timezone.utc)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…