contentctl 4.0.3__py3-none-any.whl → 4.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- contentctl/actions/new_content.py +12 -4
- contentctl/input/new_content_questions.py +0 -5
- contentctl/objects/story_tags.py +2 -0
- contentctl/output/finding_report_writer.py +3 -3
- contentctl/templates/detections/application/.gitkeep +0 -0
- contentctl/templates/detections/cloud/.gitkeep +0 -0
- contentctl/templates/detections/network/.gitkeep +0 -0
- contentctl/templates/detections/web/.gitkeep +0 -0
- {contentctl-4.0.3.dist-info → contentctl-4.0.5.dist-info}/METADATA +1 -1
- {contentctl-4.0.3.dist-info → contentctl-4.0.5.dist-info}/RECORD +14 -10
- /contentctl/templates/detections/{anomalous_usage_of_7zip.yml → endpoint/anomalous_usage_of_7zip.yml} +0 -0
- {contentctl-4.0.3.dist-info → contentctl-4.0.5.dist-info}/LICENSE.md +0 -0
- {contentctl-4.0.3.dist-info → contentctl-4.0.5.dist-info}/WHEEL +0 -0
- {contentctl-4.0.3.dist-info → contentctl-4.0.5.dist-info}/entry_points.txt +0 -0
|
@@ -19,16 +19,21 @@ class NewContent:
|
|
|
19
19
|
answers = questionary.prompt(questions)
|
|
20
20
|
answers.update(answers)
|
|
21
21
|
answers['name'] = answers['detection_name']
|
|
22
|
+
del answers['detection_name']
|
|
22
23
|
answers['id'] = str(uuid.uuid4())
|
|
23
24
|
answers['version'] = 1
|
|
24
25
|
answers['date'] = datetime.today().strftime('%Y-%m-%d')
|
|
25
26
|
answers['author'] = answers['detection_author']
|
|
27
|
+
del answers['detection_author']
|
|
26
28
|
answers['data_source'] = answers['data_source']
|
|
27
29
|
answers['type'] = answers['detection_type']
|
|
30
|
+
del answers['detection_type']
|
|
28
31
|
answers['status'] = "production" #start everything as production since that's what we INTEND the content to become
|
|
29
32
|
answers['description'] = 'UPDATE_DESCRIPTION'
|
|
30
33
|
file_name = answers['name'].replace(' ', '_').replace('-','_').replace('.','_').replace('/','_').lower()
|
|
34
|
+
answers['kind'] = answers['detection_kind']
|
|
31
35
|
answers['search'] = answers['detection_search'] + ' | `' + file_name + '_filter`'
|
|
36
|
+
del answers['detection_search']
|
|
32
37
|
answers['how_to_implement'] = 'UPDATE_HOW_TO_IMPLEMENT'
|
|
33
38
|
answers['known_false_positives'] = 'UPDATE_KNOWN_FALSE_POSITIVES'
|
|
34
39
|
answers['references'] = ['REFERENCE']
|
|
@@ -52,7 +57,7 @@ class NewContent:
|
|
|
52
57
|
'name': "True Positive Test",
|
|
53
58
|
'attack_data': [
|
|
54
59
|
{
|
|
55
|
-
'data': "
|
|
60
|
+
'data': "https://github.com/splunk/contentctl/wiki",
|
|
56
61
|
"sourcetype": "UPDATE SOURCETYPE",
|
|
57
62
|
"source": "UPDATE SOURCE"
|
|
58
63
|
}
|
|
@@ -65,18 +70,21 @@ class NewContent:
|
|
|
65
70
|
questions = NewContentQuestions.get_questions_story()
|
|
66
71
|
answers = questionary.prompt(questions)
|
|
67
72
|
answers['name'] = answers['story_name']
|
|
73
|
+
del answers['story_name']
|
|
68
74
|
answers['id'] = str(uuid.uuid4())
|
|
69
75
|
answers['version'] = 1
|
|
70
76
|
answers['date'] = datetime.today().strftime('%Y-%m-%d')
|
|
71
77
|
answers['author'] = answers['story_author']
|
|
78
|
+
del answers['story_author']
|
|
72
79
|
answers['description'] = 'UPDATE_DESCRIPTION'
|
|
73
80
|
answers['narrative'] = 'UPDATE_NARRATIVE'
|
|
74
81
|
answers['references'] = []
|
|
75
82
|
answers['tags'] = dict()
|
|
76
|
-
answers['tags']['analytic_story'] = answers['name']
|
|
77
83
|
answers['tags']['category'] = answers['category']
|
|
84
|
+
del answers['category']
|
|
78
85
|
answers['tags']['product'] = ['Splunk Enterprise','Splunk Enterprise Security','Splunk Cloud']
|
|
79
86
|
answers['tags']['usecase'] = answers['usecase']
|
|
87
|
+
del answers['usecase']
|
|
80
88
|
answers['tags']['cve'] = ['UPDATE WITH CVE(S) IF APPLICABLE']
|
|
81
89
|
return answers
|
|
82
90
|
|
|
@@ -84,13 +92,13 @@ class NewContent:
|
|
|
84
92
|
def execute(self, input_dto: new) -> None:
|
|
85
93
|
if input_dto.type == NewContentType.detection:
|
|
86
94
|
content_dict = self.buildDetection()
|
|
87
|
-
subdirectory = pathlib.Path('detections') / content_dict.
|
|
95
|
+
subdirectory = pathlib.Path('detections') / content_dict.pop('detection_kind')
|
|
88
96
|
elif input_dto.type == NewContentType.story:
|
|
89
97
|
content_dict = self.buildStory()
|
|
90
98
|
subdirectory = pathlib.Path('stories')
|
|
91
99
|
else:
|
|
92
100
|
raise Exception(f"Unsupported new content type: [{input_dto.type}]")
|
|
93
|
-
|
|
101
|
+
|
|
94
102
|
full_output_path = input_dto.path / subdirectory / SecurityContentObject_Abstract.contentNameToFileName(content_dict.get('name'))
|
|
95
103
|
YmlWriter.writeYmlFile(str(full_output_path), content_dict)
|
|
96
104
|
|
|
@@ -27,11 +27,6 @@ class NewContentQuestions:
|
|
|
27
27
|
'message': 'enter author name',
|
|
28
28
|
'name': 'detection_author',
|
|
29
29
|
},
|
|
30
|
-
{
|
|
31
|
-
"type": "text",
|
|
32
|
-
"message": "enter author name",
|
|
33
|
-
"name": "detection_author",
|
|
34
|
-
},
|
|
35
30
|
{
|
|
36
31
|
"type": "select",
|
|
37
32
|
"message": "select a detection type",
|
contentctl/objects/story_tags.py
CHANGED
|
@@ -14,6 +14,8 @@ class StoryUseCase(str,Enum):
|
|
|
14
14
|
APPLICATION_SECURITY = "Application Security"
|
|
15
15
|
SECURITY_MONITORING = "Security Monitoring"
|
|
16
16
|
ADVANCED_THREAD_DETECTION = "Advanced Threat Detection"
|
|
17
|
+
INSIDER_THREAT = "Insider Threat"
|
|
18
|
+
OTHER = "Other"
|
|
17
19
|
|
|
18
20
|
class StoryTags(BaseModel):
|
|
19
21
|
model_config = ConfigDict(extra='forbid', use_enum_values=True)
|
|
@@ -59,9 +59,9 @@ class FindingReportObject():
|
|
|
59
59
|
detection.tags.risk_level = "Critical"
|
|
60
60
|
|
|
61
61
|
evidence_str = "{"
|
|
62
|
-
for i in range(len(detection.tags.
|
|
63
|
-
evidence_str = evidence_str + '"' + detection.tags.
|
|
64
|
-
if not i == (len(detection.tags.
|
|
62
|
+
for i in range(len(detection.tags.required_fields)):
|
|
63
|
+
evidence_str = evidence_str + '"' + detection.tags.required_fields[i] + '": ' + detection.tags.required_fields[i].replace(".", "_")
|
|
64
|
+
if not i == (len(detection.tags.required_fields) - 1):
|
|
65
65
|
evidence_str = evidence_str + ', '
|
|
66
66
|
|
|
67
67
|
evidence_str = evidence_str + ', "sourceType": metadata.source_type, "source": metadata.source}'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -19,7 +19,7 @@ contentctl/actions/doc_gen.py,sha256=YNc1VYA0ikL1hWDHYjfEOmUkfhy8PEIdvTyC4ZLxQRY
|
|
|
19
19
|
contentctl/actions/initialize.py,sha256=2h3_A68mNWcyZjbrKF-OeQXBi5p4Zu3z74K7QxEtII4,1749
|
|
20
20
|
contentctl/actions/initialize_old.py,sha256=0qXbW_fNDvkcnEeL6Zpte8d-hpTu1REyzHsXOCY-YB8,9333
|
|
21
21
|
contentctl/actions/inspect.py,sha256=31v7hISc8B8w5tyMnBPSDb3AHRpm-K9rn-WqJRegzBQ,12628
|
|
22
|
-
contentctl/actions/new_content.py,sha256=
|
|
22
|
+
contentctl/actions/new_content.py,sha256=vhpZAIpsBPjrdsQQlVxRPdymM8xa5ju9XE3sa8S-ni4,6013
|
|
23
23
|
contentctl/actions/release_notes.py,sha256=akkFfLhsJuaPUyjsb6dLlKt9cUM-JApAjTFQMbYoXeM,13115
|
|
24
24
|
contentctl/actions/reporting.py,sha256=MJEmvmoA1WnSFZEU9QM6daL_W94oOX0WXAcX1qAM2As,1583
|
|
25
25
|
contentctl/actions/test.py,sha256=JXW1CR-tTM2kJ-U5NRG8quY3JlnOb4OmCBgX24XYWJ0,4896
|
|
@@ -33,7 +33,7 @@ contentctl/helper/logger.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
33
33
|
contentctl/helper/utils.py,sha256=iZ6keMdTCs1XySiDVoGIGkMSxD_eDUphwEW-VUYA6vM,15659
|
|
34
34
|
contentctl/input/backend_splunk_ba.py,sha256=Y70tJqgaUM0nzfm2SiGMof4HkhY84feqf-xnRx1xPb4,5861
|
|
35
35
|
contentctl/input/director.py,sha256=CNAzSpO2fjjnhyezOGn9u5QiKq3Xqq7rHI-X9LrpyCo,10716
|
|
36
|
-
contentctl/input/new_content_questions.py,sha256=
|
|
36
|
+
contentctl/input/new_content_questions.py,sha256=o4prlBoUhEMxqpZukquI9WKbzfFJfYhEF7a8m2q_BEE,5565
|
|
37
37
|
contentctl/input/sigma_converter.py,sha256=ATFNW7boNngp5dmWM7Gr4rMZrUKjvKW2_qu28--FdiU,19391
|
|
38
38
|
contentctl/input/ssa_detection_builder.py,sha256=43B7q4A8MEMjUU-FR7UapO80deW6BooV9WYzZWxcvgI,8377
|
|
39
39
|
contentctl/input/yml_reader.py,sha256=oaal24UP8rDXkCmN5I3GnIheZrsgkhbKOlzXtyhB474,1475
|
|
@@ -76,7 +76,7 @@ contentctl/objects/security_content_object.py,sha256=j8KNDwSMfZsSIzJucC3NuZo0SlF
|
|
|
76
76
|
contentctl/objects/ssa_detection.py,sha256=-G6tXfVVlZgPWS64hIIy3M-aMePANAuQvdpXPlgUyUs,5873
|
|
77
77
|
contentctl/objects/ssa_detection_tags.py,sha256=u8annjzo3MYZ-16wyFnuR8qJJzRa4LEhdprMIrQ47G0,5224
|
|
78
78
|
contentctl/objects/story.py,sha256=LQLCCK_3DkP2x8fQOzcnV0d18_gsVFeS06DEK-qaBUE,4526
|
|
79
|
-
contentctl/objects/story_tags.py,sha256=
|
|
79
|
+
contentctl/objects/story_tags.py,sha256=0oF1OePLBxa-RQPb438tXrrfosa939CP8UbNV0_S8XY,2225
|
|
80
80
|
contentctl/objects/test_group.py,sha256=Yb1sqGom6SkVL8B3czPndz8w3CK8WdwZ39V_cn0_JZQ,2600
|
|
81
81
|
contentctl/objects/threat_object.py,sha256=S8B7RQFfLxN_g7yKPrDTuYhIy9JvQH3YwJ_T5LUZIa4,711
|
|
82
82
|
contentctl/objects/unit_test.py,sha256=5EDsPNUct1UY5OtfX-VwFzhET83OmLA6XcaQiZWL1Uo,1655
|
|
@@ -93,7 +93,7 @@ contentctl/output/conf_output.py,sha256=qCRT77UKNFCe4AufeBV8Uz9lkPqgpGzU1Y149RuE
|
|
|
93
93
|
contentctl/output/conf_writer.py,sha256=2TaCAPEtU-bMa7A2m7xOxh93PMpzIdhwiHiPLUCeCB4,8281
|
|
94
94
|
contentctl/output/detection_writer.py,sha256=AzxbssNLmsNIOaYKotew5-ONoyq1cQpKSGy3pe191B0,960
|
|
95
95
|
contentctl/output/doc_md_output.py,sha256=gf7osH1uSrC6js3D_I72g4uDe9TaB3tsvtqCHi5znp0,3238
|
|
96
|
-
contentctl/output/finding_report_writer.py,sha256=
|
|
96
|
+
contentctl/output/finding_report_writer.py,sha256=bjJR7NAxLE8vt8uU3zSDhazQzqzOdtCsUu95lVdzU_w,3939
|
|
97
97
|
contentctl/output/jinja_writer.py,sha256=bdiqr9FaXYxth4wZ1A52zTMAS5stHNGpezTkaS5pres,1119
|
|
98
98
|
contentctl/output/json_writer.py,sha256=Z-iVLnZb8tzYATxbQtXax0dz572lVPFMNVTx-vWbnog,1007
|
|
99
99
|
contentctl/output/new_content_yml_output.py,sha256=ktZ9miHluqkw8jD-pn-62bjVp1sQqqQ7B53xy18DHU8,2321
|
|
@@ -157,12 +157,16 @@ contentctl/templates/deployments/escu_default_configuration_baseline.yml,sha256=
|
|
|
157
157
|
contentctl/templates/deployments/escu_default_configuration_correlation.yml,sha256=iWLqvJnUKVhpKaLBc_w_W65d9HVZgOZfGA-RIpxsH6M,519
|
|
158
158
|
contentctl/templates/deployments/escu_default_configuration_hunting.yml,sha256=hHmM8u7zncpb-32Qv74UoNs0HKwZwCMoKAq2ygDJZbo,329
|
|
159
159
|
contentctl/templates/deployments/escu_default_configuration_ttp.yml,sha256=1D-pvzaH1v3_yCZXaY6njmdvV4S2_Ak8uzzCOsnj9XY,548
|
|
160
|
-
contentctl/templates/detections/
|
|
160
|
+
contentctl/templates/detections/application/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
161
|
+
contentctl/templates/detections/cloud/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
162
|
+
contentctl/templates/detections/endpoint/anomalous_usage_of_7zip.yml,sha256=hkN214ZOqbQPWyYrqgbOrYb4iA0DroG1AnFRhSC_m0M,3323
|
|
163
|
+
contentctl/templates/detections/network/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
164
|
+
contentctl/templates/detections/web/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
161
165
|
contentctl/templates/macros/security_content_ctime.yml,sha256=Gg1YNllHVsX_YB716H1SJLWzxXZEfuJlnsgB2fuyoHU,159
|
|
162
166
|
contentctl/templates/macros/security_content_summariesonly.yml,sha256=9BYUxAl2E4Nwh8K19F3AJS8Ka7ceO6ZDBjFiO3l3LY0,162
|
|
163
167
|
contentctl/templates/stories/cobalt_strike.yml,sha256=rlaXxMN-5k8LnKBLPafBoksyMtlmsPMHPJOjTiMiZ-M,3063
|
|
164
|
-
contentctl-4.0.
|
|
165
|
-
contentctl-4.0.
|
|
166
|
-
contentctl-4.0.
|
|
167
|
-
contentctl-4.0.
|
|
168
|
-
contentctl-4.0.
|
|
168
|
+
contentctl-4.0.5.dist-info/LICENSE.md,sha256=hQWUayRk-pAiOZbZnuy8djmoZkjKBx8MrCFpW-JiOgo,11344
|
|
169
|
+
contentctl-4.0.5.dist-info/METADATA,sha256=64TV2vSygHoDN_WRiXDgUUvIZizbDqPFRNKMdM3RZiU,19751
|
|
170
|
+
contentctl-4.0.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
171
|
+
contentctl-4.0.5.dist-info/entry_points.txt,sha256=5bjZ2NkbQfSwK47uOnA77yCtjgXhvgxnmCQiynRF_-U,57
|
|
172
|
+
contentctl-4.0.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|