2017-03-22 13:46:39 +01:00
|
|
|
import datetime as dt
|
|
|
|
|
|
|
|
import pytz
|
|
|
|
|
|
|
|
FAKE_TIME = dt.datetime(2017, 1, 1, 12, 34, 56, tzinfo=pytz.utc)
|
|
|
|
|
2017-04-19 15:22:08 +02:00
|
|
|
ATTACK_PATTERN_ID = "attack-pattern--0c7b5b88-8ff7-4a4d-aa9d-feb398cd0061"
|
|
|
|
CAMPAIGN_ID = "campaign--8e2e2d2b-17d4-4cbf-938f-98ee46b3cd3f"
|
|
|
|
COURSE_OF_ACTION_ID = "course-of-action--8e2e2d2b-17d4-4cbf-938f-98ee46b3cd3f"
|
|
|
|
IDENTITY_ID = "identity--311b2d2d-f010-5473-83ec-1edf84858f4c"
|
2017-03-22 13:46:39 +01:00
|
|
|
INDICATOR_ID = "indicator--01234567-89ab-cdef-0123-456789abcdef"
|
2017-04-19 15:22:08 +02:00
|
|
|
INTRUSION_SET_ID = "intrusion-set--4e78f46f-a023-4e5f-bc24-71b3ca22ec29"
|
2017-10-23 14:06:29 +02:00
|
|
|
LOCATION_ID = "location--a6e9345f-5a15-4c29-8bb3-7dcc5d168d64"
|
2017-03-22 13:46:39 +01:00
|
|
|
MALWARE_ID = "malware--fedcba98-7654-3210-fedc-ba9876543210"
|
2017-04-19 15:22:08 +02:00
|
|
|
MARKING_DEFINITION_ID = "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9"
|
2017-10-23 14:06:29 +02:00
|
|
|
NOTE_ID = "note--0c7b5b88-8ff7-4a4d-aa9d-feb398cd0061"
|
2017-04-19 15:22:08 +02:00
|
|
|
OBSERVED_DATA_ID = "observed-data--b67d30ff-02ac-498a-92f9-32f845f448cf"
|
2017-10-23 14:06:29 +02:00
|
|
|
OPINION_ID = "opinion--b01efc25-77b4-4003-b18b-f6e24b5cd9f7"
|
2017-04-19 15:22:08 +02:00
|
|
|
REPORT_ID = "report--84e4d88f-44ea-4bcd-bbf3-b2c1c320bcb3"
|
2017-03-22 13:46:39 +01:00
|
|
|
RELATIONSHIP_ID = "relationship--00000000-1111-2222-3333-444444444444"
|
2017-04-19 15:22:08 +02:00
|
|
|
THREAT_ACTOR_ID = "threat-actor--8e2e2d2b-17d4-4cbf-938f-98ee46b3cd3f"
|
|
|
|
TOOL_ID = "tool--8e2e2d2b-17d4-4cbf-938f-98ee46b3cd3f"
|
2017-03-31 21:52:27 +02:00
|
|
|
SIGHTING_ID = "sighting--bfbc19db-ec35-4e45-beed-f8bde2a772fb"
|
2017-04-19 15:22:08 +02:00
|
|
|
VULNERABILITY_ID = "vulnerability--0c7b5b88-8ff7-4a4d-aa9d-feb398cd0061"
|
2017-03-22 13:46:39 +01:00
|
|
|
|
2017-08-21 19:57:01 +02:00
|
|
|
MARKING_IDS = [
|
|
|
|
"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9",
|
|
|
|
"marking-definition--443eb5c3-a76c-4a0a-8caa-e93998e7bc09",
|
|
|
|
"marking-definition--57fcd772-9c1d-41b0-8d1f-3d47713415d9",
|
|
|
|
"marking-definition--462bf1a6-03d2-419c-b74e-eee2238b2de4",
|
|
|
|
"marking-definition--68520ae2-fefe-43a9-84ee-2c2a934d2c7d",
|
|
|
|
"marking-definition--2802dfb1-1019-40a8-8848-68d0ec0e417f",
|
|
|
|
]
|
2017-11-15 22:34:07 +01:00
|
|
|
RELATIONSHIP_IDS = [
|
|
|
|
'relationship--06520621-5352-4e6a-b976-e8fa3d437ffd',
|
|
|
|
'relationship--181c9c09-43e6-45dd-9374-3bec192f05ef',
|
|
|
|
'relationship--a0cbb21c-8daf-4a7f-96aa-7155a4ef8f70'
|
|
|
|
]
|
2017-08-21 19:57:01 +02:00
|
|
|
|
2017-11-29 14:58:01 +01:00
|
|
|
# *_KWARGS contains all required arguments to create an instance of that STIX object
|
|
|
|
# *_MORE_KWARGS contains all the required arguments, plus some optional ones
|
|
|
|
|
|
|
|
ATTACK_PATTERN_KWARGS = dict(
|
|
|
|
name="Phishing",
|
|
|
|
)
|
|
|
|
|
2017-11-02 21:18:41 +01:00
|
|
|
CAMPAIGN_KWARGS = dict(
|
|
|
|
name="Green Group Attacks Against Finance",
|
|
|
|
description="Campaign by Green Group against a series of targets in the financial services sector.",
|
|
|
|
)
|
|
|
|
|
2017-08-31 18:28:07 +02:00
|
|
|
CAMPAIGN_MORE_KWARGS = dict(
|
2017-09-01 22:37:49 +02:00
|
|
|
type='campaign',
|
|
|
|
id=CAMPAIGN_ID,
|
2017-08-31 18:28:07 +02:00
|
|
|
created_by_ref="identity--f431f809-377b-45e0-aa1c-6a4751cae5ff",
|
|
|
|
created="2016-04-06T20:03:00.000Z",
|
|
|
|
modified="2016-04-06T20:03:00.000Z",
|
|
|
|
name="Green Group Attacks Against Finance",
|
|
|
|
description="Campaign by Green Group against a series of targets in the financial services sector.",
|
|
|
|
)
|
|
|
|
|
2017-11-29 14:58:01 +01:00
|
|
|
COURSE_OF_ACTION_KWARGS = dict(
|
|
|
|
name="Block",
|
|
|
|
)
|
|
|
|
|
2017-07-12 17:36:15 +02:00
|
|
|
IDENTITY_KWARGS = dict(
|
|
|
|
name="John Smith",
|
|
|
|
identity_class="individual",
|
|
|
|
)
|
|
|
|
|
2017-03-22 13:46:39 +01:00
|
|
|
INDICATOR_KWARGS = dict(
|
|
|
|
labels=['malicious-activity'],
|
|
|
|
pattern="[file:hashes.MD5 = 'd41d8cd98f00b204e9800998ecf8427e']",
|
|
|
|
)
|
|
|
|
|
2017-11-29 14:58:01 +01:00
|
|
|
INTRUSION_SET_KWARGS = dict(
|
|
|
|
name="Bobcat Breakin",
|
|
|
|
)
|
|
|
|
|
2017-03-22 13:46:39 +01:00
|
|
|
MALWARE_KWARGS = dict(
|
|
|
|
labels=['ransomware'],
|
|
|
|
name="Cryptolocker",
|
2018-06-11 23:33:50 +02:00
|
|
|
is_family=False
|
2017-08-31 18:51:13 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
MALWARE_MORE_KWARGS = dict(
|
2017-09-01 22:37:49 +02:00
|
|
|
type='malware',
|
|
|
|
id=MALWARE_ID,
|
|
|
|
created="2016-04-06T20:03:00.000Z",
|
|
|
|
modified="2016-04-06T20:03:00.000Z",
|
2017-08-31 18:51:13 +02:00
|
|
|
labels=['ransomware'],
|
|
|
|
name="Cryptolocker",
|
2018-06-11 23:33:50 +02:00
|
|
|
description="A ransomware related to ...",
|
|
|
|
is_family=False
|
2017-03-22 13:46:39 +01:00
|
|
|
)
|
|
|
|
|
2017-11-29 14:58:01 +01:00
|
|
|
OBSERVED_DATA_KWARGS = dict(
|
|
|
|
first_observed=FAKE_TIME,
|
|
|
|
last_observed=FAKE_TIME,
|
|
|
|
number_observed=1,
|
|
|
|
objects={
|
|
|
|
"0": {
|
|
|
|
"type": "windows-registry-key",
|
|
|
|
"key": "HKEY_LOCAL_MACHINE\\System\\Foo\\Bar",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
REPORT_KWARGS = dict(
|
|
|
|
labels=["campaign"],
|
|
|
|
name="Bad Cybercrime",
|
|
|
|
published=FAKE_TIME,
|
|
|
|
object_refs=[INDICATOR_ID],
|
|
|
|
)
|
|
|
|
|
2017-03-22 13:46:39 +01:00
|
|
|
RELATIONSHIP_KWARGS = dict(
|
|
|
|
relationship_type="indicates",
|
|
|
|
source_ref=INDICATOR_ID,
|
|
|
|
target_ref=MALWARE_ID,
|
|
|
|
)
|
2017-03-31 21:52:27 +02:00
|
|
|
|
|
|
|
SIGHTING_KWARGS = dict(
|
|
|
|
sighting_of_ref=INDICATOR_ID,
|
|
|
|
)
|
2017-11-29 14:58:01 +01:00
|
|
|
|
|
|
|
THREAT_ACTOR_KWARGS = dict(
|
|
|
|
labels=["crime-syndicate"],
|
|
|
|
name="Evil Org",
|
|
|
|
)
|
|
|
|
|
|
|
|
TOOL_KWARGS = dict(
|
|
|
|
labels=["remote-access"],
|
|
|
|
name="VNC",
|
|
|
|
)
|
|
|
|
|
|
|
|
VULNERABILITY_KWARGS = dict(
|
|
|
|
name="Heartbleed",
|
|
|
|
)
|