oasis-open / cti-stix-elevator

OASIS Cyber Threat Intelligence (CTI) TC Open Repository: Convert STIX 1.2 XML to STIX 2.x JSON
https://stix2-elevator.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
49 stars 23 forks source link

Issues Attempting to Elevate Stix XML Docs #233

Closed bluhayz closed 4 years ago

bluhayz commented 4 years ago

I've recently installed the stix-elevator using the installation instructions in order to help support a new project I'm on. In getting familiar w/ the stix-elevator and the example stix xml files that I have I am running into several errors regardless of what method (command line, or python import) I try to use the package.

The file I try to elevate (renamed from .stix to txt to post here): AA19-339A_WHITE.txt When using the command line version of stix-elevate I receive the following:

bluhayz@MacBook-Pro bin % ./stix2_elevator '/Users/bluhayz/Downloads/DHS-STIX/AA19-339A_WHITE.stix' 
[stix2elevator.options] [213] [WARNING] [2020-06-12 08:24:57,098] custom_property_prefix option is provided, but the mssing policy option is not 'use-custom-properies'.  It will be ignored.
Results produced by the stix2-elevator are not for production purposes.
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'VocabList' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'str' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'datetime' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'MarkableText' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'MarkableDateTime' object.
  warnings.warn(msg)
[stix2elevator.options] [201] [WARNING] [2020-06-12 08:24:57,279] Results produced by the stix2-elevator may generate warning messages which should be investigated.
[stix2elevator.options] [905] [WARNING] [2020-06-12 08:24:57,280] Timestamp not available for stix 1x package, using current time
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,280] Using parent object timestamp on 'US-CERT'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,280] Using parent object timestamp on TLPMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:24:57,281] Created Marking Structure for TLPMarkingStructure
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,281] Using parent object timestamp on TLPMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:24:57,281] Created Marking Structure for TLPMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:24:57,281] Found same marking structure MarkingSpecification, using marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,281] Using parent object timestamp on TermsOfUseMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:24:57,281] Created Marking Structure for TermsOfUseMarkingStructure
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,281] Using parent object timestamp on TermsOfUseMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:24:57,281] Created Marking Structure for TermsOfUseMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:24:57,281] Found same marking structure MarkingSpecification, using marking-definition--09a75a9d-21ab-4700-bec3-58231f89553b
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,282] Using parent object timestamp on TLPMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:24:57,282] Created Marking Structure for TLPMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:24:57,282] Found same marking structure MarkingSpecification, using marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,282] Using parent object timestamp on TermsOfUseMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:24:57,282] Created Marking Structure for TermsOfUseMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:24:57,282] Found same marking structure MarkingSpecification, using marking-definition--09a75a9d-21ab-4700-bec3-58231f89553b
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:24:57,294] Using parent object timestamp on NCCIC:Observable-5eb7409f-6b09-4459-be0a-211fbc599f90
Traceback (most recent call last):
  File "./stix2_elevator", line 8, in <module>
    sys.exit(main())
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/cli.py", line 202, in main
    result = elevate_file(elevator_args.file_)
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/__init__.py", line 85, in elevate_file
    json_string = json.dumps(convert_package(stix_package, env),
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_stix.py", line 1975, in convert_package
    o_d20 = convert_observed_data(o_d, env)
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_stix.py", line 1293, in convert_observed_data
    create_scos(obs, observed_data_instance, env)
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_stix.py", line 1251, in create_scos
    scos = convert_cybox_object(obs.object_)
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_stix.py", line 1246, in convert_cybox_object
    return convert_cybox_object21(o)
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_cybox.py", line 1208, in convert_cybox_object21
    objs = [convert_address(prop, obj1x.id_)]
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_cybox.py", line 132, in convert_address
    finish_sco(instance, obj1x_id)
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_cybox.py", line 56, in finish_sco
    instance["id"] = generate_sco_id(instance["type"], instance)
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/ids.py", line 112, in generate_sco_id
    if "type" in c._properties:
AttributeError: type object '_DomainObject' has no attribute '_properties'

When utilizing it as a python import in my stixupgrade project which consists of the following code:

from stix2elevator import elevate_file
from stix2elevator.options import initialize_options

initialize_options()
results = elevate_file('/Users/bluhayz/Downloads/DHS-STIX/AA19-339A_WHITE.stix')
print(results)

the output is:

/Users/bluhayz/PycharmProjects/stixupgrade/venv/bin/python /Users/bluhayz/PycharmProjects/stixupgrade/elevation.py
Results produced by the stix2-elevator are not for production purposes.
[stix2elevator.options] [213] [WARNING] [2020-06-12 08:29:50,764] custom_property_prefix option is provided, but the mssing policy option is not 'use-custom-properies'.  It will be ignored.
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'VocabList' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'str' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'datetime' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'MarkableText' object.
  warnings.warn(msg)
/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix/utils/deprecated.py:48: UserWarning: The use of this field has been deprecated. Received 'MarkableDateTime' object.
  warnings.warn(msg)
[stix2elevator.options] [201] [WARNING] [2020-06-12 08:29:50,912] Results produced by the stix2-elevator may generate warning messages which should be investigated.
[stix2elevator.options] [905] [WARNING] [2020-06-12 08:29:50,912] Timestamp not available for stix 1x package, using current time
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,912] Using parent object timestamp on 'US-CERT'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,913] Using parent object timestamp on TLPMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:29:50,913] Created Marking Structure for TLPMarkingStructure
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,913] Using parent object timestamp on TLPMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:29:50,913] Created Marking Structure for TLPMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:29:50,913] Found same marking structure MarkingSpecification, using marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,913] Using parent object timestamp on TermsOfUseMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:29:50,913] Created Marking Structure for TermsOfUseMarkingStructure
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,913] Using parent object timestamp on TermsOfUseMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:29:50,913] Created Marking Structure for TermsOfUseMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:29:50,913] Found same marking structure MarkingSpecification, using marking-definition--172e26b7-1721-4239-9e13-48bc92ad4554
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,914] Using parent object timestamp on TLPMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:29:50,914] Created Marking Structure for TLPMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:29:50,914] Found same marking structure MarkingSpecification, using marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,914] Using parent object timestamp on TermsOfUseMarkingStructure
[stix2elevator.options] [212] [INFO   ] [2020-06-12 08:29:50,914] Created Marking Structure for TermsOfUseMarkingStructure
[stix2elevator.options] [625] [INFO   ] [2020-06-12 08:29:50,914] Found same marking structure MarkingSpecification, using marking-definition--172e26b7-1721-4239-9e13-48bc92ad4554
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,925] Using parent object timestamp on NCCIC:Observable-5eb7409f-6b09-4459-be0a-211fbc599f90
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,925] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-5eb7409f-6b09-4459-be0a-211fbc599f90 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,926] Using parent object timestamp on NCCIC:Observable-2720033e-8994-4b07-a404-ab81c66bc8b2
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,926] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-2720033e-8994-4b07-a404-ab81c66bc8b2 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,926] Using parent object timestamp on NCCIC:Observable-446f4cc3-6173-4f42-938a-0fda24ccdefd
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,926] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-446f4cc3-6173-4f42-938a-0fda24ccdefd - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,926] Using parent object timestamp on NCCIC:Observable-de6a9c8d-f693-4ec8-a537-b79e8c0abe57
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,927] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-de6a9c8d-f693-4ec8-a537-b79e8c0abe57 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,927] Using parent object timestamp on NCCIC:Observable-1aebde80-e599-4d96-8f88-fd55f11f9bcc
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,927] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-1aebde80-e599-4d96-8f88-fd55f11f9bcc - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,927] Using parent object timestamp on NCCIC:Observable-2f12f9d9-5347-4f84-9624-02a507717815
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,927] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-2f12f9d9-5347-4f84-9624-02a507717815 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,927] Using parent object timestamp on NCCIC:Observable-bc4ab30f-8904-49f7-85f5-1b0eab4edf0d
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,927] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-bc4ab30f-8904-49f7-85f5-1b0eab4edf0d - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,927] Using parent object timestamp on NCCIC:Observable-4f6414e4-d932-42a1-abd9-1b2d03b967a4
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,927] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-4f6414e4-d932-42a1-abd9-1b2d03b967a4 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,927] Using parent object timestamp on NCCIC:Observable-0ec2bf72-6899-48e3-b99f-0422ce291b7f
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,927] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-0ec2bf72-6899-48e3-b99f-0422ce291b7f - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,927] Using parent object timestamp on NCCIC:Observable-59e72340-dcba-4cb7-8095-5618c9da2cba
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,928] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-59e72340-dcba-4cb7-8095-5618c9da2cba - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,928] Using parent object timestamp on NCCIC:Observable-77eebc39-b805-4f2b-851a-b359531a86d3
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,928] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-77eebc39-b805-4f2b-851a-b359531a86d3 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,928] Using parent object timestamp on NCCIC:Observable-7e95bd53-69af-46bc-b923-08ab366d7c67
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,928] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-7e95bd53-69af-46bc-b923-08ab366d7c67 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,928] Using parent object timestamp on NCCIC:Observable-7c7dbe23-12ad-4609-b7a5-d3dbdae5562b
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,928] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-7c7dbe23-12ad-4609-b7a5-d3dbdae5562b - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,928] Using parent object timestamp on NCCIC:Observable-73056be3-edf7-4708-bc34-d04ede0019c0
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,928] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-73056be3-edf7-4708-bc34-d04ede0019c0 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,928] Using parent object timestamp on NCCIC:Observable-ce8d6e3a-b75b-4e28-9e94-5f757ea80a7d
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,929] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-ce8d6e3a-b75b-4e28-9e94-5f757ea80a7d - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,929] Using parent object timestamp on NCCIC:Observable-2bf363e1-4589-4f1d-a0ef-6294d02a1638
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,929] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-2bf363e1-4589-4f1d-a0ef-6294d02a1638 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,929] Using parent object timestamp on NCCIC:Observable-4f4fde79-1989-4d40-8129-62777e816dde
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,929] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-4f4fde79-1989-4d40-8129-62777e816dde - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,929] Using parent object timestamp on NCCIC:Observable-76308cf5-b00a-411f-bf70-6ae089c7c033
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,929] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-76308cf5-b00a-411f-bf70-6ae089c7c033 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,929] Using parent object timestamp on NCCIC:Observable-6925bd09-36e1-4667-bcda-703cfe38f2f6
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,929] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-6925bd09-36e1-4667-bcda-703cfe38f2f6 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,929] Using parent object timestamp on NCCIC:Observable-8337a60e-1648-4c5b-a42f-179ec686aebc
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,929] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-8337a60e-1648-4c5b-a42f-179ec686aebc - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,930] Using parent object timestamp on NCCIC:Observable-362a5004-4fac-4c43-95fd-90ed6db503bd
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,930] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-362a5004-4fac-4c43-95fd-90ed6db503bd - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,930] Using parent object timestamp on NCCIC:Observable-5f46899a-60d8-46e0-90b0-ae3a27b8e448
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,930] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-5f46899a-60d8-46e0-90b0-ae3a27b8e448 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,930] Using parent object timestamp on NCCIC:Observable-435f2d98-c801-4598-8fcc-313b2eca86f9
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,930] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-435f2d98-c801-4598-8fcc-313b2eca86f9 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,930] Using parent object timestamp on NCCIC:Observable-0bf7f271-075b-4a37-96cb-627ae00333e6
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,930] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-0bf7f271-075b-4a37-96cb-627ae00333e6 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,930] Using parent object timestamp on NCCIC:Observable-3a47baa5-e957-4774-bf60-1abb79ffc774
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,930] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-3a47baa5-e957-4774-bf60-1abb79ffc774 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,930] Using parent object timestamp on NCCIC:Observable-a8c5d469-91b1-4b97-87d3-a1cbd0860c2a
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,930] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-a8c5d469-91b1-4b97-87d3-a1cbd0860c2a - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,931] Using parent object timestamp on NCCIC:Observable-5d2ac9e1-94e6-4f28-9cbd-e43bbff5baec
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,931] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-5d2ac9e1-94e6-4f28-9cbd-e43bbff5baec - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,931] Using parent object timestamp on NCCIC:Observable-a1064159-e83f-4c1a-a7db-294282d2aa92
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,931] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-a1064159-e83f-4c1a-a7db-294282d2aa92 - using timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,931] Using parent object timestamp on NCCIC:Observable-80f04406-908b-452c-8087-79a79cebe9ef
[stix2elevator.options] [901] [INFO   ] [2020-06-12 08:29:50,931] 'first_observed' and 'last_observed' data not available directly on NCCIC:Observable-80f04406-908b-452c-8087-79a79cebe9ef - using timestamp
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,931] No valid time position information available in indicator--c976e241-110e-4dd4-b883-a3a3b7510474, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,931] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,931] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,931] No valid time position information available in indicator--297ca051-a946-4f23-a130-991fb1a001c9, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,932] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,932] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,932] No valid time position information available in indicator--e99fd92a-85ce-4505-9917-a73663ca3465, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,932] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,932] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,932] No valid time position information available in indicator--cfbd69dd-e2fe-417c-8820-9b7090152d1c, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,932] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,933] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,933] No valid time position information available in indicator--f93e1f03-c063-409f-a762-3ff8c5ee8f9e, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,933] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,933] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,933] No valid time position information available in indicator--45339826-f7ba-49e5-ab68-d6ee8f14ec94, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,933] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,933] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,933] No valid time position information available in indicator--f10f7fa5-4f2d-454a-93ae-31e137012019, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,934] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,934] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,934] No valid time position information available in indicator--cac01a88-ea1f-49fa-9ce1-a41b0a7bb329, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,934] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,934] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,934] No valid time position information available in indicator--d64b4b2d-ab4d-4419-9a35-ac8778255839, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,934] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,934] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,935] No valid time position information available in indicator--1348e590-55da-429e-b49d-7e8ba48c3452, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,935] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,935] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,935] No valid time position information available in indicator--721ebc34-c9d7-427f-bd83-87cb2eef2087, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,935] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,935] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,935] No valid time position information available in indicator--b9cc3b42-e301-48c4-9117-571d38b32740, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,935] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,936] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,936] No valid time position information available in indicator--4f794b74-099d-4dc7-a3a6-44f2abcba5d5, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,936] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,936] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,936] No valid time position information available in indicator--084c0959-3d6c-4fc5-b071-1582f74996da, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,936] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,936] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,936] No valid time position information available in indicator--1817c013-d5b2-4b78-b2bd-48cb99f2e448, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,937] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,937] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,937] No valid time position information available in indicator--79e9bc24-9339-4b2c-ab0c-70fa4787f942, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,937] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,937] Using parent object timestamp on with idref NCCIC:ttp-a965da63-0316-46f7-8a00-897390dde8c9
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,937] No valid time position information available in indicator--1acd1d4b-1649-4db2-9e42-a1b018e8f8e4, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,937] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,937] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,938] No valid time position information available in indicator--f2740649-fafb-4c41-829e-020a527b0008, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,938] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,938] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,938] No valid time position information available in indicator--c5c698e5-5081-447b-ac70-1ab41a638aea, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,938] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,938] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,938] No valid time position information available in indicator--768562e1-bf4d-4565-8c06-59691f5a3162, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,938] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,939] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,939] No valid time position information available in indicator--10ec6434-0fd4-4ded-ba09-c0949892d935, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,939] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,939] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,939] No valid time position information available in indicator--ff31050e-8e63-45f1-9cde-67f4033d5e99, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,939] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,939] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,940] No valid time position information available in indicator--a1287e68-79f6-4215-8a83-c53aba26c43c, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,940] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,940] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,940] No valid time position information available in indicator--e3b5910a-e1e2-4336-82f9-89066449f5f7, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,940] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,940] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,940] No valid time position information available in indicator--f91e06eb-ca5e-4142-9e1a-c343226d3920, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,940] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,941] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,941] No valid time position information available in indicator--93549b5d-1fdf-4838-9879-ba9601f74659, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,941] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,941] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,941] No valid time position information available in indicator--e0c4db28-e61a-4819-97d6-372088216c25, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,941] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,941] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,941] No valid time position information available in indicator--2c0d1cca-5bb3-4a7f-ae4f-b588d75cb724, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,941] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,942] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
[stix2elevator.options] [903] [WARNING] [2020-06-12 08:29:50,942] No valid time position information available in indicator--d8007a0e-aac0-4018-909a-2f6fa9a72c9a, using parent timestamp
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,942] Using parent object timestamp on 'NCCIC'
[stix2elevator.options] [902] [INFO   ] [2020-06-12 08:29:50,942] Using parent object timestamp on with idref NCCIC:ttp-1dcd8b75-975a-43df-bc9c-546e27e12c52
Traceback (most recent call last):
  File "/Users/bluhayz/PycharmProjects/stixupgrade/elevation.py", line 11, in <module>
    results = elevate_file('/Users/bluhayz/Downloads/DHS-STIX/AA19-339A_WHITE.stix')
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/__init__.py", line 85, in elevate_file
    json_string = json.dumps(convert_package(stix_package, env),
  File "/Users/bluhayz/PycharmProjects/stixupgrade/venv/lib/python3.7/site-packages/stix2elevator/convert_stix.py", line 2023, in convert_package
    for ttp in stix_package.ttps:
TypeError: 'TTPs' object is not iterable

Process finished with exit code 1

I seem to get these errors on the majority of stix files that I try to elevate as well as when attempting to elevate files that are in the stixproject examples those do not elevate either. https://stixproject.github.io/examples/

Any idea as to how to get my setup working correctly to allow for this? I followed the installation instructions multiple times and always seem to end up w/ the same results. I've also had other team members try and their results are the same.

Thank you for your help!

rpiazza commented 4 years ago

Hi @bluhayz,

Both of these bugs were fixed recently. We have a new version of the elevator coming out very soon. It has been delayed because we wanted to make sure all of the dependencies (python-stix2, stix2_validator, etc) were correct for the final version of the STIX 2.1 specification.

I "elevated" that file locally, with no issues.

bluhayz commented 4 years ago

Excellent news! I hope that you guys get the chance to output that as it will surely help us improve our application. Thank you!