-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcryton.schema.json
More file actions
1 lines (1 loc) · 25.8 KB
/
cryton.schema.json
File metadata and controls
1 lines (1 loc) · 25.8 KB
1
{"definitions": {"metadata": {"type": "object", "properties": {"description": {"type": "string", "description": "Description."}}, "additionalProperties": true, "description": "Additional information. Won't affect the scenario."}, "step": {"type": "object", "properties": {"metadata": {"$ref": "#/definitions/metadata"}, "is_init": {"type": "boolean", "description": "Mark the step as initial."}, "module": {"type": "string", "description": "Module to run."}, "arguments": {"type": "object", "description": "Arguments passed to the module."}, "output": {"type": "object", "properties": {"alias": {"type": "string", "pattern": "^[a-zA-Z0-9_-]+$", "description": "Alias used in output sharing."}, "mapping": {"type": "array", "items": {"type": "object", "properties": {"from": {"type": "string", "description": "Original path."}, "to": {"type": "string", "description": "New path."}}, "additionalProperties": false}, "description": "Mapping of the module output."}, "replace": {"type": "object", "patternProperties": {"^.*$": {"type": "string"}}, "additionalProperties": false, "description": "Replace with regex parts of module output."}}, "additionalProperties": false, "description": "Settings for output sharing."}, "next": {"description": "Settings for conditional execution.", "type": "array", "items": {"type": "object", "properties": {"type": {"type": "string", "enum": ["state", "serialized_output", "output", "any"], "description": "Which type of output to compare."}, "step": {"anyOf": [{"type": "array", "items": {"type": "string"}}, {"type": "string"}], "description": "Step(s) to execute in case of matched conditions."}}, "required": ["type", "step"], "allOf": [{"if": {"properties": {"type": {"const": "state"}}, "required": ["type"]}, "then": {"properties": {"value": {"description": "Value that will trigger the the successor(s).", "type": "string", "enum": ["finished", "failed", "error"]}}, "required": ["value"]}}, {"if": {"properties": {"type": {"const": "serialized_output"}}, "required": ["type"]}, "then": {"properties": {"value": {"description": "Value that will trigger the the successor(s).", "type": "string"}}, "required": ["value"]}}, {"if": {"properties": {"type": {"const": "output"}}, "required": ["type"]}, "then": {"properties": {"value": {"description": "Value that will trigger the the successor(s).", "type": "string"}}, "required": ["value"]}}, {"if": {"properties": {"type": {"const": "any"}}, "required": ["type"]}, "then": {"maxProperties": 2}}]}}}, "allOf": [{"if": {"properties": {"module": {"const": "atomic_red_team"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"definitions": {"powershell": {"type": "object", "description": "Powershell related options.", "properties": {"executable": {"type": "string", "description": "Path to Powershell executable."}, "install": {"type": "boolean", "description": "Whether to auto install Powershell."}}, "additionalProperties": false, "maxProperties": 1}, "session_id": {"type": "integer", "description": "Metasploit session ID to use."}}, "type": "object", "description": "Arguments for the `atomic_red_team` module.", "oneOf": [{"properties": {"session_id": {"anyOf": [{"$ref": "#/definitions/session_id"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "powershell": {"anyOf": [{"$ref": "#/definitions/powershell"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "technique": {"anyOf": [{"type": "string", "description": "ID of the Atomic technique (possibly with test IDs)."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "test_guids": {"anyOf": [{"type": "array", "items": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "description": "Test GUIDs to run."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "parameters": {"anyOf": [{"type": "object", "description": "Input arguments for the test(s)."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "additionalProperties": false, "required": ["technique"]}, {"properties": {"session_id": {"anyOf": [{"$ref": "#/definitions/session_id"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "powershell": {"anyOf": [{"$ref": "#/definitions/powershell"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "command": {"anyOf": [{"type": "string", "description": "Custom Atomic command."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "command"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `command` module.", "properties": {"command": {"anyOf": [{"type": "string", "description": "Command to run with syntax as in command line."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "timeout": {"anyOf": [{"type": "integer", "description": "Timeout for the command (**in seconds**)."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "serialize_output": {"anyOf": [{"type": "boolean", "description": "Try to parse the output of the command into `serialized_output`."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "session_id": {"anyOf": [{"type": "integer", "description": "ID of the session to use."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "force_shell": {"anyOf": [{"type": "boolean", "description": "Run the `command` in shell even in a Meterpreter session."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["command"], "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "empire"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `empire` module.", "properties": {"action": {"anyOf": [{"type": "string", "enum": ["execute-command", "execute-module", "deploy"]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "agent_name": {"anyOf": [{"type": "string", "pattern": "^[a-zA-Z0-9]+$"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["action", "agent_name"], "allOf": [{"if": {"properties": {"action": {"const": "execute-command"}}, "required": ["action"]}, "then": {"properties": {"command": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["command"]}}, {"if": {"properties": {"action": {"const": "execute-module"}}, "required": ["action"]}, "then": {"properties": {"module": {"anyOf": [{"type": "object", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "arguments": {"anyOf": [{"type": "object"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["name"], "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["module"]}}, {"if": {"properties": {"action": {"const": "deploy"}}, "required": ["action"]}, "then": {"properties": {"session_id": {"anyOf": [{"type": "integer"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "listener": {"anyOf": [{"type": "object", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "port": {"anyOf": [{"type": "integer"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "type": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "options": {"anyOf": [{"type": "object"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["name"]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "stager": {"anyOf": [{"type": "object", "properties": {"type": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "options": {"anyOf": [{"type": "object"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["type"]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["listener", "stager", "session_id"]}}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "ffuf"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `ffuf` module.", "oneOf": [{"properties": {"target": {"anyOf": [{"type": "string", "description": "Scan target."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "wordlist": {"anyOf": [{"type": "string", "description": "The wordlist for fuzzing the webserver."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "options": {"anyOf": [{"type": "string", "description": "Additional FFUF parameters."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "serialize_output": {"anyOf": [{"type": "boolean", "description": "Use FFUF's serialization."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["target", "wordlist"], "additionalProperties": false}, {"properties": {"command": {"anyOf": [{"type": "string", "description": "Command to run with syntax as in command line (with executable)."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["command"], "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "medusa"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"definitions": {"username": {"type": "string", "description": "Username."}, "username_file": {"type": "string", "description": "Absolute path to file with usernames."}, "password": {"type": "string", "description": "Password."}, "password_file": {"type": "string", "description": "Absolute path to file with passwords."}, "combo_file": {"type": "string", "description": "Absolute path to file with username and password pairs."}}, "type": "object", "description": "Arguments for the `medusa` module.", "oneOf": [{"properties": {"target": {"anyOf": [{"type": "string", "description": "Bruteforce target."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "mod": {"anyOf": [{"type": "string", "description": "mod (service) to attack."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "tasks": {"anyOf": [{"type": "integer", "description": "Number of login pairs tested concurrently."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "options": {"anyOf": [{"type": "string", "description": "Additional Medusa parameters."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "credentials": {"anyOf": [{"type": "object", "description": "", "oneOf": [{"properties": {"combo_file": {"$ref": "#/definitions/combo_file"}}, "minProperties": 1, "additionalProperties": false}, {"properties": {"username": {"$ref": "#/definitions/username"}, "password": {"$ref": "#/definitions/password"}}, "minProperties": 2, "additionalProperties": false}, {"properties": {"username": {"$ref": "#/definitions/username"}, "password_file": {"$ref": "#/definitions/password_file"}}, "minProperties": 2, "additionalProperties": false}, {"properties": {"username_file": {"$ref": "#/definitions/username_file"}, "password": {"$ref": "#/definitions/password"}}, "minProperties": 2, "additionalProperties": false}, {"properties": {"username_file": {"$ref": "#/definitions/username_file"}, "password_file": {"$ref": "#/definitions/password_file"}}, "minProperties": 2, "additionalProperties": false}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["target", "credentials"], "additionalProperties": false}, {"properties": {"command": {"anyOf": [{"type": "string", "description": "Command to run with syntax as in command line (with executable)."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["command"], "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "metasploit"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `metasploit` module.", "OneOf": [{"properties": {"module_name": {"type": "string", "description": "Name of the Metasploit module to use."}, "datastore": {"type": "object", "description": "Datastore options to use for the execution."}, "timeout": {"type": "integer", "description": "The maximum time to wait for the output"}}, "additionalProperties": false, "required": ["module_name"]}, {"properties": {"commands": {"type": "array", "description": "Custom set of commands to execute in an order.", "items": {"type": "string"}}, "timeout": {"type": "integer", "description": "The maximum time to wait for the output"}}, "additionalProperties": false, "required": ["commands"]}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "nmap"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `nmap` module.", "properties": {"timeout": {"anyOf": [{"type": "integer"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "port_parameters": {"anyOf": [{"type": "array", "items": {"anyOf": [{"type": "object", "properties": {"portid": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "host": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "protocol": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "state": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "reason": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "cpe": {"anyOf": [{"type": "array"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "scripts": {"anyOf": [{"type": "array"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "service": {"anyOf": [{"type": "object", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "product": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "version": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "extrainfo": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "ostype": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "method": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "conf": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "description": ""}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "oneOf": [{"properties": {"target": {"anyOf": [{"type": "string", "description": "Scan target."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "ports": {"anyOf": [{"type": "array", "items": {"anyOf": [{"type": "integer"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "description": ""}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "options": {"anyOf": [{"type": "string", "description": "Additional nmap parameters."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["target"]}, {"properties": {"command": {"anyOf": [{"type": "string", "description": "Command to run (with executable)."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "serialize_output": {"anyOf": [{"type": "boolean"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["command"]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "script"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `script` module.", "properties": {"script_path": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "executable": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "script_arguments": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "serialize_output": {"anyOf": [{"type": "boolean"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "timeout": {"anyOf": [{"type": "integer"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["script_path", "executable"], "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}, {"if": {"properties": {"module": {"const": "wpscan"}}, "required": ["module"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `wpscan` module.", "oneOf": [{"properties": {"target": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "options": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "api_token": {"anyOf": [{"type": "string"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, "serialize_output": {"anyOf": [{"type": "boolean"}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["target"], "additionalProperties": false}, {"properties": {"command": {"anyOf": [{"type": "string", "description": "Command to run (with executable)."}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["command"], "additionalProperties": false}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}}}], "required": ["module"], "additionalProperties": false}, "stage": {"type": "object", "description": "", "properties": {"metadata": {"$ref": "#/definitions/metadata"}, "type": {"type": "string", "enum": ["immediate", "delta", "time", "http", "metasploit"], "description": "How and when to start the stage."}, "depends_on": {"type": "array", "items": {"type": "string", "pattern": "^[a-zA-Z0-9_-]+$"}, "description": "Which stages must be finished before execution."}, "arguments": {"type": "object", "description": "Define arguments for triggering the stage."}, "steps": {"type": "object", "patternProperties": {"^[a-zA-Z0-9_-]+$": {"$ref": "#/definitions/step"}}, "description": "Stage's steps."}}, "additionalProperties": false, "required": ["steps"], "allOf": [{"if": {"properties": {"type": {"const": "delta"}}, "required": ["type"]}, "then": {"properties": {"arguments": {"type": "object", "properties": {"days": {"type": "integer", "description": "Wait for n days."}, "hours": {"type": "integer", "description": "Wait for n hours."}, "minutes": {"type": "integer", "description": "Wait for n minutes."}, "seconds": {"type": "integer", "description": "Wait for n seconds."}}, "minProperties": 1, "additionalProperties": false}}, "required": ["arguments"]}}, {"if": {"properties": {"type": {"const": "time"}}, "required": ["type"]}, "then": {"properties": {"arguments": {"type": "object", "properties": {"timezone": {"type": "string", "description": "Timezone when to start the execution."}, "year": {"type": "integer", "description": "Year when to start the execution."}, "month": {"type": "integer", "description": "Month when to start the execution."}, "day": {"type": "integer", "description": "Day when to start the execution."}, "hour": {"type": "integer", "description": "Hour when to start the execution."}, "minute": {"type": "integer", "description": "Minute when to start the execution."}, "second": {"type": "integer", "description": "second when to start the execution."}}, "if": {"properties": {"timezone": {"pattern": "^.*$"}}, "required": ["timezone"]}, "then": {"minProperties": 2}, "else": {"minProperties": 1}}}, "required": ["arguments"]}}, {"if": {"properties": {"type": {"const": "http"}}, "required": ["type"]}, "then": {"properties": {"arguments": {"type": "object", "properties": {"host": {"type": "string", "description": "Address used to serve the listener on the Worker machine."}, "port": {"type": "integer", "description": "Port used to serve the listener on the Worker machine."}, "routes": {"description": "List of routes the listener will check for requests.", "type": "array", "items": {"type": "object", "properties": {"path": {"type": "string", "description": "Request's path."}, "method": {"type": "string", "description": "Request's allowed method."}, "parameters": {"description": "Request's required parameters.", "type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "description": "Parameter's name."}, "value": {"type": "string", "description": "Parameter's value."}}, "required": ["name", "value"], "additionalProperties": false}, "minItems": 1}}, "required": ["path", "method", "parameters"], "additionalProperties": false}, "minItems": 1}}, "required": ["port", "routes"], "additionalProperties": false}}, "required": ["arguments"]}}, {"if": {"properties": {"type": {"const": "metasploit"}}, "required": ["type"]}, "then": {"properties": {"arguments": {"anyOf": [{"type": "object", "description": "Arguments for the `metasploit` module.", "OneOf": [{"properties": {"module_name": {"type": "string", "description": "Name of the Metasploit module to use."}, "datastore": {"type": "object", "description": "Datastore options to use for the execution."}, "timeout": {"type": "integer", "description": "The maximum time to wait for the output"}}, "additionalProperties": false, "required": ["module_name"]}, {"properties": {"commands": {"type": "array", "description": "Custom set of commands to execute in an order.", "items": {"type": "string"}}, "timeout": {"type": "integer", "description": "The maximum time to wait for the output"}}, "additionalProperties": false, "required": ["commands"]}]}, {"type": "string", "pattern": "^\\$.+$"}, {"type": "string", "pattern": "^\\{\\{.*\\}\\}$"}]}}, "required": ["arguments"]}}]}}, "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/cryton.schema.json", "title": "Cryton template", "type": "object", "description": "Cryton template schema", "properties": {"name": {"type": "string", "description": "Name of the scenario."}, "dynamic": {"type": "boolean", "description": "Whether the plan can be changed during runtime or not."}, "settings": {"type": "object", "properties": {"separator": {"type": "string", "description": "Separator used in output sharing."}}, "description": "Scenario specific settings."}, "metadata": {"$ref": "#/definitions/metadata"}, "stages": {"type": "object", "patternProperties": {"^[a-zA-Z0-9_-]+$": {"$ref": "#/definitions/stage"}}, "description": "Scenario's stages."}}, "required": ["name", "stages"], "additionalProperties": false}