Skip to main content

Azure - Network Security Group Remediation

This Playbook is part of the Azure Enrichment and Remediation Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.5.0 and later.

This playbook adds new Azure Network Security Groups (NSG) rules to NSGs attached to a NIC. The new rules will give access only to a private ip address range and block traffic that's exposed to the public internet (using the private IP of the VM as stated in Azure documentation). For example, if RDP is exposed to the public internet, this playbook adds new firewall rules that only allow traffic from a private IP address and blocks the rest of the RDP traffic.

Conditions and limitations:

  • Limited to one resource group.
  • 200 Azure rules viewed at once to find offending rule.
  • 2 priorities lower than the offending rule priority must be available.
  • Adds rules to NSGs associated to NICs.


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


This playbook does not use any sub-playbooks.


Azure Network Security Groups


  • Set
  • AzureFindAvailableNSGPriorities


  • azure-nsg-security-rules-list
  • azure-nsg-security-rule-update
  • azure-nsg-security-rule-create

Playbook Inputs#

NameDescriptionDefault ValueRequired
AzureSecurityGroupThe Azure Network Security Group that will have new rules created or updated.Required
RemotePortThe remote port that is publicly exposed.Required
RemoteProtocolThe remote protocol that is publicly exposed.Required
AzureVMPrivateIPThe private IP of the Azure Virtual Machine.Required

Playbook Outputs#

There are no outputs for this playbook.

Playbook Image#

Azure - Network Security Group Remediation