From a95a46361984a96ad123a833626752aa6ffacfe3 Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Mon, 21 Jun 2021 10:56:24 -0400 Subject: [PATCH 1/6] Add Sighting.summary default value See also #507. --- stix2/v21/sro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stix2/v21/sro.py b/stix2/v21/sro.py index e6eada6..c3756d4 100644 --- a/stix2/v21/sro.py +++ b/stix2/v21/sro.py @@ -87,7 +87,7 @@ class Sighting(_RelationshipObject): ('sighting_of_ref', ReferenceProperty(valid_types="SDO", spec_version='2.1', required=True)), ('observed_data_refs', ListProperty(ReferenceProperty(valid_types='observed-data', spec_version='2.1'))), ('where_sighted_refs', ListProperty(ReferenceProperty(valid_types=['identity', 'location'], spec_version='2.1'))), - ('summary', BooleanProperty()), + ('summary', BooleanProperty(default=lambda: False)), ('revoked', BooleanProperty(default=lambda: False)), ('labels', ListProperty(StringProperty)), ('confidence', IntegerProperty()), From 7a9d052a0dff52b5218b83d6ce546f3980071547 Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 25 Jun 2021 22:48:00 -0400 Subject: [PATCH 2/6] Update Network Traffic for CS03 - `end` must be greater than or equal to `start` - `extensions` and `end` are now id-contributing properties --- stix2/v21/observables.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stix2/v21/observables.py b/stix2/v21/observables.py index bdd0640..015722a 100644 --- a/stix2/v21/observables.py +++ b/stix2/v21/observables.py @@ -561,7 +561,7 @@ class NetworkTraffic(_Observable): ('defanged', BooleanProperty(default=lambda: False)), ('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)), ]) - _id_contributing_properties = ["start", "src_ref", "dst_ref", "src_port", "dst_port", "protocols"] + _id_contributing_properties = ["start", "end", "src_ref", "dst_ref", "src_port", "dst_port", "protocols", "extensions"] def _check_object_constraints(self): super(NetworkTraffic, self)._check_object_constraints() @@ -579,8 +579,8 @@ class NetworkTraffic(_Observable): msg = "{0.id} if 'is_active' is True, 'end' must not be included" raise ValueError(msg.format(self)) - if start and end and end <= start: - msg = "{0.id} 'end' must be greater than 'start'" + if start and end and end < start: + msg = "{0.id} 'end' must be greater than or equal to 'start'" raise ValueError(msg.format(self)) From 5504001f92ed14a66b116c5296aa799ffd7be8b5 Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 25 Jun 2021 23:01:11 -0400 Subject: [PATCH 3/6] Add new infrastructure-type-ov entries --- stix2/v21/vocab.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stix2/v21/vocab.py b/stix2/v21/vocab.py index dc790d7..d348c20 100644 --- a/stix2/v21/vocab.py +++ b/stix2/v21/vocab.py @@ -285,12 +285,16 @@ INFRASTRUCTURE_TYPE_AMPLIFICATION = "amplification" INFRASTRUCTURE_TYPE_ANONYMIZATION = "anonymization" INFRASTRUCTURE_TYPE_BOTNET = "botnet" INFRASTRUCTURE_TYPE_COMMAND_AND_CONTROL = "command-and-control" +INFRASTRUCTURE_TYPE_CONTROL_SYSTEM = "control-system" INFRASTRUCTURE_TYPE_EXFILTRATION = "exfiltration" +INFRASTRUCTURE_TYPE_FIREWALL = "firewall" INFRASTRUCTURE_TYPE_HOSTING_MALWARE = "hosting-malware" INFRASTRUCTURE_TYPE_HOSTING_TARGET_LISTS = "hosting-target-lists" INFRASTRUCTURE_TYPE_PHISHING = "phishing" INFRASTRUCTURE_TYPE_RECONNAISSANCE = "reconnaissance" +INFRASTRUCTURE_TYPE_ROUTERS_SWITCHES = "routers-switches" INFRASTRUCTURE_TYPE_STAGING = "staging" +INFRASTRUCTURE_TYPE_WORKSTATION = "workstation" INFRASTRUCTURE_TYPE_UNKNOWN = "unknown" @@ -299,12 +303,16 @@ INFRASTRUCTURE_TYPE = [ INFRASTRUCTURE_TYPE_ANONYMIZATION, INFRASTRUCTURE_TYPE_BOTNET, INFRASTRUCTURE_TYPE_COMMAND_AND_CONTROL, + INFRASTRUCTURE_TYPE_CONTROL_SYSTEM, INFRASTRUCTURE_TYPE_EXFILTRATION, + INFRASTRUCTURE_TYPE_FIREWALL, INFRASTRUCTURE_TYPE_HOSTING_MALWARE, INFRASTRUCTURE_TYPE_HOSTING_TARGET_LISTS, INFRASTRUCTURE_TYPE_PHISHING, INFRASTRUCTURE_TYPE_RECONNAISSANCE, + INFRASTRUCTURE_TYPE_ROUTERS_SWITCHES, INFRASTRUCTURE_TYPE_STAGING, + INFRASTRUCTURE_TYPE_WORKSTATION, INFRASTRUCTURE_TYPE_UNKNOWN, ] From f23326ae2cedf10dd839841af6801837ad127ebc Mon Sep 17 00:00:00 2001 From: Rich Piazza Date: Tue, 6 Jul 2021 15:29:39 -0400 Subject: [PATCH 4/6] Update README.rst changed maintainers --- README.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 662e020..2ec7f97 100644 --- a/README.rst +++ b/README.rst @@ -138,8 +138,12 @@ select additional or substitute Maintainers, per `consensus agreements - `Chris Lenk `__; GitHub ID: https://github.com/clenk/; WWW: `MITRE Corporation `__ -- `Emmanuelle Vargas-Gonzalez `__; GitHub ID: - https://github.com/emmanvg/; WWW: `MITRE +- `Rich Piazza `__; GitHub ID: + https://github.com/rpiazza/; WWW: `MITRE + Corporation `__ + +- `Andy Chisholm `__; GitHub ID: + https://github.com/chisholm/; WWW: `MITRE Corporation `__ - `Jason Keirstead `__; GitHub ID: From b1565e174f6ae57edd7b04c0ea59f681a108da03 Mon Sep 17 00:00:00 2001 From: Rich Piazza Date: Tue, 6 Jul 2021 15:53:45 -0400 Subject: [PATCH 5/6] Update README.rst removed newlines --- README.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 2ec7f97..dbffa9a 100644 --- a/README.rst +++ b/README.rst @@ -139,12 +139,10 @@ select additional or substitute Maintainers, per `consensus agreements https://github.com/clenk/; WWW: `MITRE Corporation `__ - `Rich Piazza `__; GitHub ID: - https://github.com/rpiazza/; WWW: `MITRE - Corporation `__ + https://github.com/rpiazza/; WWW: `MITRE Corporation `__ - `Andy Chisholm `__; GitHub ID: - https://github.com/chisholm/; WWW: `MITRE - Corporation `__ + https://github.com/chisholm/; WWW: `MITRE Corporation `__ - `Jason Keirstead `__; GitHub ID: https://github.com/JasonKeirstead; WWW: `IBM `__ From 1821c4b0c26adbcf2f68a294ef3e1cf8c3c5ccdf Mon Sep 17 00:00:00 2001 From: Rich Piazza Date: Tue, 6 Jul 2021 15:57:02 -0400 Subject: [PATCH 6/6] Update README.rst trailing whitespace --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index dbffa9a..4d0ccef 100644 --- a/README.rst +++ b/README.rst @@ -140,7 +140,7 @@ select additional or substitute Maintainers, per `consensus agreements - `Rich Piazza `__; GitHub ID: https://github.com/rpiazza/; WWW: `MITRE Corporation `__ - + - `Andy Chisholm `__; GitHub ID: https://github.com/chisholm/; WWW: `MITRE Corporation `__