+ {usecases.map((usecase, index) => {
+ console.log(usecase)
+ return (
+ {
+ console.log("Clicked!")
+ addFilter(usecase.name.slice(3,usecase.name.length))
+ }}
+ variant="outlined"
+ color="primary"
+ />
+ )
+ })}
+
+ : null}
@@ -3108,7 +3316,7 @@ const Workflows = (props) => {
}}
color="primary"
>
- Submit Submit
+ Submit
diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go
index 9b634e90..e3d988ef 100644
--- a/functions/onprem/worker/worker.go
+++ b/functions/onprem/worker/worker.go
@@ -375,8 +375,10 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId)
})
} else {
- log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set", action.Name)
- return DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId)
+ log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set with identifier %s", action.Name, identifier)
+ returnvalue := DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId)
+ log.Printf("[DEBUG] Normal deploy ret: %s", returnvalue)
+ return returnvalue
}
return nil
@@ -397,9 +399,9 @@ func DeployContainer(ctx context.Context, cli *dockerclient.Client, config *cont
if !strings.Contains(err.Error(), "Conflict. The container name") {
log.Printf("[ERROR] Container CREATE error (1): %s", err)
- err = shuffle.DeleteCache(ctx, newExecId)
- if err != nil {
- log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, err)
+ cacheErr := shuffle.DeleteCache(ctx, newExecId)
+ if cacheErr != nil {
+ log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, cacheErr)
}
return err
@@ -420,9 +422,10 @@ func DeployContainer(ctx context.Context, cli *dockerclient.Client, config *cont
if err != nil {
log.Printf("[ERROR] Container create error (2): %s", err)
- err = shuffle.DeleteCache(ctx, newExecId)
- if err != nil {
- log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, err)
+
+ cacheErr := shuffle.DeleteCache(ctx, newExecId)
+ if cacheErr != nil {
+ log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, cacheErr)
}
return err
@@ -457,9 +460,9 @@ func DeployContainer(ctx context.Context, cli *dockerclient.Client, config *cont
if err != nil {
log.Printf("[ERROR] Container create error (3): %s", err)
- err = shuffle.DeleteCache(ctx, newExecId)
- if err != nil {
- log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, err)
+ cacheErr := shuffle.DeleteCache(ctx, newExecId)
+ if cacheErr != nil {
+ log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, cacheErr)
}
return err
@@ -472,9 +475,9 @@ func DeployContainer(ctx context.Context, cli *dockerclient.Client, config *cont
if err != nil {
log.Printf("[ERROR] Failed to start container in environment %s: %s", environment, err)
- err = shuffle.DeleteCache(ctx, newExecId)
- if err != nil {
- log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, err)
+ cacheErr := shuffle.DeleteCache(ctx, newExecId)
+ if cacheErr != nil {
+ log.Printf("[ERROR] FAILED Deleting cache for %s: %s", newExecId, cacheErr)
}
//shutdown(workflowExecution, workflowExecution.Workflow.ID, true)
@@ -1352,6 +1355,7 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
} else {
err = deployApp(dockercli, images[0], identifier, env, workflowExecution, action)
+ log.Printf("[DEBUG] Failed deploying app? %s", err)
if err != nil && !strings.Contains(err.Error(), "Conflict. The container name") {
if strings.Contains(err.Error(), "exited prematurely") {
log.Printf("[DEBUG] Shutting down (9)")
diff --git a/functions/usecases/categories.json b/functions/usecases/categories.json
index f32d9700..e438a380 100644
--- a/functions/usecases/categories.json
+++ b/functions/usecases/categories.json
@@ -1,522 +1,260 @@
-{
- "1. Collect & Distribute": {
- "2-way Ticket synchronization": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Email management": {
- "name": "",
- "description": "",
- "image": "",
- "Attachments": {
- "name": "",
- "description": "",
- "image": ""
+[
+ {
+ "name": "1. Collect & Distribute",
+ "color": "#c51152",
+ "list": [
+ {
+ "name": "2-way Ticket synchronization",
+ "items": {}
},
- "Manage senders": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Email management",
+ "items": {
+ "name": "Release a quarantined message",
+ "items": {}
+ }
},
- "Manage URLs": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "EDR to ticket",
+ "items": {
+ "name": "Get host information",
+ "items": {}
+ }
},
- "Encode & Decode URLs": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "SIEM to ticket",
+ "items": {}
},
- "Release a quarantined message": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "ChatOps",
+ "items": {}
+ },
+ {
+ "name": "Threat Intel received",
+ "items": {}
+ },
+ {
+ "name": "Domain investigation with LetsEncrypt",
+ "items": {}
+ },
+ {
+ "name": "Botnet tracker",
+ "items": {}
+ },
+ {
+ "name": "Get running containers",
+ "items": {}
+ },
+ {
+ "name": "Assign tickets",
+ "items": {}
+ },
+ {
+ "name": "Firewall alerts",
+ "items": {
+ "name": "URL filtering",
+ "items": {}
+ }
+ },
+ {
+ "name": "IDS/IPS alerts",
+ "items": {
+ "name": "Manage policies",
+ "items": {}
+ }
+ },
+ {
+ "name": "Deduplicate information",
+ "items": {}
+ },
+ {
+ "name": "Correlate information",
+ "items": {}
}
- },
- "EDR to ticket": {
- "name": "",
- "description": "",
- "image": "",
- "Fetch incidents & events": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Quarantine files": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Quarantine host (respond)": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Get host information": {
- "name": "",
- "description": "",
- "image": ""
- }
- },
- "SIEM to ticket": {
- "name": "",
- "description": "",
- "image": ""
- },
- "ChatOps": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Threat Intel received": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Domain investigation with LetsEncrypt": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Botnet tracker": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Get running containers": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Assign tickets": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Firewall alerts": {
- "name": "",
- "description": "",
- "image": "",
- "Block/accept policies": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Add addresses and ports to groups": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Support custom URL categories": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Fetch logs for specific address": {
- "name": "",
- "description": "",
- "image": ""
- },
- "URL filtering": {
- "name": "",
- "description": "",
- "image": ""
- }
- },
- "IDS/IPS alerts": {
- "name": "",
- "description": "",
- "image": "",
- "Get/Fetch alerts": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Receive alerts real-time": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Get PCAP files": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Get network logs": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Manage policies": {
- "name": "",
- "description": "",
- "image": ""
- }
- },
- "Deduplicate information": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Correlate information": {
- "name": "",
- "description": "",
- "image": ""
- }
+ ]
},
- "3. Detect": {
- "Search SIEM (Sigma)": {
- "name": "",
- "description": "",
- "image": "",
- "Network": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "2. Enrich",
+ "color": "#f4c20d",
+ "list": [
+ {
+ "name": "Internal Enrichment",
+ "items": {
+ "name": "...",
+ "items": {}
+ }
},
- "Endpoint": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "External historical Enrichment",
+ "items": {
+ "name": "...",
+ "items": {}
+ }
+ },
+ {
+ "name": "Realtime",
+ "items": {
+ "name": "Analyze screenshots",
+ "items": {}
+ }
+ },
+ {
+ "name": "Ticketing webhook verification",
+ "items": {}
}
- },
- "Search EDR (OSQuery)": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Search emails (Phish)": {
- "name": "",
- "description": "",
- "image": "",
- "Check malware": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Check targeted": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Check headers and IOCs": {
- "name": "",
- "description": "",
- "image": ""
- }
- },
- "Search IOCs (ioc-finder)": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Search files (Yara)": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Correlate tickets": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Honeypot access": {
- "name": "",
- "description": "",
- "image": "",
- "S3 Honeypot": {
- "name": "",
- "description": "",
- "image": ""
- },
- "SSH Honeypot": {
- "name": "",
- "description": "",
- "image": ""
- },
- "FTP honeypot": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Network honeypot": {
- "name": "",
- "description": "",
- "image": ""
- },
- "...": {
- "name": "",
- "description": "",
- "image": ""
- }
- }
+ ]
},
- "Verify": {
- "Discover vulnerabilities": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Discover assets": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Ensure policies are followed": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Find Inactive users": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Ensure access rights match HR systems": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Ensure onboarding is followed": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Third party apps in SaaS": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Devices used for your cloud account": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Too much access in GCP/Azure/AWS/ other clouds": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Certificate validation": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Monitor new DNS entries for domain with passive DNS": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Monitor and track password dumps": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Monitor for mentions of domain on darknet sites": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Reporting": {
- "name": "",
- "description": "",
- "image": "",
- "Automation time saved": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "3. Detect",
+ "color": "#3cba54",
+ "list": [
+ {
+ "name": "Search SIEM (Sigma)",
+ "items": {
+ "name": "Endpoint",
+ "items": {}
+ }
},
- "Automation money saved": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Search EDR (OSQuery)",
+ "items": {}
},
- "Incident response report": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Search emails (Phish)",
+ "items": {
+ "name": "Check headers and IOCs",
+ "items": {}
+ }
},
- "Department cost": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Search IOCs (ioc-finder)",
+ "items": {}
},
- "Monthly reports": {
- "name": "",
- "description": "",
- "image": "",
- "EDR alerts": {
- "name": "",
- "description": "",
- "image": ""
- },
- "SIEM alerts": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Emails quarantined": {
- "name": "",
- "description": "",
- "image": ""
- },
- "...": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Search files (Yara)",
+ "items": {}
+ },
+ {
+ "name": "Correlate tickets",
+ "items": {}
+ },
+ {
+ "name": "Honeypot access",
+ "items": {
+ "name": "...",
+ "items": {}
}
}
- }
+ ]
},
- "4. Respond": {
- "Eradicate malware": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Quarantine host(s)": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Trigger scans": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Update indicators (FW, EDR, SIEM...)": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Autoblock activity when threat intel is received": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Lock/Delete/Reset account": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Lock vault": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Increase authentication": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Get policies from assets": {
- "name": "",
- "description": "",
- "image": ""
- }
+ {
+ "name": "4. Respond",
+ "color": "#4a148c",
+ "list": [
+ {
+ "name": "Eradicate malware",
+ "items": {}
+ },
+ {
+ "name": "Quarantine host(s)",
+ "items": {}
+ },
+ {
+ "name": "Trigger scans",
+ "items": {}
+ },
+ {
+ "name": "Update indicators (FW, EDR, SIEM...)",
+ "items": {}
+ },
+ {
+ "name": "Autoblock activity when threat intel is received",
+ "items": {}
+ },
+ {
+ "name": "Lock/Delete/Reset account",
+ "items": {}
+ },
+ {
+ "name": "Lock vault",
+ "items": {}
+ },
+ {
+ "name": "Increase authentication",
+ "items": {}
+ },
+ {
+ "name": "Get policies from assets",
+ "items": {}
+ }
+ ]
},
- "2. Enrich": {
- "Internal Enrichment": {
- "name": "",
- "description": "",
- "image": "",
- "Users": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "5. Verify",
+ "color": "#4885ed",
+ "list": [
+ {
+ "name": "Discover vulnerabilities",
+ "items": {}
},
- "Hostnames": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Discover assets",
+ "items": {}
},
- "IPs": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Ensure policies are followed",
+ "items": {}
},
- "Departments": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Find Inactive users",
+ "items": {}
},
- "Role": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Ensure access rights match HR systems",
+ "items": {}
},
- "Software": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Ensure onboarding is followed",
+ "items": {}
},
- "...": {
- "name": "",
- "description": "",
- "image": ""
+ {
+ "name": "Third party apps in SaaS",
+ "items": {}
+ },
+ {
+ "name": "Devices used for your cloud account",
+ "items": {}
+ },
+ {
+ "name": "Too much access in GCP/Azure/AWS/ other clouds",
+ "items": {}
+ },
+ {
+ "name": "Certificate validation",
+ "items": {}
+ },
+ {
+ "name": "Monitor new DNS entries for domain with passive DNS",
+ "items": {}
+ },
+ {
+ "name": "Monitor and track password dumps",
+ "items": {}
+ },
+ {
+ "name": "Monitor for mentions of domain on darknet sites",
+ "items": {}
+ },
+ {
+ "name": "Reporting",
+ "items": {
+ "name": "Monthly reports",
+ "items": {
+ "name": "...",
+ "items": {}
+ }
+ }
}
- },
- "External historical Enrichment": {
- "name": "",
- "description": "",
- "image": "",
- "IPs": {
- "name": "",
- "description": "",
- "image": ""
- },
- "URLs": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Hashes": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Files": {
- "name": "",
- "description": "",
- "image": ""
- },
- "...": {
- "name": "",
- "description": "",
- "image": ""
- }
- },
- "Realtime": {
- "name": "",
- "description": "",
- "image": "",
- "File detonation": {
- "name": "",
- "description": "",
- "image": ""
- },
- "URL detonation": {
- "name": "",
- "description": "",
- "image": ""
- },
- "PCAP analysis": {
- "name": "",
- "description": "",
- "image": ""
- },
- "Analyze screenshots": {
- "name": "",
- "description": "",
- "image": ""
- }
- },
- "Ticketing webhook verification": {
- "name": "",
- "description": "",
- "image": ""
- }
+ ]
}
-}
\ No newline at end of file
+]
\ No newline at end of file
diff --git a/functions/usecases/categories.rtf b/functions/usecases/categories.rtf
index e66d5fbf..e19cf26a 100644
--- a/functions/usecases/categories.rtf
+++ b/functions/usecases/categories.rtf
@@ -3,7 +3,7 @@
{\f0\froman Arial;}
}
{\info
-{\createim\yr2022\mo2\dy18\hr17\min49}
+{\createim\yr2022\mo2\dy20\hr1\min15}
}
\paperw11907\paperh16840\margl1800\margr1800\margt1440\margb1440
@@ -279,7 +279,7 @@ rich
\par\pard\plain
\slmult0\ltrpar\li200
{\fs24
-Verify
+5. Verify
}
\par\pard\plain
\slmult0\ltrpar\li400
@@ -444,11 +444,6 @@ Increase authentication
\par\pard\plain
\slmult0\ltrpar\li400
{\fs24
-Trigger scans
-}
-\par\pard\plain
-\slmult0\ltrpar\li400
-{\fs24
Get policies from assets
}
\par\pard\plain
diff --git a/functions/usecases/read_categories.py b/functions/usecases/read_categories.py
index c99c4f01..65df43c9 100644
--- a/functions/usecases/read_categories.py
+++ b/functions/usecases/read_categories.py
@@ -2,11 +2,16 @@ data = ""
with open("categories.rtf", "r") as tmp:
data = tmp.read()
-fixed_json = {}
+fixed_json = []
linearity = 0
heading = ""
subheading = ""
subsubheading = ""
+
+cnt = -1
+subcnt = -1
+
+colors = ["#c51152", "#3cba54", "#4885ed", "#4a148c", "#f4c20d"]
for line in data.split("\n"):
if line == "rich":
continue
@@ -30,16 +35,23 @@ for line in data.split("\n"):
continue
if linearity == 2:
- fixed_json[line] = {}
+ #if cnt >= 0:
+ # for key, value in fixed_json[cnt].items():
+ # print(key, value)
+
+
+ cnt += 1
+ subcnt = -1
+ fixed_json.append({"name": line, "color": colors[cnt], "list": []})
heading = line
elif linearity == 4:
- fixed_json[heading][line] = {"name": "", "description": "", "image": ""}
subheading = line
+ fixed_json[cnt]["list"].append({"name": line, "items": {}})
+ subcnt += 1
elif linearity == 6:
- fixed_json[heading][subheading][line] = {"name": "", "description": "", "image": ""}
- subsubheading = line
+ fixed_json[cnt]["list"][subcnt]["items"] = {"name": line, "items": {}}
elif linearity == 8:
- fixed_json[heading][subheading][subsubheading][line] = {"name": "", "description": "", "image": ""}
+ fixed_json[cnt]["list"][subcnt]["items"]["items"] = {"name": line, "items": {}}
else:
print("No handler for %s" % line)
@@ -47,6 +59,7 @@ for line in data.split("\n"):
#print(data)
import json
filename = "categories.json"
+fixed_json.sort(key=lambda x: x["name"])
with open(filename, "w+") as tmp:
tmp.write(json.dumps(fixed_json, indent=4))