2018-11-28 22:51:00 +01:00
|
|
|
"""STIX 2.1 API Objects."""
|
2017-11-02 12:21:24 +01:00
|
|
|
|
|
|
|
# flake8: noqa
|
|
|
|
|
2018-06-14 02:09:07 +02:00
|
|
|
from .bundle import Bundle
|
2018-07-13 17:10:05 +02:00
|
|
|
from .common import (
|
|
|
|
TLP_AMBER, TLP_GREEN, TLP_RED, TLP_WHITE, CustomMarking, ExternalReference,
|
|
|
|
GranularMarking, KillChainPhase, LanguageContent, MarkingDefinition,
|
|
|
|
StatementMarking, TLPMarking,
|
|
|
|
)
|
|
|
|
from .observables import (
|
|
|
|
URL, AlternateDataStream, ArchiveExt, Artifact, AutonomousSystem,
|
|
|
|
CustomExtension, CustomObservable, Directory, DomainName, EmailAddress,
|
|
|
|
EmailMessage, EmailMIMEComponent, File, HTTPRequestExt, ICMPExt,
|
|
|
|
IPv4Address, IPv6Address, MACAddress, Mutex, NetworkTraffic, NTFSExt,
|
|
|
|
PDFExt, Process, RasterImageExt, SocketExt, Software, TCPExt,
|
|
|
|
UNIXAccountExt, UserAccount, WindowsPEBinaryExt,
|
|
|
|
WindowsPEOptionalHeaderType, WindowsPESection, WindowsProcessExt,
|
|
|
|
WindowsRegistryKey, WindowsRegistryValueType, WindowsServiceExt,
|
|
|
|
X509Certificate, X509V3ExtenstionsType,
|
|
|
|
)
|
|
|
|
from .sdo import (
|
|
|
|
AttackPattern, Campaign, CourseOfAction, CustomObject, Identity, Indicator,
|
|
|
|
IntrusionSet, Location, Malware, Note, ObservedData, Opinion, Report,
|
|
|
|
ThreatActor, Tool, Vulnerability,
|
|
|
|
)
|
2017-11-02 12:21:24 +01:00
|
|
|
from .sro import Relationship, Sighting
|
|
|
|
|
|
|
|
OBJ_MAP = {
|
|
|
|
'attack-pattern': AttackPattern,
|
|
|
|
'bundle': Bundle,
|
|
|
|
'campaign': Campaign,
|
|
|
|
'course-of-action': CourseOfAction,
|
|
|
|
'identity': Identity,
|
|
|
|
'indicator': Indicator,
|
|
|
|
'intrusion-set': IntrusionSet,
|
|
|
|
'language-content': LanguageContent,
|
|
|
|
'location': Location,
|
|
|
|
'malware': Malware,
|
|
|
|
'note': Note,
|
|
|
|
'marking-definition': MarkingDefinition,
|
|
|
|
'observed-data': ObservedData,
|
|
|
|
'opinion': Opinion,
|
|
|
|
'report': Report,
|
|
|
|
'relationship': Relationship,
|
|
|
|
'threat-actor': ThreatActor,
|
|
|
|
'tool': Tool,
|
|
|
|
'sighting': Sighting,
|
|
|
|
'vulnerability': Vulnerability,
|
|
|
|
}
|
2018-07-10 20:59:43 +02:00
|
|
|
|
|
|
|
OBJ_MAP_OBSERVABLE = {
|
|
|
|
'artifact': Artifact,
|
|
|
|
'autonomous-system': AutonomousSystem,
|
|
|
|
'directory': Directory,
|
|
|
|
'domain-name': DomainName,
|
|
|
|
'email-addr': EmailAddress,
|
|
|
|
'email-message': EmailMessage,
|
|
|
|
'file': File,
|
|
|
|
'ipv4-addr': IPv4Address,
|
|
|
|
'ipv6-addr': IPv6Address,
|
|
|
|
'mac-addr': MACAddress,
|
|
|
|
'mutex': Mutex,
|
|
|
|
'network-traffic': NetworkTraffic,
|
|
|
|
'process': Process,
|
|
|
|
'software': Software,
|
|
|
|
'url': URL,
|
|
|
|
'user-account': UserAccount,
|
|
|
|
'windows-registry-key': WindowsRegistryKey,
|
|
|
|
'x509-certificate': X509Certificate,
|
|
|
|
}
|
|
|
|
|
|
|
|
EXT_MAP = {
|
|
|
|
'file': {
|
|
|
|
'archive-ext': ArchiveExt,
|
|
|
|
'ntfs-ext': NTFSExt,
|
|
|
|
'pdf-ext': PDFExt,
|
|
|
|
'raster-image-ext': RasterImageExt,
|
2018-07-13 17:10:05 +02:00
|
|
|
'windows-pebinary-ext': WindowsPEBinaryExt,
|
2018-07-10 20:59:43 +02:00
|
|
|
},
|
|
|
|
'network-traffic': {
|
|
|
|
'http-request-ext': HTTPRequestExt,
|
|
|
|
'icmp-ext': ICMPExt,
|
|
|
|
'socket-ext': SocketExt,
|
|
|
|
'tcp-ext': TCPExt,
|
|
|
|
},
|
|
|
|
'process': {
|
|
|
|
'windows-process-ext': WindowsProcessExt,
|
|
|
|
'windows-service-ext': WindowsServiceExt,
|
|
|
|
},
|
|
|
|
'user-account': {
|
|
|
|
'unix-account-ext': UNIXAccountExt,
|
|
|
|
},
|
|
|
|
}
|