Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Known Manganese IP and UserAgent activity

Back
Ida04cf847-a832-4c60-b687-b0b6147da219
RulenameKnown Manganese IP and UserAgent activity
DescriptionMatches IP plus UserAgent IOCs in OfficeActivity data, along with IP plus Connection string information in the CommonSecurityLog data related to Manganese group activity.

References:

https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44101/

https://fortiguard.com/psirt/FG-IR-18-384
SeverityHigh
TacticsInitialAccess
Collection
TechniquesT1133
T1114
Required data connectorsOffice365
KindScheduled
Query frequency1d
Query period1d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Legacy IOC based Threat Protection/Analytic Rules/Manganese_VPN-IOCs.yaml
Version1.1.1
Arm templatea04cf847-a832-4c60-b687-b0b6147da219.json
Deploy To Azure

let IPList = dynamic(["45.63.52.41","140.82.17.161","207.148.101.95","45.32.87.51","66.42.98.156","45.76.144.105","217.163.28.35","45.32.141.174","149.28.165.249","209.250.225.247","45.63.100.115","95.179.229.230","209.250.233.247","45.77.121.232","45.76.175.65","104.238.160.237","45.77.181.97","95.179.192.125","149.28.93.184","140.82.16.81","45.76.173.103","45.77.255.22","45.32.11.71","149.28.77.26","45.32.54.50","104.156.233.156","45.32.21.118","45.63.62.109","45.77.244.202","149.248.11.205","104.238.190.244"]);
let IOCTerms = "\\?lang=[/..]*/dev/cmdb/sslvpn_websession|/dana-na/jam/[/..]*home/webserver/htdocs/dana/html5acc/guacamole[/..]*etc/passwd\\?";
(union isfuzzy=true
(CommonSecurityLog
| where isnotempty(SourceIP) or isnotempty(DestinationIP)
| where SourceIP in (IPList) or DestinationIP in (IPList) or has_any_ipv4 (Message, IPList)
| extend IPMatch = case(
SourceIP in (IPList), "SourceIP", 
DestinationIP in (IPList), "DestinationIP",
"Message") 
| where Message matches regex IOCTerms
| summarize StartTimeUtc = min(TimeGenerated), EndTimeUtc = max(TimeGenerated) by SourceIP, DestinationIP, DeviceProduct, DeviceAction, Message, Protocol, SourcePort, DestinationPort, DeviceAddress, DeviceName, IPMatch
| extend timestamp = StartTimeUtc, IPCustomEntity = case(IPMatch == "SourceIP", SourceIP, IPMatch == "DestinationIP", DestinationIP, "IP in Message Field") 
),
(OfficeActivity
| where isnotempty(UserAgent) and ClientIP in (IPList)
| where UserAgent contains "ExchangeServicesClient/0.0.0.0"
| summarize StartTimeUtc = min(TimeGenerated), EndTimeUtc = max(TimeGenerated) by SourceIP = ClientIP, Account = UserId, Type, RecordType, OfficeWorkload, UserAgent, OfficeObjectId, IPMatch = "ClientIP"
| extend timestamp = StartTimeUtc, AccountCustomEntity = Account, IPCustomEntity = SourceIP
)
)
severity: High
triggerThreshold: 0
query: |2

  let IPList = dynamic(["45.63.52.41","140.82.17.161","207.148.101.95","45.32.87.51","66.42.98.156","45.76.144.105","217.163.28.35","45.32.141.174","149.28.165.249","209.250.225.247","45.63.100.115","95.179.229.230","209.250.233.247","45.77.121.232","45.76.175.65","104.238.160.237","45.77.181.97","95.179.192.125","149.28.93.184","140.82.16.81","45.76.173.103","45.77.255.22","45.32.11.71","149.28.77.26","45.32.54.50","104.156.233.156","45.32.21.118","45.63.62.109","45.77.244.202","149.248.11.205","104.238.190.244"]);
  let IOCTerms = "\\?lang=[/..]*/dev/cmdb/sslvpn_websession|/dana-na/jam/[/..]*home/webserver/htdocs/dana/html5acc/guacamole[/..]*etc/passwd\\?";
  (union isfuzzy=true
  (CommonSecurityLog
  | where isnotempty(SourceIP) or isnotempty(DestinationIP)
  | where SourceIP in (IPList) or DestinationIP in (IPList) or has_any_ipv4 (Message, IPList)
  | extend IPMatch = case(
  SourceIP in (IPList), "SourceIP", 
  DestinationIP in (IPList), "DestinationIP",
  "Message") 
  | where Message matches regex IOCTerms
  | summarize StartTimeUtc = min(TimeGenerated), EndTimeUtc = max(TimeGenerated) by SourceIP, DestinationIP, DeviceProduct, DeviceAction, Message, Protocol, SourcePort, DestinationPort, DeviceAddress, DeviceName, IPMatch
  | extend timestamp = StartTimeUtc, IPCustomEntity = case(IPMatch == "SourceIP", SourceIP, IPMatch == "DestinationIP", DestinationIP, "IP in Message Field") 
  ),
  (OfficeActivity
  | where isnotempty(UserAgent) and ClientIP in (IPList)
  | where UserAgent contains "ExchangeServicesClient/0.0.0.0"
  | summarize StartTimeUtc = min(TimeGenerated), EndTimeUtc = max(TimeGenerated) by SourceIP = ClientIP, Account = UserId, Type, RecordType, OfficeWorkload, UserAgent, OfficeObjectId, IPMatch = "ClientIP"
  | extend timestamp = StartTimeUtc, AccountCustomEntity = Account, IPCustomEntity = SourceIP
  )
  )
queryFrequency: 1d
requiredDataConnectors:
- connectorId: Office365
  dataTypes:
  - OfficeActivity
id: a04cf847-a832-4c60-b687-b0b6147da219
version: 1.1.1
name: Known Manganese IP and UserAgent activity
kind: Scheduled
status: Available
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Legacy IOC based Threat Protection/Analytic Rules/Manganese_VPN-IOCs.yaml
queryPeriod: 1d
relevantTechniques:
- T1133
- T1114
triggerOperator: gt
tactics:
- InitialAccess
- Collection
description: |
  'Matches IP plus UserAgent IOCs in OfficeActivity data, along with IP plus Connection string information in the CommonSecurityLog data related to Manganese group activity.
  References: 
  https://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44101/
  https://fortiguard.com/psirt/FG-IR-18-384'  
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: FullName
    columnName: AccountCustomEntity
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: IPCustomEntity
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/a04cf847-a832-4c60-b687-b0b6147da219')]",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/a04cf847-a832-4c60-b687-b0b6147da219')]",
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
      "kind": "Scheduled",
      "apiVersion": "2022-11-01",
      "properties": {
        "displayName": "Known Manganese IP and UserAgent activity",
        "description": "'Matches IP plus UserAgent IOCs in OfficeActivity data, along with IP plus Connection string information in the CommonSecurityLog data related to Manganese group activity.\nReferences: \nhttps://kb.pulsesecure.net/articles/Pulse_Security_Advisories/SA44101/\nhttps://fortiguard.com/psirt/FG-IR-18-384'\n",
        "severity": "High",
        "enabled": true,
        "query": "\nlet IPList = dynamic([\"45.63.52.41\",\"140.82.17.161\",\"207.148.101.95\",\"45.32.87.51\",\"66.42.98.156\",\"45.76.144.105\",\"217.163.28.35\",\"45.32.141.174\",\"149.28.165.249\",\"209.250.225.247\",\"45.63.100.115\",\"95.179.229.230\",\"209.250.233.247\",\"45.77.121.232\",\"45.76.175.65\",\"104.238.160.237\",\"45.77.181.97\",\"95.179.192.125\",\"149.28.93.184\",\"140.82.16.81\",\"45.76.173.103\",\"45.77.255.22\",\"45.32.11.71\",\"149.28.77.26\",\"45.32.54.50\",\"104.156.233.156\",\"45.32.21.118\",\"45.63.62.109\",\"45.77.244.202\",\"149.248.11.205\",\"104.238.190.244\"]);\nlet IOCTerms = \"\\\\?lang=[/..]*/dev/cmdb/sslvpn_websession|/dana-na/jam/[/..]*home/webserver/htdocs/dana/html5acc/guacamole[/..]*etc/passwd\\\\?\";\n(union isfuzzy=true\n(CommonSecurityLog\n| where isnotempty(SourceIP) or isnotempty(DestinationIP)\n| where SourceIP in (IPList) or DestinationIP in (IPList) or has_any_ipv4 (Message, IPList)\n| extend IPMatch = case(\nSourceIP in (IPList), \"SourceIP\", \nDestinationIP in (IPList), \"DestinationIP\",\n\"Message\") \n| where Message matches regex IOCTerms\n| summarize StartTimeUtc = min(TimeGenerated), EndTimeUtc = max(TimeGenerated) by SourceIP, DestinationIP, DeviceProduct, DeviceAction, Message, Protocol, SourcePort, DestinationPort, DeviceAddress, DeviceName, IPMatch\n| extend timestamp = StartTimeUtc, IPCustomEntity = case(IPMatch == \"SourceIP\", SourceIP, IPMatch == \"DestinationIP\", DestinationIP, \"IP in Message Field\") \n),\n(OfficeActivity\n| where isnotempty(UserAgent) and ClientIP in (IPList)\n| where UserAgent contains \"ExchangeServicesClient/0.0.0.0\"\n| summarize StartTimeUtc = min(TimeGenerated), EndTimeUtc = max(TimeGenerated) by SourceIP = ClientIP, Account = UserId, Type, RecordType, OfficeWorkload, UserAgent, OfficeObjectId, IPMatch = \"ClientIP\"\n| extend timestamp = StartTimeUtc, AccountCustomEntity = Account, IPCustomEntity = SourceIP\n)\n)\n",
        "queryFrequency": "P1D",
        "queryPeriod": "P1D",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0,
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess",
          "Collection"
        ],
        "techniques": [
          "T1133",
          "T1114"
        ],
        "alertRuleTemplateName": "a04cf847-a832-4c60-b687-b0b6147da219",
        "customDetails": null,
        "entityMappings": [
          {
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "FullName"
              }
            ],
            "entityType": "Account"
          },
          {
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ],
            "entityType": "IP"
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Legacy IOC based Threat Protection/Analytic Rules/Manganese_VPN-IOCs.yaml",
        "templateVersion": "1.1.1",
        "status": "Available"
      }
    }
  ]
}