{
  "version": "Notebook/1.0",
  "items": [
    {
      "type": 9,
      "content": {
        "version": "KqlParameterItem/1.0",
        "parameters": [
          {
            "id": "3a1905da-e863-4fb1-a4cc-373bfa047344",
            "version": "KqlParameterItem/1.0",
            "name": "TimeRange",
            "label": "Time Range",
            "type": 4,
            "isRequired": true,
            "value": {
              "durationMs": 604800000
            },
            "typeSettings": {
              "selectableValues": [
                {
                  "durationMs": 300000
                },
                {
                  "durationMs": 900000
                },
                {
                  "durationMs": 1800000
                },
                {
                  "durationMs": 3600000
                },
                {
                  "durationMs": 14400000
                },
                {
                  "durationMs": 43200000
                },
                {
                  "durationMs": 86400000
                },
                {
                  "durationMs": 172800000
                },
                {
                  "durationMs": 259200000
                },
                {
                  "durationMs": 604800000
                },
                {
                  "durationMs": 1209600000
                },
                {
                  "durationMs": 2419200000
                },
                {
                  "durationMs": 2592000000
                },
                {
                  "durationMs": 5184000000
                },
                {
                  "durationMs": 7776000000
                }
              ],
              "allowCustom": true
            },
            "resourceType": "microsoft.insights/components"
          }
        ],
        "style": "above",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces"
      },
      "name": "parameters - 0"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\"\r\n| summarize inbound = countif(not(ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))), outbound = countif((ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))), deny = countif(Status == \"Deny\"), count() by bin(TimeGenerated, {TimeRange:grain})\r\n| project-away count_",
        "size": 0,
        "title": "Network Traffic by Direction",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "areachart"
      },
      "customWidth": "50",
      "name": "query - 8"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\"\r\n| where Status in (\"Allow\",\"Deny\") or Log_Subtype in (\"Allowed\",\"Denied\")\r\n| summarize count() by Status, bin(TimeGenerated, {TimeRange:grain})",
        "size": 0,
        "title": "Events by Action",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "barchart",
        "chartSettings": {
          "seriesLabelSettings": [
            {
              "seriesName": "Allow",
              "color": "green"
            },
            {
              "seriesName": "Deny",
              "color": "red"
            }
          ]
        }
      },
      "customWidth": "50",
      "name": "query - 1"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\" and (Status =~ \"Deny\" or Log_Subtype =~ \"Denied\")\r\n| where not(ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| summarize Total = count() by ['Source IP'] = Src_IP\r\n| top 10 by Total",
        "size": 0,
        "title": "Top 10 Denied Inbound Source IPs",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              },
              "numberFormat": {
                "unit": 17,
                "options": {
                  "style": "decimal",
                  "maximumFractionDigits": 2
                }
              }
            }
          ]
        },
        "chartSettings": {
          "seriesLabelSettings": [
            {
              "seriesName": "Allow",
              "color": "green"
            },
            {
              "seriesName": "Deny",
              "color": "red"
            }
          ]
        }
      },
      "customWidth": "50",
      "name": "query - 1 - Copy - Copy"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\" and (Status =~ \"Deny\" or Log_Subtype =~ \"Denied\")\r\n| where (ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| summarize Total = count() by ['Destination IP'] = Dst_IP\r\n| top 10 by Total",
        "size": 0,
        "title": "Top 10 Denied Outbound Destination IPs",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              },
              "numberFormat": {
                "unit": 17,
                "options": {
                  "style": "decimal",
                  "useGrouping": false,
                  "maximumFractionDigits": 2
                }
              }
            }
          ]
        },
        "chartSettings": {
          "seriesLabelSettings": [
            {
              "seriesName": "Allow",
              "color": "green"
            },
            {
              "seriesName": "Deny",
              "color": "red"
            }
          ]
        }
      },
      "customWidth": "50",
      "name": "query - 1 - Copy"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\" and (Status =~ \"Deny\" or Log_Subtype =~ \"Denied\")\r\n| where not(ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| summarize Total = count() by Port = Src_Port\r\n| top 10 by Total",
        "size": 0,
        "title": "Top 10 Denied Inbound Ports",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              },
              "numberFormat": {
                "unit": 17,
                "options": {
                  "style": "decimal",
                  "useGrouping": false,
                  "maximumFractionDigits": 2
                }
              }
            }
          ]
        },
        "chartSettings": {
          "seriesLabelSettings": [
            {
              "seriesName": "Allow",
              "color": "green"
            },
            {
              "seriesName": "Deny",
              "color": "red"
            }
          ]
        }
      },
      "customWidth": "50",
      "name": "query - 1 - Copy - Copy - Copy"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\" and Status == \"Deny\"\r\n| where (ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| summarize Total = count() by Port = Dst_Port\r\n| top 10 by Total",
        "size": 0,
        "title": "Top 10 Denied Outbound Ports",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              }
            }
          ]
        },
        "chartSettings": {
          "seriesLabelSettings": [
            {
              "seriesName": "Allow",
              "color": "green"
            },
            {
              "seriesName": "Deny",
              "color": "red"
            }
          ]
        }
      },
      "customWidth": "50",
      "name": "query - 1 - Copy - Copy"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\" and Status == \"Deny\"\r\n| where not(ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| where isnotempty(Src_Country_Code)\r\n| summarize Total = count() by ['Source Country'] = Src_Country_Code\r\n| top 10 by Total",
        "size": 0,
        "title": "Top 10 Denied Inbound Traffic by Country",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              },
              "numberFormat": {
                "unit": 17,
                "options": {
                  "style": "decimal",
                  "useGrouping": false,
                  "maximumFractionDigits": 2
                }
              }
            }
          ]
        },
        "mapSettings": {
          "locInfo": "CountryRegion",
          "locInfoColumn": "Dst_Country_Code",
          "sizeSettings": "count_",
          "sizeAggregation": "Sum",
          "legendMetric": "count_",
          "legendAggregation": "Sum",
          "itemColorSettings": {
            "nodeColorField": "count_",
            "colorAggregation": "Sum",
            "type": "heatmap",
            "heatmapPalette": "greenRed"
          }
        }
      },
      "customWidth": "50",
      "name": "query - 5 - Copy"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\"\r\n| where not(ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| where isnotempty(Src_Country_Code)\r\n| summarize count() by Src_Country_Code, bin(TimeGenerated, {TimeRange:grain})\r\n",
        "size": 0,
        "title": "Denied Inbound Traffic by Country",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "linechart",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              },
              "numberFormat": {
                "unit": 17,
                "options": {
                  "style": "decimal",
                  "useGrouping": false,
                  "maximumFractionDigits": 2
                }
              }
            }
          ]
        },
        "mapSettings": {
          "locInfo": "CountryRegion",
          "locInfoColumn": "Dst_Country_Code",
          "sizeSettings": "count_",
          "sizeAggregation": "Sum",
          "legendMetric": "count_",
          "legendAggregation": "Sum",
          "itemColorSettings": {
            "nodeColorField": "count_",
            "colorAggregation": "Sum",
            "type": "heatmap",
            "heatmapPalette": "greenRed"
          }
        }
      },
      "customWidth": "50",
      "name": "query - 5 - Copy - Copy"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\" and Status == \"Deny\"\r\n| where (ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| where isnotempty(Dst_Country_Code)\r\n| summarize Total = count() by  ['Source Country'] = Dst_Country_Code\r\n| top 10 by Total",
        "size": 0,
        "title": "Top Denied Outbound Traffic by Country",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              },
              "numberFormat": {
                "unit": 17,
                "options": {
                  "style": "decimal",
                  "useGrouping": false,
                  "maximumFractionDigits": 2
                }
              }
            }
          ]
        },
        "mapSettings": {
          "locInfo": "CountryRegion",
          "locInfoColumn": "Dst_Country_Code",
          "sizeSettings": "count_",
          "sizeAggregation": "Sum",
          "legendMetric": "count_",
          "legendAggregation": "Sum",
          "itemColorSettings": {
            "nodeColorField": "count_",
            "colorAggregation": "Sum",
            "type": "heatmap",
            "heatmapPalette": "greenRed"
          }
        }
      },
      "customWidth": "50",
      "name": "query - 5 - Copy - Copy"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "SophosXGFirewall\r\n| where Log_Type == \"Firewall\"\r\n| where (ipv4_is_match(\"10.0.0.0\",Src_IP,8) or ipv4_is_match(\"172.16.0.0\",Src_IP,12) or ipv4_is_match(\"192.168.0.0\",Src_IP,16))\r\n| where isnotempty(Dst_Country_Code)\r\n| summarize count() by Dst_Country_Code, bin(TimeGenerated, {TimeRange:grain})\r\n",
        "size": 0,
        "title": "Denied Outbound Traffic by Country",
        "timeContext": {
          "durationMs": 0
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "linechart",
        "gridSettings": {
          "formatters": [
            {
              "columnMatch": "Total",
              "formatter": 3,
              "formatOptions": {
                "palette": "coldHot"
              },
              "numberFormat": {
                "unit": 17,
                "options": {
                  "style": "decimal",
                  "useGrouping": false,
                  "maximumFractionDigits": 2
                }
              }
            }
          ]
        },
        "mapSettings": {
          "locInfo": "CountryRegion",
          "locInfoColumn": "Dst_Country_Code",
          "sizeSettings": "count_",
          "sizeAggregation": "Sum",
          "legendMetric": "count_",
          "legendAggregation": "Sum",
          "itemColorSettings": {
            "nodeColorField": "count_",
            "colorAggregation": "Sum",
            "type": "heatmap",
            "heatmapPalette": "greenRed"
          }
        }
      },
      "customWidth": "50",
      "name": "query - 5 - Copy - Copy - Copy"
    }
  ],
  "fromTemplateId": "sentinel-SophosXGFirewall",
  "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}
