id: DarkWebScan Block AD User Human-in-the-loop
version: -1
contentitemexportablefields:
contentitemfields: {}
name: DarkWebScan Block AD User Human-in-the-loop
description: Gets the affected username of a Bechtle Dark Web Scan issue, then sends an email for human confirmation if the affected user should be blocked.
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: b087a4dd-4d86-466b-8804-1ea262de188a
type: start
task:
id: b087a4dd-4d86-466b-8804-1ea262de188a
version: -1
name: ""
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "2"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 320
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"2":
id: "2"
taskid: d3102716-e3fa-4381-9241-ce6f85fb2360
type: regular
task:
id: d3102716-e3fa-4381-9241-ce6f85fb2360
version: -1
name: Get Incident Evidence
description: "Searches Demisto incidents. A summarized version of this scrips is available with the summarizedversion argument.\n\nThis automation runs using the default Limited User role, unless you explicitly change the permissions.\nFor more information, see the section about permissions here:\n- For Cortex XSOAR 6 see https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/6.x/Cortex-XSOAR-Playbook-Design-Guide/Automations \n- For Cortex XSOAR 8 Cloud see https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8/Cortex-XSOAR-Cloud-Documentation/Create-a-script\n- For Cortex XSOAR 8.7 On-prem see https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8.7/Cortex-XSOAR-On-prem-Documentation/Create-a-script\nhttps://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/6.10/Cortex-XSOAR-Administrator-Guide/Automations"
scriptName: SearchIncidentsV2
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "6"
scriptarguments:
add_fields_to_summarize_context:
simple: ${incident.initial_evidence}
id:
simple: ${inputs.IssueID}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 490
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"3":
id: "3"
taskid: 852e98d3-5960-4e47-9e6a-c56cf9d68773
type: condition
task:
id: 852e98d3-5960-4e47-9e6a-c56cf9d68773
version: -1
name: Ask (via email) to block user or mark as resolved
description: ''
type: condition
iscommand: false
brand: ""
nexttasks:
Block user account in AD:
- "10"
Mark as Resolved:
- "5"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 1430
}
}
note: false
timertriggers: []
ignoreworker: false
message:
to:
simple: ${inputs.SendMailsTo}
subject:
simple: New Dark Web Leak requires your response
body:
simple: |-
A new dark web leak occurred. This is an automated email from your CORTEX XSIAM Integration.
ID: ${inputs.IssueID}
Severity: ${inputs.Severity}
Description: ${inputs.Details}
Affected Username: ${inputs.IssueUsername}
Affected Username (without email domain): ${inputs.UsernameWithoutDomain}
Link to Incident: ${demistoUrls.investigation}
DarkWebScan Integration by
Please select how you want to continue with the user account ${inputs.UsernameWithoutDomain}:
methods:
- email
format: html
bcc:
cc:
timings:
retriescount: 2
retriesinterval: 360
completeafterreplies: 1
completeafterv2: true
completeaftersla: false
replyOptions:
- Block user account in AD
- Mark as Resolved
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"5":
id: "5"
taskid: a70a82e0-add3-4b8d-af6c-cc6a688483b3
type: regular
task:
id: a70a82e0-add3-4b8d-af6c-cc6a688483b3
version: -1
name: Mark incident as resolved
description: commands.local.cmd.close.inv
script: Builtin|||closeInvestigation
type: regular
iscommand: true
brand: Builtin
nexttasks:
'#none#':
- "12"
scriptarguments:
closeNotes:
simple: User clicked "Mark as resolved" in email
closeReason:
simple: Resolved via email response
id:
simple: ${inputs.IssueID}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 660,
"y": 1785
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"6":
id: "6"
taskid: cba755d1-857f-4194-bf17-ac6e8ff21a3c
type: condition
task:
id: cba755d1-857f-4194-bf17-ac6e8ff21a3c
version: -1
name: Is Active Directory Query v2 Integration enabled?
description: Returns 'yes' if integration brand is available. Otherwise returns 'no'.
scriptName: IsIntegrationAvailable
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "7"
"yes":
- "16"
scriptarguments:
brandname:
simple: Active Directory Query v2
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 680
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"7":
id: "7"
taskid: f9c6a71f-3d03-4215-899c-d2cea84ddb0e
type: regular
task:
id: f9c6a71f-3d03-4215-899c-d2cea84ddb0e
version: -1
name: Send email to configure integration
description: commands.server.mail.sendmail
script: '|||send-mail'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "12"
scriptarguments:
body:
simple: You are receiving this mail because you have enabled the "DarkWebScan Block AD User Human-in-the-loop" Playbook. However, you have not yet installed and configured an instance of the required "Active Directory Query v2" integration. This integration is required to run this playbook. You will receive an email like this for every failed attempt to run this playbook unless you disable the playbook.
subject:
simple: DarkWebScan Block AD User Playbook has identified an issue
to:
simple: ${inputs.SendMailsTo}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": -780,
"y": 915
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"8":
id: "8"
taskid: a89c8d59-4463-475a-8282-089e23af8b1c
type: regular
task:
id: a89c8d59-4463-475a-8282-089e23af8b1c
version: -1
name: Active Directory - Get User
description: Retrieves detailed information about a user account. The user can be specified by name, email address, or as an Active Directory Distinguished Name (DN). If no filter is specified, all users are returned.
script: Active Directory Query v2|||ad-get-user
type: regular
iscommand: true
brand: Active Directory Query v2
nexttasks:
'#none#':
- "9"
scriptarguments:
username:
simple: ${inputs.UsernameWithoutDomain}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 1082.5
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"9":
id: "9"
taskid: ecadde1a-c79c-4183-a45b-cc2315b23f6c
type: condition
task:
id: ecadde1a-c79c-4183-a45b-cc2315b23f6c
version: -1
name: Does an account with that username exist?
description: ''
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "18"
"yes":
- "3"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isExists
left:
value:
simple: Account.Username
iscontext: true
- - operator: hasLength
left:
value:
simple: Account.Username
iscontext: true
right:
value:
simple: "1"
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 1230
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"10":
id: "10"
taskid: f01e1936-2d36-4d1f-9128-dc4dbe0587b6
type: regular
task:
id: f01e1936-2d36-4d1f-9128-dc4dbe0587b6
version: -1
name: Active Directory - Disable Account
description: Disables an Active Directory user account.
script: Active Directory Query v2|||ad-disable-account
type: regular
iscommand: true
brand: Active Directory Query v2
nexttasks:
'#none#':
- "11"
scriptarguments:
username:
simple: ${Account.Username}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 1785
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"11":
id: "11"
taskid: 56302690-415e-43a6-a720-aaddfa21fb51
type: regular
task:
id: 56302690-415e-43a6-a720-aaddfa21fb51
version: -1
name: Close Issue
description: commands.local.cmd.close.inv
script: Builtin|||closeInvestigation
type: regular
iscommand: true
brand: Builtin
nexttasks:
'#none#':
- "12"
scriptarguments:
closeNotes:
simple: Active Directory - Disable Account executed
closeReason:
simple: Active Directory - Disable Account executed
id:
simple: ${inputs.IssueID}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 1940
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"12":
id: "12"
taskid: 85ebabd5-3fe6-4c1f-8c90-8f8b9e186884
type: title
task:
id: 85ebabd5-3fe6-4c1f-8c90-8f8b9e186884
version: -1
name: Done
type: title
iscommand: false
brand: ""
description: ''
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 2310
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"16":
id: "16"
taskid: b31c146a-a577-4718-b79e-fcd171a74928
type: condition
task:
id: b31c146a-a577-4718-b79e-fcd171a74928
version: -1
name: Is username not empty?
description: Checks if the username is not empty
type: condition
iscommand: false
brand: ""
displayLabel: Is username not empty?
nexttasks:
'#default#':
- "17"
"yes":
- "8"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isNotEmpty
left:
value:
simple: inputs.UsernameWithoutDomain
iscontext: true
continueonerrortype: ""
view: |-
{
"position": {
"x": 150,
"y": 915
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"17":
id: "17"
taskid: 06c40029-fd64-4f2d-ae2d-b6876c74c67c
type: title
task:
id: 06c40029-fd64-4f2d-ae2d-b6876c74c67c
version: -1
name: No username available to block
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "12"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 1730,
"y": 1090
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"18":
id: "18"
taskid: 809af813-9a50-47ab-979a-2eae57808373
type: title
task:
id: 809af813-9a50-47ab-979a-2eae57808373
version: -1
name: Username does not exist in AD
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "12"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 1210,
"y": 1437.5
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
system: true
view: |-
{
"linkLabelsPosition": {
"16_8_yes": 0.83,
"6_16_yes": 0.84
},
"paper": {
"dimensions": {
"height": 2050,
"width": 2890,
"x": -780,
"y": 320
}
}
}
inputs:
- key: IssueID
value:
simple: ${incident.id}
required: false
description: Issue ID
playbookInputQuery:
- key: Severity
value:
simple: ${incident.severity}
required: false
description: Issue Severity
playbookInputQuery:
- key: Details
value:
complex:
root: incident
accessor: details
transformers:
- operator: RegexReplace
args:
action_dt: {}
ignore_case: {}
multi_line: {}
output_format: {}
period_matches_newline: {}
regex:
value:
simple: '[^a-zA-Z0-9._$:\s-]'
required: false
description: Issue Details
playbookInputQuery:
- key: IssueUsername
value:
complex:
root: incident.labels
accessor: username
transformers:
- operator: RegexReplace
args:
action_dt: {}
ignore_case: {}
multi_line: {}
output_format: {}
period_matches_newline: {}
regex:
value:
simple: '[^a-zA-Z0-9._@-]'
required: false
description: Username as reported from the Dark Web Scan Integration Evidence
playbookInputQuery:
- key: UsernameWithoutDomain
value:
complex:
root: incident.labels
accessor: username
transformers:
- operator: RegexReplace
args:
action_dt: {}
ignore_case: {}
multi_line: {}
output_format: {}
period_matches_newline: {}
regex:
value:
simple: '[^a-zA-Z0-9._@-]'
- operator: replaceMatch
args:
regex:
value:
simple: '@.*'
replaceWith: {}
required: false
description: The username but with the mail domain removed (e.g. @example.org)
playbookInputQuery:
- key: SendMailsTo
value:
simple:
required: true
description: Send all email notifications from this playbook to this email address
playbookInputQuery:
inputSections:
- inputs:
- IssueID
- Severity
- Details
- IssueUsername
- UsernameWithoutDomain
- SendMailsTo
name: General (Inputs group)
description: Generic group for inputs
outputSections:
- outputs: []
name: General (Outputs group)
description: Generic group for outputs
outputs: []
quiet: false
tests:
- No tests (auto formatted)
marketplaces:
- xsoar
- marketplacev2
- platform
supportedModules:
- agentix
- xsiam
- cloud
- cloud_posture
- cloud_runtime_security
- edr
fromversion: 6.10.0