Prisma Cloud Remediation - Azure Storage Misconfiguration v2

This playbook remediates Prisma Cloud Azure Storage alerts. It calls sub-playbooks that perform the actual remediation steps. Remediation: - Azure storage account has a blob container with public access - Azure storage account logging for blobs is disabled - Azure Storage Accounts without Secure transfer enabled - Azure storage account logging for queues is disabled - Azure storage account logging for tables is disabled

Prisma Cloud by Palo Alto Networks · 12 tasks · 2 inputs · 0 outputs

Details

IDPrisma Cloud Remediation - Azure Storage Misconfiguration v2
From Version6.5.0
Tasks12

README

This playbook remediates Prisma Cloud Azure Storage alerts. It calls sub-playbooks that perform the actual remediation steps.

Remediation:

  • Azure storage account has a blob container with public access
  • Azure storage account logging for blobs is disabled
  • Azure Storage Accounts without Secure transfer enabled
  • Azure storage account logging for queues is disabled
  • Azure storage account logging for tables is disabled

Dependencies

This playbook uses the following sub-playbooks, integrations, and scripts.

Sub-playbooks

Prisma Cloud Remediation - Azure Storage Blob Misconfiguration

Integrations

PrismaCloud v2

Scripts

IsIntegrationAvailable

Commands

  • prisma-cloud-alert-dismiss
  • closeInvestigation

Playbook Inputs


Name Description Default Value Required
AutoRemediateAzureStorage Execute Azure Storage remediation automatically? no Optional
policyId Grab the Prisma Cloud policy ID. incident.labels.policy Optional

Playbook Outputs


There are no outputs for this playbook.

Playbook Image


Prisma Cloud Remediation - Azure Storage Misconfiguration v2

Inputs

  • AutoRemediateAzureStorage — Execute Azure Storage remediation automatically?
  • policyId — Grab the Prisma Cloud policy ID.

Commands used

closeInvestigation prisma-cloud-alert-dismiss

Flowchart

yes yes yes Yes blob yes Start Start Is Azure Storage integration enabled? - IsIntegrationAvailable Is Azure Storage integrat... IsIntegrationAvailable Done Done Is there a policy to remediate? Is there a policy to reme... Update Storage automatically? Update Storage automatica... Auto remediate? Auto remediate? Execute playbook Execute playbook Manually update Storage Manually update Storage Close investigation - closeInvestigation Close investigation closeInvestigation Is Prisma Cloud v2 integration enabled? Is Prisma Cloud v2 integr... Dismiss Prisma Cloud alert - prisma-cloud-alert-dismiss Dismiss Prisma Cloud alert prisma-cloud-alert-dismiss Prisma Cloud Remediation - Azure Storage Blob Misconfiguration - Prisma Cloud Remediation - Azure Storage Blob Misconfiguration Prisma Cloud Remediation ... Prisma Cloud Remediation - Az...
id: Prisma Cloud Remediation - Azure Storage Misconfiguration v2
version: -1
fromversion: 6.5.0
contentitemexportablefields:
  contentitemfields: {}
name: Prisma Cloud Remediation - Azure Storage Misconfiguration v2
description: |-
  This playbook remediates Prisma Cloud Azure Storage alerts.  It calls sub-playbooks that perform the actual remediation steps.

  Remediation:

  - Azure storage account has a blob container with public access
  - Azure storage account logging for blobs is disabled
  - Azure Storage Accounts without Secure transfer enabled
  - Azure storage account logging for queues is disabled
  - Azure storage account logging for tables is disabled
starttaskid: "0"
tasks:
  "0":
    id: "0"
    taskid: 61bee172-14d4-4a48-815c-913b49bef800
    type: start
    task:
      id: 61bee172-14d4-4a48-815c-913b49bef800
      version: -1
      name: ""
      description: ""
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "2"
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 630,
          "y": 0
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "2":
    id: "2"
    taskid: 5df74be3-ecf9-47a6-896c-31c3b22ade2c
    type: condition
    task:
      id: 5df74be3-ecf9-47a6-896c-31c3b22ade2c
      version: -1
      name: Is Azure Storage integration enabled?
      description: Returns 'yes' if integration brand is available. Otherwise returns 'no'
      scriptName: IsIntegrationAvailable
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "3"
      "yes":
      - "4"
    scriptarguments:
      brandname:
        simple: Azure Storage
    results:
    - brandInstances
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 630,
          "y": 140
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "3":
    id: "3"
    taskid: 1abd9220-e39e-4206-8aa3-dba2695c7f4e
    type: title
    task:
      id: 1abd9220-e39e-4206-8aa3-dba2695c7f4e
      version: -1
      name: Done
      description: ""
      type: title
      iscommand: false
      brand: ""
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 630,
          "y": 1670
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "4":
    id: "4"
    taskid: 39f753bf-3720-4d47-831e-110291f8b761
    type: condition
    task:
      id: 39f753bf-3720-4d47-831e-110291f8b761
      version: -1
      name: Is there a policy to remediate?
      description: Checks for a Prisma Cloud policy ID.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "8"
      "yes":
      - "5"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isNotEmpty
          left:
            value:
              complex:
                root: inputs.policyId
            iscontext: true
    view: |-
      {
        "position": {
          "x": 350,
          "y": 310
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "5":
    id: "5"
    taskid: 641baad5-946b-4996-8d76-9ec491e633f3
    type: condition
    task:
      id: 641baad5-946b-4996-8d76-9ec491e633f3
      version: -1
      name: Update Storage automatically?
      description: Auto remediate?
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "6"
      "yes":
      - "7"
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isEqualString
          left:
            value:
              complex:
                root: inputs.AutoRemediateAzureStorage
                transformers:
                - operator: toLowerCase
            iscontext: true
          right:
            value:
              simple: "yes"
    view: |-
      {
        "position": {
          "x": -200,
          "y": 480
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "6":
    id: "6"
    taskid: e4e62aca-ab0f-4c55-8a9b-b04d74519973
    type: condition
    task:
      id: e4e62aca-ab0f-4c55-8a9b-b04d74519973
      version: -1
      name: Auto remediate?
      description: Remediate automatically or manually update?
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "8"
      "Yes":
      - "7"
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 90,
          "y": 650
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    message:
      to:
      subject:
      body:
        simple: ${incident.id} Autoremediate?
      methods: []
      format: ""
      bcc:
      cc:
      timings:
        retriescount: 2
        retriesinterval: 360
        completeafterreplies: 1
      replyOptions:
      - "Yes"
      - "No"
    skipunavailable: false
    quietmode: 0
  "7":
    id: "7"
    taskid: ad29c1b0-047e-40b7-8f6a-9f89a58554f4
    type: condition
    task:
      id: ad29c1b0-047e-40b7-8f6a-9f89a58554f4
      version: -1
      name: Execute playbook
      description: Execute the appropriate remediation sub-playbook based on the Prisma Cloud policy ID.
      type: condition
      iscommand: false
      brand: ""
    nexttasks:
      '#default#':
      - "8"
      blob:
      - "15"
    separatecontext: false
    conditions:
    - label: blob
      condition:
      - - operator: isEqualString
          left:
            value:
              complex:
                root: inputs.policyId
            iscontext: true
          right:
            value:
              simple: 7a506ab4-d0a2-48ee-a6f5-75a97f11397d
        - operator: isEqualString
          left:
            value:
              complex:
                root: inputs.policyId
            iscontext: true
          right:
            value:
              simple: bc4e467f-10fa-471e-aa9b-28981dc73e9
    view: |-
      {
        "position": {
          "x": -200,
          "y": 820
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "8":
    id: "8"
    taskid: a65b8012-ec7f-4ff5-80de-64492dff85df
    type: regular
    task:
      id: a65b8012-ec7f-4ff5-80de-64492dff85df
      version: -1
      name: Manually update Storage
      description: |-
        1. Log in to the Azure Portal.
        2. Go to SQL servers.
        3. Choose the reported DB server.
        4. Under the Security section, click 'Auditing'.
        5. Set 'Auditing' to 'On'.
        6. Select 'Storage' and click 'Storage Details'.
        7. Configure 'Retention (days)' setting to be greater than or equal to 90 days.
        Note: The default value for the retention period is 0 (unlimited retention).
        8. Click 'Ok'.
        9. Click 'Save'.
      type: regular
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "11"
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 350,
          "y": 990
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "9":
    id: "9"
    taskid: c3d736e6-e9ab-4cfc-8ed0-7276f754c074
    type: regular
    task:
      id: c3d736e6-e9ab-4cfc-8ed0-7276f754c074
      version: -1
      name: Close investigation
      description: Close the current incident.
      script: Builtin|||closeInvestigation
      type: regular
      iscommand: true
      brand: Builtin
    nexttasks:
      '#none#':
      - "3"
    scriptarguments:
      assetid: {}
      closeNotes: {}
      closeReason: {}
      emailclassification: {}
      id:
        complex:
          root: incident
          accessor: id
      mndadone: {}
      phishingsubtype: {}
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 350,
          "y": 1500
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "11":
    id: "11"
    taskid: 7e41ceab-7235-457f-8e5e-9c3d0209b11e
    type: condition
    task:
      id: 7e41ceab-7235-457f-8e5e-9c3d0209b11e
      version: -1
      name: Is Prisma Cloud v2 integration enabled?
      description: Is Prisma Cloud v2 integration enabled?
      type: condition
      iscommand: false
      brand: PrismaCloud v2
    nexttasks:
      '#default#':
      - "9"
      "yes":
      - "14"
    continueonerror: true
    separatecontext: false
    conditions:
    - label: "yes"
      condition:
      - - operator: isExists
          left:
            value:
              complex:
                root: modules
                filters:
                - - operator: isEqualString
                    left:
                      value:
                        simple: modules.brand
                      iscontext: true
                    right:
                      value:
                        simple: PrismaCloud v2
                - - operator: isEqualString
                    left:
                      value:
                        simple: modules.state
                      iscontext: true
                    right:
                      value:
                        simple: active
                accessor: brand
            iscontext: true
    view: |-
      {
        "position": {
          "x": 350,
          "y": 1160
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
  "14":
    id: "14"
    taskid: e35348a0-09fc-4386-8b04-cb1d1d36b4d4
    type: regular
    task:
      id: e35348a0-09fc-4386-8b04-cb1d1d36b4d4
      version: -1
      name: Dismiss Prisma Cloud alert
      description: Dismiss or snooze the alerts matching the given filter. Either policy IDs or alert IDs must be provided. When no absolute time nor relative time arguments are provided, the default time range is all times. For snoozing, provide "snooze_unit" and "snooze_value" arguments.
      script: PrismaCloud v2|||prisma-cloud-alert-dismiss
      type: regular
      iscommand: true
      brand: PrismaCloud v2
    nexttasks:
      '#none#':
      - "9"
    scriptarguments:
      alert_ids:
        complex:
          root: incident
          accessor: labels
          transformers:
          - operator: getField
            args:
              field:
                value:
                  simple: id
      dismissal_note:
        simple: ${incident.labels.id} has been remediated by Cortex XSOAR.
    continueonerror: true
    separatecontext: false
    view: |-
      {
        "position": {
          "x": 110,
          "y": 1330
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: true
    quietmode: 0
  "15":
    id: "15"
    taskid: 886730f4-cb8c-4233-891d-36c027099b41
    type: playbook
    task:
      id: 886730f4-cb8c-4233-891d-36c027099b41
      version: -1
      name: Prisma Cloud Remediation - Azure Storage Blob Misconfiguration
      description: ""
      playbookName: Prisma Cloud Remediation - Azure Storage Blob Misconfiguration
      type: playbook
      iscommand: false
      brand: ""
    nexttasks:
      '#none#':
      - "11"
    scriptarguments:
      policyId:
        complex:
          root: inputs.policyId
    separatecontext: true
    loop:
      iscommand: false
      exitCondition: ""
      wait: 1
      max: 100
    view: |-
      {
        "position": {
          "x": -510,
          "y": 990
        }
      }
    note: false
    timertriggers: []
    ignoreworker: false
    skipunavailable: false
    quietmode: 0
view: |-
  {
    "linkLabelsPosition": {
      "11_14_yes": 0.61,
      "11_9_#default#": 0.53,
      "2_3_#default#": 0.2,
      "2_4_yes": 0.52,
      "4_5_yes": 0.3,
      "4_8_#default#": 0.22,
      "5_6_#default#": 0.55,
      "5_7_yes": 0.46,
      "6_7_Yes": 0.46,
      "6_8_#default#": 0.35,
      "7_8_#default#": 0.24
    },
    "paper": {
      "dimensions": {
        "height": 1735,
        "width": 1520,
        "x": -510,
        "y": 0
      }
    }
  }
inputs:
- key: AutoRemediateAzureStorage
  value:
    simple: "no"
  required: false
  description: Execute Azure Storage remediation automatically?
  playbookInputQuery:
- key: policyId
  value:
    complex:
      root: incident
      accessor: labels.policy
      transformers:
      - operator: ParseJSON
      - operator: getField
        args:
          field:
            value:
              simple: policyId
  required: false
  description: Grab the Prisma Cloud policy ID.
  playbookInputQuery:
outputs: []
tests:
- No Test