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

Component Object Model Hijacking - Vault7 trick

Back
Id1aaff41f-4e18-45b1-bb34-de6eb4943cf2
RulenameComponent Object Model Hijacking - Vault7 trick
DescriptionThis detection looks for the very specific value of “Attribute” in the “ShellFolder” CLSID of a COM object. This value (0xf090013d) seems to only link back to this specific persistence method.

The blog post linked here (https://www.ired.team/offensive-security/code-execution/forcing-iexplore.exe-to-load-a-malicious-dll-via-com-abuse) provides more background on the meaning of this value.
SeverityMedium
TacticsPersistence
PrivilegeEscalation
TechniquesT1546.015
Required data connectorsMicrosoftThreatProtection
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/FalconFriday/Analytic Rules/COMHijacking.yaml
Version1.0.0
Arm template1aaff41f-4e18-45b1-bb34-de6eb4943cf2.json
Deploy To Azure
DeviceRegistryEvents
| where RegistryKey has "ShellFolder"  and ActionType =~ "RegistryValueSet" and RegistryValueName =~ "Attributes" 
// toint automatically converts base10 and base16 strings to int toint("0xFF") == toint("255") == int(0xFF) ==  int(255).
// We are using >= to make sure that if someone adds an additional flag to this field, it doesn't bypass this hunt.
// Removing any flag will bypass this hunt, but more research is needed to understand which of the flag values are relevant.
| where toint(RegistryValueData) >= int(0xf090013d) 
//UPDATE: Flag details are here: https://medium.com/falconforce/introducing-falcon-friday-1f972d65ce1b?source=friends_link&sk=e48d9cb974e216cc4b9b61945a3b177d
triggerOperator: gt
requiredDataConnectors:
- dataTypes:
  - DeviceRegistryEvents
  connectorId: MicrosoftThreatProtection
queryPeriod: 1h
status: Available
kind: Scheduled
description: |
  This detection looks for the very specific value of "Attribute" in the "ShellFolder" CLSID of a COM object. This value (0xf090013d) seems to only link back to this specific persistence method. 
  The blog post linked here (https://www.ired.team/offensive-security/code-execution/forcing-iexplore.exe-to-load-a-malicious-dll-via-com-abuse) provides more background on the meaning of this value.   
query: |
  DeviceRegistryEvents
  | where RegistryKey has "ShellFolder"  and ActionType =~ "RegistryValueSet" and RegistryValueName =~ "Attributes" 
  // toint automatically converts base10 and base16 strings to int toint("0xFF") == toint("255") == int(0xFF) ==  int(255).
  // We are using >= to make sure that if someone adds an additional flag to this field, it doesn't bypass this hunt.
  // Removing any flag will bypass this hunt, but more research is needed to understand which of the flag values are relevant.
  | where toint(RegistryValueData) >= int(0xf090013d) 
  //UPDATE: Flag details are here: https://medium.com/falconforce/introducing-falcon-friday-1f972d65ce1b?source=friends_link&sk=e48d9cb974e216cc4b9b61945a3b177d  
relevantTechniques:
- T1546.015
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/FalconFriday/Analytic Rules/COMHijacking.yaml
severity: Medium
triggerThreshold: 0
name: Component Object Model Hijacking - Vault7 trick
tactics:
- Persistence
- PrivilegeEscalation
version: 1.0.0
entityMappings:
- entityType: Host
  fieldMappings:
  - identifier: FullName
    columnName: DeviceName
- entityType: Account
  fieldMappings:
  - identifier: Sid
    columnName: AccountSid
  - identifier: Name
    columnName: AccountName
  - identifier: NTDomain
    columnName: AccountDomain
- entityType: Process
  fieldMappings:
  - identifier: CommandLine
    columnName: ProcessCommandLine
id: 1aaff41f-4e18-45b1-bb34-de6eb4943cf2
queryFrequency: 1h
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/1aaff41f-4e18-45b1-bb34-de6eb4943cf2')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/1aaff41f-4e18-45b1-bb34-de6eb4943cf2')]",
      "properties": {
        "alertRuleTemplateName": "1aaff41f-4e18-45b1-bb34-de6eb4943cf2",
        "customDetails": null,
        "description": "This detection looks for the very specific value of \"Attribute\" in the \"ShellFolder\" CLSID of a COM object. This value (0xf090013d) seems to only link back to this specific persistence method. \nThe blog post linked here (https://www.ired.team/offensive-security/code-execution/forcing-iexplore.exe-to-load-a-malicious-dll-via-com-abuse) provides more background on the meaning of this value. \n",
        "displayName": "Component Object Model Hijacking - Vault7 trick",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Host",
            "fieldMappings": [
              {
                "columnName": "DeviceName",
                "identifier": "FullName"
              }
            ]
          },
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountSid",
                "identifier": "Sid"
              },
              {
                "columnName": "AccountName",
                "identifier": "Name"
              },
              {
                "columnName": "AccountDomain",
                "identifier": "NTDomain"
              }
            ]
          },
          {
            "entityType": "Process",
            "fieldMappings": [
              {
                "columnName": "ProcessCommandLine",
                "identifier": "CommandLine"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/FalconFriday/Analytic Rules/COMHijacking.yaml",
        "query": "DeviceRegistryEvents\n| where RegistryKey has \"ShellFolder\"  and ActionType =~ \"RegistryValueSet\" and RegistryValueName =~ \"Attributes\" \n// toint automatically converts base10 and base16 strings to int toint(\"0xFF\") == toint(\"255\") == int(0xFF) ==  int(255).\n// We are using >= to make sure that if someone adds an additional flag to this field, it doesn't bypass this hunt.\n// Removing any flag will bypass this hunt, but more research is needed to understand which of the flag values are relevant.\n| where toint(RegistryValueData) >= int(0xf090013d) \n//UPDATE: Flag details are here: https://medium.com/falconforce/introducing-falcon-friday-1f972d65ce1b?source=friends_link&sk=e48d9cb974e216cc4b9b61945a3b177d\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Persistence",
          "PrivilegeEscalation"
        ],
        "techniques": [
          "T1546"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}