Files
splunk-security_content/playbooks/Active_Directory_Disable_Account_Dispatch.json
2026-04-28 10:47:57 -04:00

605 lines
29 KiB
JSON

{
"blockly": false,
"blockly_xml": "<xml></xml>",
"category": "Disable Account",
"coa": {
"data": {
"description": "Accepts user name that needs to be disabled in Active Directory. Generates a report and observable output based on the status of account locking or disabling.",
"edges": [
{
"id": "port_3_to_port_7",
"sourceNode": "3",
"sourcePort": "3_out",
"targetNode": "7",
"targetPort": "7_in"
},
{
"conditions": [
{
"index": 1
}
],
"id": "port_7_to_port_9",
"sourceNode": "7",
"sourcePort": "7_out",
"targetNode": "9",
"targetPort": "9_in"
},
{
"id": "port_8_to_port_10",
"sourceNode": "8",
"sourcePort": "8_out",
"targetNode": "10",
"targetPort": "10_in"
},
{
"id": "port_10_to_port_11",
"sourceNode": "10",
"sourcePort": "10_out",
"targetNode": "11",
"targetPort": "11_in"
},
{
"id": "port_11_to_port_12",
"sourceNode": "11",
"sourcePort": "11_out",
"targetNode": "12",
"targetPort": "12_in"
},
{
"id": "port_12_to_port_1",
"sourceNode": "12",
"sourcePort": "12_out",
"targetNode": "1",
"targetPort": "1_in"
},
{
"id": "port_0_to_port_3",
"sourceNode": "0",
"sourcePort": "0_out",
"targetNode": "3",
"targetPort": "3_in"
},
{
"conditions": [
{
"index": 0
}
],
"id": "port_13_to_port_8",
"sourceNode": "13",
"sourcePort": "13_out",
"targetNode": "8",
"targetPort": "8_in"
},
{
"conditions": [
{
"index": 0
}
],
"id": "port_7_to_port_13",
"sourceNode": "7",
"sourcePort": "7_out",
"targetNode": "13",
"targetPort": "13_in"
}
],
"hash": "3268ee70fd0ab575e5b7d055b3420d043f661155",
"nodes": {
"0": {
"data": {
"advanced": {
"join": []
},
"functionName": "on_start",
"id": "0",
"type": "start"
},
"errors": {},
"id": "0",
"type": "start",
"warnings": {},
"x": 160,
"y": -6.394884621840902e-14
},
"1": {
"data": {
"advanced": {
"join": []
},
"functionName": "on_finish",
"id": "1",
"type": "end"
},
"errors": {},
"id": "1",
"type": "end",
"warnings": {},
"x": 300,
"y": 1414
},
"10": {
"data": {
"advanced": {
"customName": "merge report",
"customNameId": 0,
"description": "summary report for all disable account input playbooks.",
"join": [],
"note": "summary report for all disable account input playbooks."
},
"functionId": 1,
"functionName": "merge_report",
"id": "10",
"parameters": [
"normalized_observable_filter:custom_function:observable_merge_report"
],
"template": "SOAR retrieved tickets from Splunk. The table below shows a summary of the information gathered.\\n\\n\n| value | type | message | status |\n| --- | --- | --- | --- |\n%%\n| {0}\n%%\n",
"type": "format"
},
"errors": {},
"id": "10",
"type": "format",
"userCode": "\n # Write your custom code here...\n #phantom.debug(phantom.format(container=container, template=template, parameters=parameters, name=\"merge_report\"))\n",
"warnings": {},
"x": 280,
"y": 880
},
"11": {
"data": {
"advanced": {
"customName": "tag indicators",
"customNameId": 0,
"description": "adding indicator tag for each disabled account.",
"join": [],
"note": "adding indicator tag for each disabled account."
},
"customFunction": {
"draftMode": false,
"name": "indicator_tag",
"repoName": "community"
},
"functionId": 3,
"functionName": "tag_indicators",
"id": "11",
"selectMore": false,
"tab": "customFunctions",
"type": "utility",
"utilities": {
"indicator_tag": {
"description": "Tag an existing indicator record. Tags can be overwritten or appended.",
"fields": [
{
"dataTypes": [
"*"
],
"description": "Specifies the indicator which the tag will be added to. Supports a string indicator value or an indicator id.",
"inputType": "item",
"label": "indicator",
"name": "indicator",
"placeholder": "my_indicator",
"renderType": "datapath",
"required": false
},
{
"dataTypes": [
"*"
],
"description": "Comma separated list of tags. Tags should only contain characters Aa-Zz, 0-9, '-', and '_'.",
"inputType": "item",
"label": "tags",
"name": "tags",
"placeholder": "tag1,tag2,...,tagk",
"renderType": "datapath",
"required": false
},
{
"dataTypes": [],
"description": "Either True or False with default as False. If set to True, existing tags on the indicator record will be replaced by the provided input. If set to False, the new tags will be appended to the existing indicator tags.",
"inputType": "item",
"label": "overwrite",
"name": "overwrite",
"placeholder": "False",
"renderType": "datapath",
"required": false
}
],
"label": "indicator_tag",
"name": "indicator_tag"
}
},
"utilityType": "custom_function",
"values": {
"indicator_tag": {
"indicator": "normalized_observable_filter:custom_function:observable_value",
"overwrite": null,
"tags": "normalized_observable_filter:custom_function:observable_type"
}
}
},
"errors": {},
"id": "11",
"type": "utility",
"warnings": {},
"x": 280,
"y": 1058
},
"12": {
"data": {
"advanced": {
"customName": "update workbook task",
"customNameId": 0,
"description": "update workbook task of this dispatch playbook",
"join": [],
"note": "update workbook task of this dispatch playbook"
},
"customFunction": {
"draftMode": false,
"name": "workbook_task_update",
"repoName": "community"
},
"functionId": 4,
"functionName": "update_workbook_task",
"id": "12",
"selectMore": false,
"type": "utility",
"utilities": {
"workbook_task_update": {
"description": "Update a workbook task by task name or the task where the currently running playbook appears. Requires a task_name, container_id, and a note_title, note_content, owner, or status.",
"fields": [
{
"dataTypes": [
"*"
],
"description": "Name of a workbook task or keyword 'playbook' to update the task where the currently running playbook appears. (Required)",
"inputType": "item",
"label": "task_name",
"name": "task_name",
"placeholder": "my_task",
"renderType": "datapath",
"required": false
},
{
"dataTypes": [
"*"
],
"description": "Note title. (Optional)",
"inputType": "item",
"label": "note_title",
"name": "note_title",
"placeholder": "My Title",
"renderType": "datapath",
"required": false
},
{
"dataTypes": [
"*"
],
"description": "Note content. (Optional)",
"inputType": "item",
"label": "note_content",
"name": "note_content",
"placeholder": "My notes",
"renderType": "datapath",
"required": false
},
{
"dataTypes": [
"*"
],
"description": "Accepts 'incomplete', 'in_progress, or 'complete'. (Optional)",
"inputType": "item",
"label": "status",
"name": "status",
"placeholder": "in_progress",
"renderType": "datapath",
"required": false
},
{
"dataTypes": [
"*"
],
"description": "A user to assign as the task owner or keyword 'current\" to assign the task to the user that launched the playbook. (Optional)",
"inputType": "item",
"label": "owner",
"name": "owner",
"placeholder": "username",
"renderType": "datapath",
"required": false
},
{
"dataTypes": [
"phantom container id"
],
"description": "The ID of a SOAR Container. (Required)",
"inputType": "item",
"label": "container",
"name": "container",
"placeholder": "container:id",
"renderType": "datapath",
"required": false
}
],
"label": "workbook_task_update",
"name": "workbook_task_update"
}
},
"utilityType": "custom_function",
"values": {
"workbook_task_update": {
"container": "container:id",
"note_content": "merge_report:formatted_data",
"note_title": "AD Disable Account Report",
"owner": null,
"status": "complete",
"task_name": "playbook"
}
}
},
"errors": {},
"id": "12",
"type": "utility",
"warnings": {},
"x": 280,
"y": 1236
},
"13": {
"data": {
"advanced": {
"customName": "observable filter",
"customNameId": 0,
"description": "Filter to check if observable output is successfully generated or not.",
"join": [],
"note": "Filter to check if observable output is successfully generated or not."
},
"conditions": [
{
"comparisons": [
{
"conditionIndex": 0,
"op": "!=",
"param": "dispatch_account_disable:playbook_output:observable",
"value": ""
}
],
"conditionIndex": 0,
"customName": "observable_exist",
"logic": "and"
}
],
"functionId": 1,
"functionName": "observable_filter",
"id": "13",
"type": "filter"
},
"errors": {},
"id": "13",
"type": "filter",
"warnings": {},
"x": 340,
"y": 499
},
"3": {
"data": {
"advanced": {
"customName": "dispatch account disable",
"customNameId": 0,
"join": []
},
"functionId": 1,
"functionName": "dispatch_account_disable",
"id": "3",
"inputs": {
"artifact_ids_include": {
"datapaths": [],
"deduplicate": false
},
"indicator_tags_exclude": {
"datapaths": [],
"deduplicate": false
},
"indicator_tags_include": {
"datapaths": [],
"deduplicate": false
},
"playbook_repo": {
"datapaths": [],
"deduplicate": false
},
"playbook_tags": {
"datapaths": [
"disable_account",
"active_directory"
],
"deduplicate": false
}
},
"playbookName": "dispatch_input_playbooks",
"playbookRepo": 1,
"playbookRepoName": "community",
"playbookType": "data",
"synchronous": true,
"type": "playbook"
},
"errors": {},
"id": "3",
"type": "playbook",
"warnings": {},
"x": 140,
"y": 147.99999999999997
},
"7": {
"data": {
"advanced": {
"customName": "observable output decision",
"customNameId": 0,
"delimiter": ",",
"delimiter_enabled": true,
"description": "decision to check if observable output is successfully generated or not.",
"join": [],
"note": "decision to check if observable output is successfully generated or not."
},
"conditions": [
{
"comparisons": [
{
"conditionIndex": 0,
"op": "!=",
"param": "dispatch_account_disable:playbook_output:observable",
"value": ""
}
],
"conditionIndex": 0,
"customName": "observable_exist",
"display": "If",
"logic": "and",
"type": "if"
},
{
"comparisons": [
{
"conditionIndex": 1,
"op": "==",
"param": "",
"value": ""
}
],
"conditionIndex": 1,
"customName": "observable_not_exist",
"display": "Else",
"logic": "and",
"type": "else"
}
],
"functionId": 2,
"functionName": "observable_output_decision",
"id": "7",
"type": "decision"
},
"errors": {},
"id": "7",
"type": "decision",
"warnings": {},
"x": 220,
"y": 312
},
"8": {
"data": {
"advanced": {
"customName": "normalized observable filter",
"customNameId": 0,
"description": "This block uses custom code for normalizing observable result of input playbooks tag as disable_account. The normalized output will be used in merging 4 different types of disable_account used to locked users in active directory.",
"join": [],
"note": "This block uses custom code for normalizing observable result of input playbooks tag as disable_account. The normalized output will be used in merging 4 different types of disable_account used to locked users in active directory."
},
"functionId": 1,
"functionName": "normalized_observable_filter",
"id": "8",
"inputParameters": [
"filtered-data:observable_filter:condition_1:dispatch_account_disable:playbook_output:observable"
],
"outputVariables": [
"observable_value",
"observable_type",
"observable_merge_report"
],
"type": "code"
},
"errors": {},
"id": "8",
"type": "code",
"userCode": "\n # Write your custom code here...\n normalized_observable_filter__observable_message = []\n normalized_observable_filter__observable_value = []\n normalized_observable_filter__observable_merge_report = []\n fmt_output = \"\"\n output_observable_values = [(i or \"\") for i in filtered_output_0_dispatch_account_disable_output_observable_values]\n \n #phantom.debug(\"output_observable_values: {}\".format(output_observable_values))\n for observable_item in output_observable_values:\n if observable_item['status'] == \"success\":\n user_name = observable_item['value'].split(\"@\")[0]\n normalized_observable_filter__observable_value.append(user_name)\n fmt_output += \"{} | {} | {} | {} | \\n\".format(observable_item['value'], observable_item['type'], observable_item['message'], observable_item['status'])\n normalized_observable_filter__observable_merge_report.append(fmt_output)\n normalized_observable_filter__observable_value = normalized_observable_filter__observable_value[0]\n normalized_observable_filter__observable_type = \"Disable Account\"\n #phantom.debug(normalized_observable_filter__observable_merge_report)\n",
"warnings": {},
"x": 280,
"y": 686
},
"9": {
"data": {
"advanced": {
"customName": "observable check comment",
"customNameId": 0,
"description": "observable output of input playbooks not exits.",
"join": [],
"note": "observable output of input playbooks not exits."
},
"functionId": 2,
"functionName": "observable_check_comment",
"id": "9",
"selectMore": false,
"tab": "apis",
"type": "utility",
"utilities": {
"comment": {
"description": "",
"fields": [
{
"description": "",
"label": "comment",
"name": "comment",
"placeholder": "Enter a comment",
"renderType": "datapath",
"required": true
},
{
"hidden": true,
"name": "container",
"required": false
},
{
"hidden": true,
"name": "author",
"required": false
},
{
"hidden": true,
"name": "trace",
"required": false
}
],
"label": "add comment",
"name": "comment"
}
},
"utilityType": "api",
"values": {
"comment": {
"_internal": [
"container",
"author",
"trace"
],
"comment": "Observable output of input playbooks does not exist."
}
}
},
"errors": {},
"id": "9",
"type": "utility",
"warnings": {},
"x": 0,
"y": 492
}
},
"notes": "Inputs: users\nActions: Account Locking/Disabling\nOutputs: reports, observables"
},
"input_spec": null,
"output_spec": null,
"playbook_type": "automation",
"python_version": "3.13",
"schema": "5.0.10",
"version": "6.0.1.123902"
},
"create_time": "2023-08-17T18:44:17.675610+00:00",
"draft_mode": false,
"labels": [
"*"
],
"tags": [
"user",
"D3-AL",
"disable_account",
"azure_ad_graph",
"microsoft_ad_ldap",
"active_directory"
]
}