From 59375f171dd698da04ceda751c38a45d7b08b3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leonard?= Date: Fri, 24 Apr 2020 17:19:06 +0200 Subject: [PATCH] #599 #600 #697 Update short report to avoid being too long, remove input in short reports, add templates folders, improve long report to see both complete input and output --- ...mBase64.json => CyberChef_FromBase64.json} | 0 ...rCode.json => CyberChef_FromCharCode.json} | 0 ...hefFromHex.json => CyberChef_FromHex.json} | 0 analyzers/CyberChef/cyberchef.py | 8 +--- analyzers/CyberChef/long.html | 16 -------- .../CyberChef_FromBase64_1_0/long.html | 37 +++++++++++++++++++ .../CyberChef_FromBase64_1_0}/short.html | 0 .../CyberChef_FromCharCode_1_0/long.html | 37 +++++++++++++++++++ .../CyberChef_FromCharCode_1_0/short.html | 3 ++ .../CyberChef_FromHex_1_0/long.html | 37 +++++++++++++++++++ .../CyberChef_FromHex_1_0/short.html | 3 ++ 11 files changed, 119 insertions(+), 22 deletions(-) rename analyzers/CyberChef/{CyberChefFromBase64.json => CyberChef_FromBase64.json} (100%) rename analyzers/CyberChef/{CyberChefFromCharCode.json => CyberChef_FromCharCode.json} (100%) rename analyzers/CyberChef/{CyberChefFromHex.json => CyberChef_FromHex.json} (100%) delete mode 100644 analyzers/CyberChef/long.html create mode 100644 thehive-templates/CyberChef_FromBase64_1_0/long.html rename {analyzers/CyberChef => thehive-templates/CyberChef_FromBase64_1_0}/short.html (100%) create mode 100644 thehive-templates/CyberChef_FromCharCode_1_0/long.html create mode 100644 thehive-templates/CyberChef_FromCharCode_1_0/short.html create mode 100644 thehive-templates/CyberChef_FromHex_1_0/long.html create mode 100644 thehive-templates/CyberChef_FromHex_1_0/short.html diff --git a/analyzers/CyberChef/CyberChefFromBase64.json b/analyzers/CyberChef/CyberChef_FromBase64.json similarity index 100% rename from analyzers/CyberChef/CyberChefFromBase64.json rename to analyzers/CyberChef/CyberChef_FromBase64.json diff --git a/analyzers/CyberChef/CyberChefFromCharCode.json b/analyzers/CyberChef/CyberChef_FromCharCode.json similarity index 100% rename from analyzers/CyberChef/CyberChefFromCharCode.json rename to analyzers/CyberChef/CyberChef_FromCharCode.json diff --git a/analyzers/CyberChef/CyberChefFromHex.json b/analyzers/CyberChef/CyberChef_FromHex.json similarity index 100% rename from analyzers/CyberChef/CyberChefFromHex.json rename to analyzers/CyberChef/CyberChef_FromHex.json diff --git a/analyzers/CyberChef/cyberchef.py b/analyzers/CyberChef/cyberchef.py index b3392e9c2..eb48eccff 100755 --- a/analyzers/CyberChef/cyberchef.py +++ b/analyzers/CyberChef/cyberchef.py @@ -16,14 +16,10 @@ def summary(self, raw): taxonomies = [] level = 'info' namespace = 'CyberChef' - - # Set predicate for input - predicate = 'input_data' - taxonomies.append(self.build_taxonomy(level, namespace, predicate, raw['input_data'])) # Set predicate for output_data - predicate = 'output_data' - taxonomies.append(self.build_taxonomy(level, namespace, predicate, raw['output_data'])) + predicate = self.service + taxonomies.append(self.build_taxonomy(level, namespace, predicate, "baked!")) return {"taxonomies": taxonomies} diff --git a/analyzers/CyberChef/long.html b/analyzers/CyberChef/long.html deleted file mode 100644 index e4be416d8..000000000 --- a/analyzers/CyberChef/long.html +++ /dev/null @@ -1,16 +0,0 @@ -
-
- CyberChef Data Conversion -
-
- - - - - - - - -
InputOutput
{{content.input_data | ellipsis:40}}{{content.output_data}}
-
-
diff --git a/thehive-templates/CyberChef_FromBase64_1_0/long.html b/thehive-templates/CyberChef_FromBase64_1_0/long.html new file mode 100644 index 000000000..ec672efed --- /dev/null +++ b/thehive-templates/CyberChef_FromBase64_1_0/long.html @@ -0,0 +1,37 @@ + + +
+
+ CyberChef Data Conversion +
+
+ + + + + + + + +
InputOutput
{{content.input_data }}
{{content.output_data}}
+
+
diff --git a/analyzers/CyberChef/short.html b/thehive-templates/CyberChef_FromBase64_1_0/short.html similarity index 100% rename from analyzers/CyberChef/short.html rename to thehive-templates/CyberChef_FromBase64_1_0/short.html diff --git a/thehive-templates/CyberChef_FromCharCode_1_0/long.html b/thehive-templates/CyberChef_FromCharCode_1_0/long.html new file mode 100644 index 000000000..ec672efed --- /dev/null +++ b/thehive-templates/CyberChef_FromCharCode_1_0/long.html @@ -0,0 +1,37 @@ + + +
+
+ CyberChef Data Conversion +
+
+ + + + + + + + +
InputOutput
{{content.input_data }}
{{content.output_data}}
+
+
diff --git a/thehive-templates/CyberChef_FromCharCode_1_0/short.html b/thehive-templates/CyberChef_FromCharCode_1_0/short.html new file mode 100644 index 000000000..5fc0dabfb --- /dev/null +++ b/thehive-templates/CyberChef_FromCharCode_1_0/short.html @@ -0,0 +1,3 @@ + + {{t.namespace}}:{{t.predicate}}="{{t.value}}" + diff --git a/thehive-templates/CyberChef_FromHex_1_0/long.html b/thehive-templates/CyberChef_FromHex_1_0/long.html new file mode 100644 index 000000000..ec672efed --- /dev/null +++ b/thehive-templates/CyberChef_FromHex_1_0/long.html @@ -0,0 +1,37 @@ + + +
+
+ CyberChef Data Conversion +
+
+ + + + + + + + +
InputOutput
{{content.input_data }}
{{content.output_data}}
+
+
diff --git a/thehive-templates/CyberChef_FromHex_1_0/short.html b/thehive-templates/CyberChef_FromHex_1_0/short.html new file mode 100644 index 000000000..5fc0dabfb --- /dev/null +++ b/thehive-templates/CyberChef_FromHex_1_0/short.html @@ -0,0 +1,3 @@ + + {{t.namespace}}:{{t.predicate}}="{{t.value}}" +