Integration Elasitc stack with thehive

Hello guys

i try to integrate elastic security with thehive using webhook in kibana connectors and action

to do the next:
when elastic security generate alert send the alert automaticly to thehive
but the problem i have is it in the variable i send in the body of webhook:
like when i want to send title or description i send it by context.rule.description or context.rule.name not just rule.description

but when i try to send the rule.uuid or rule.actions.uuid i don't receive anything about it in thehive i receive theh nothing

can any one tell me how i can fix it


{
  "_index": ".internal.alerts-security.alerts-default-000002",
  "_id": "xxxx",
  "_score": 1,
  "fields": {
    "winlog.event_data.AuthenticationPackageName": [
      "NTLM"
    ],
    "kibana.alert.rule.references": [
      "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625"
    ],
    "kibana.alert.rule.updated_by": [
      "adiler"
    ],
    "elastic_agent.version": [
      "8.15.4"
    ],
    "host.os.name.text": [
      "xxxx"
    ],
    "host.hostname": [
      "xxxx"
    ],
    "host.mac": [
      "xxxx",
      "xxxx"
    ],
    "signal.rule.threat.technique.subtechnique.id": [
      "xxxx",
      "xxxx"
    ],
    "winlog.process.pid": [
      652
    ],
    "kibana.alert.rule.threat.technique.id": [
      "xxxx"
    ],
    "signal.rule.enabled": [
      "true"
    ],
    "host.os.version": [
      "11.0"
    ],
    "signal.rule.max_signals": [
      100
    ],
    "kibana.alert.risk_score": [
      47
    ],
    "signal.rule.updated_at": [
      "2024-10-15T11:15:59.436Z"
    ],
    "winlog.logon.id": [
      "xxxx"
    ],
    "kibana.alert.rule.threat.technique.subtechnique.reference": [
      "https://attack.mitre.org/techniques/T1110/001/",
      "https://attack.mitre.org/techniques/T1110/003/"
    ],
    "winlog.logon.failure.reason": [
      "Unknown user name or bad password."
    ],
    "winlog.logon.failure.sub_status": [
      "User logon with misspelled or bad password"
    ],
    "host.os.type": [
      "windows"
    ],
    "signal.original_event.code": [
      "4625"
    ],
    "winlog.event_data.TargetUserSid": [
      "xxxx"
    ],
    "kibana.alert.original_event.module": [
      "system"
    ],
    "signal.rule.references": [
      "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625"
    ],
    "kibana.alert.rule.interval": [
      "30s"
    ],
    "kibana.alert.rule.type": [
      "eql"
    ],
    "event.provider": [
      "xxxx"
    ],
    "kibana.alert.rule.immutable": [
      "false"
    ],
    "source.port": [
      0
    ],
    "winlog.event_data.TransmittedServices": [
      "-"
    ],
    "kibana.alert.rule.version": [
      "9"
    ],
    "kibana.alert.rule.actions.frequency.summary": [
      true
    ],
    "signal.original_event.outcome": [
      "failure"
    ],
    "host.ip": [
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx"
    ],
    "agent.type": [
      "filebeat"
    ],
    "process.executable.text": [
      "-"
    ],
    "signal.original_event.category": [
      "authentication"
    ],
    "winlog.event_data.SubjectLogonId": [
      "0x0"
    ],
    "related.ip": [
      "xxxx"
    ],
    "winlog.api": [
      "wineventlog"
    ],
    "signal.rule.threat.framework": [
      "MITRE ATT&CK"
    ],
    "host.id": [
      "xxxx"
    ],
    "elastic_agent.id": [
      "xxxx"
    ],
    "winlog.event_data.LogonProcessName": [
      "NtLmSsp "
    ],
    "kibana.alert.rule.indices": [
      "winlogbeat-*",
      "logs-system.security*",
      "logs-windows.forwarded*",
      "logs*"
    ],
    "signal.rule.threat.technique.subtechnique.reference": [
      "https://attack.mitre.org/techniques/T1110/001/",
      "https://attack.mitre.org/techniques/T1110/003/"
    ],
    "signal.rule.updated_by": [
      "adiler"
    ],
    "winlog.channel": [
      "Security"
    ],
    "winlog.event_data.LogonType": [
      "3"
    ],
    "host.os.platform": [
      "windows"
    ],
    "kibana.alert.rule.severity": [
      "medium"
    ],
    "winlog.event_data.TargetDomainName": [
      "WIN-bgds"
    ],
    "winlog.opcode": [
      "Informations"
    ],
    "signal.rule.threat.technique.reference": [
      "https://attack.mitre.org/techniques/T1110/"
    ],
    "kibana.version": [
      "8.13.4"
    ],
    "signal.ancestors.type": [
      "event",
      "signal",
      "event",
      "signal",
      "event",
      "signal",
      "event",
      "signal",
      "event",
      "signal"
    ],
    "user.name.text": [
      "xxxx"
    ],
    "kibana.alert.ancestors.id": [
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx"
    ],
    "process.name.text": [
      "xxxx"
    ],
    "kibana.alert.original_event.code": [
      "4625"
    ],
    "kibana.alert.rule.description": [
      "xxxx"
    ],
    "winlog.computer_name": [
      "xxxx"
    ],
    "kibana.alert.rule.producer": [
      "siem"
    ],
    "kibana.alert.rule.actions.params.body": [
      "xxxx"
    ],
    "kibana.alert.rule.to": [
      "now"
    ],
    "signal.rule.id": [
      "xxxx"
    ],
    "winlog.keywords": [
      "\u00c9chec de l\u2019audit"
    ],
    "signal.reason": [
      "authentication event with source x.x.x.x by xxxx on xxxx created medium alert Privileged Account Brute Force windows [Duplicate]."
    ],
    "signal.rule.risk_score": [
      47
    ],
    "user.risk.calculated_score_norm": [
      59.796635
    ],
    "host.os.name": [
      "xxxx"
    ],
    "log.level": [
      "information"
    ],
    "signal.status": [
      "open"
    ],
    "winlog.activity_id": [
      "xxxx"
    ],
    "signal.rule.tags": [
      "Domain: Endpoint",
      "OS: Windows",
      "Use Case: Threat Detection",
      "Tactic: Credential Access",
      "Resources: Investigation Guide"
    ],
    "winlog.event_data.TargetUserName": [
      "Administrateur"
    ],
    "kibana.alert.rule.threat.tactic.name": [
      "xxxx"
    ],
    "kibana.alert.rule.uuid": [
      "xxxx"
    ],
    "kibana.alert.original_event.category": [
      "authentication"
    ],
    "signal.original_event.provider": [
      "xxxx"
    ],
    "winlog.event_data.FailureReason": [
      "%%2313"
    ],
    "process.name": [
      "xxxx"
    ],
    "kibana.alert.ancestors.index": [
      ".ds-logs-system.security-xxxx-2024.10.15-000001",
      "",
      ".ds-logs-system.security-xxxx-2024.10.15-000001",
      "",
      ".ds-logs-system.security-xxxx-2024.10.15-000001",
      "",
      ".ds-logs-system.security-xxxx-2024.10.15-000001",
      "",
      ".ds-logs-system.security-xxxx-2024.10.15-000001",
      ""
    ],
    "agent.version": [
      "8.15.4"
    ],
    "host.os.family": [
      "windows"
    ],
    "kibana.alert.rule.from": [
      "now-630s"
    ],
    "kibana.alert.rule.parameters": [
      {
        "description": "Identifies multiple consecutive logon failures targeting an Admin account from the same source address and within a short time interval. Adversaries will often brute force login attempts across multiple users with a common or known password, in an attempt to gain access to accounts.",
        "risk_score": 47,
        "severity": "medium",
        "note": "## Triage and analysis\n\n### Investigating Privileged Account Brute Force\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address against an account that contains the `admin` pattern on its name, which is likely a highly privileged account.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user name.\n  - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n  - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n  - Observe and collect information about the following activities in the alert source host:\n    - Attempts to contact external domains and addresses.\n      - Examine the DNS cache for suspicious or anomalous entries.\n        - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n    - Examine the host services for suspicious or anomalous entries.\n      - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n      - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n      - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n",
        "license": "Elastic License v2",
        "meta": {
          "from": "10m",
          "kibana_siem_app_url": ""
        },
        "author": [
          "Elastic"
        ],
        "false_positives": [],
        "from": "now-630s",
        "rule_id": "6edbb123-e6f0-4391-ade1-507d4afdbaec",
        "max_signals": 100,
        "risk_score_mapping": [],
        "severity_mapping": [],
        "threat": [
          {
            "framework": "MITRE ATT&CK",
            "tactic": {
              "id": "TA0006",
              "name": "Credential Access",
              "reference": "https://attack.mitre.org/tactics/TA0006/"
            },
            "technique": [
              {
                "id": "T1110",
                "name": "Brute Force",
                "reference": "https://attack.mitre.org/techniques/T1110/",
                "subtechnique": [
                  {
                    "id": "T1110.001",
                    "name": "Password Guessing",
                    "reference": "https://attack.mitre.org/techniques/T1110/001/"
                  },
                  {
                    "id": "T1110.003",
                    "name": "Password Spraying",
                    "reference": "https://attack.mitre.org/techniques/T1110/003/"
                  }
                ]
              }
            ]
          }
        ],
        "to": "now",
        "references": [
          "https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625"
        ],
        "version": 9,
        "exceptions_list": [],
        "immutable": false,
        "related_integrations": [],
        "required_fields": [],
        "setup": "",
        "type": "eql",
        "language": "eql",
        "index": [
          "winlogbeat-*",
          "logs-system.security*",
          "logs-windows.forwarded*",
          "logs*"
        ],
        "query": "sequence by winlog.computer_name, source.ip with maxspan=30s\n  [authentication where event.action == \"logon-failed\" and winlog.logon.type : \"Network\" and\n    source.ip != null and source.ip != \"127.0.0.1\" and source.ip != \"::1\" and (user.name : \"*admin*\" or user.name : \"Administrateur\")and\n\n    /* noisy failure status codes often associated to authentication misconfiguration */\n    not winlog.event_data.Status : (\"0xC000015B\", \"0XC000005E\", \"0XC0000133\", \"0XC0000192\")] with runs=5\n",
        "filters": []
      }
    ],
    "kibana.alert.rule.threat.tactic.id": [
      "xxxx"
    ],
    "signal.original_event.kind": [
      "event"
    ],
    "kibana.alert.rule.threat.technique.name": [
      "xxxx"
    ],
    "signal.depth": [
      2
    ],
    "signal.rule.immutable": [
      "false"
    ],
    "host.os.build": [
      "14393.7159"
    ],
    "signal.rule.name": [
      "xxxx"
    ],
    "event.module": [
      "system"
    ],
    "host.os.kernel": [
      "10.0.14393.7155 (rs1_release.240624-1757)"
    ],
    "kibana.alert.rule.license": [
      "Elastic License v2"
    ],
    "kibana.alert.rule.threat.technique.subtechnique.id": [
      "xxxx",
      "xxxx"
    ],
    "kibana.alert.original_event.kind": [
      "event"
    ],
    "winlog.task": [
      "Logon"
    ],
    "signal.rule.description": [
      "xxxx"
    ],
    "message": [
    ],
    "kibana.alert.original_event.outcome": [
      "failure"
    ],
    "kibana.space_ids": [
      "xxxx"
    ],
    "kibana.alert.severity": [
      "medium"
    ],
    "signal.ancestors.depth": [
      0,
      1,
      0,
      1,
      0,
      1,
      0,
      1,
      0,
      1
    ],
    "event.category": [
      "authentication"
    ],
    "host.risk.calculated_score_norm": [
      63.897274
    ],
    "kibana.alert.rule.tags": [
      "Domain: Endpoint",
      "OS: Windows",
      "Use Case: Threat Detection",
      "Tactic: Credential Access",
      "Resources: Investigation Guide"
    ],
    "kibana.alert.rule.actions.uuid": [
      "xxxx"
    ],
    "winlog.event_data.KeyLength": [
      "0"
    ],
    "kibana.alert.ancestors.depth": [
      0,
      1,
      0,
      1,
      0,
      1,
      0,
      1,
      0,
      1
    ],
    "kibana.alert.rule.threat.technique.subtechnique.name": [
      "xxxx",
      "xxxx"
    ],
    "source.ip": [
      "xxxx"
    ],
    "agent.name": [
      "xxxx"
    ],
    "event.agent_id_status": [
      "xxxx"
    ],
    "event.outcome": [
      "failure"
    ],
    "kibana.alert.group.id": [
      "xxxx"
    ],
    "user.id": [
      "xxxx"
    ],
    "input.type": [
      "winlog"
    ],
    "signal.rule.threat.technique.subtechnique.name": [
      "xxxx",
      "xxxx"
    ],
    "related.user": [
      "xxxx"
    ],
    "host.architecture": [
      "x86_64"
    ],
    "kibana.alert.start": [
      "2024-10-15T11:16:47.258Z"
    ],
    "event.code": [
      "4625"
    ],
    "kibana.alert.original_event.type": [
      "start"
    ],
    "agent.id": [
      "xxxx"
    ],
    "signal.original_event.module": [
      "system"
    ],
    "kibana.alert.rule.actions.action_type_id": [
      "xxxx"
    ],
    "signal.rule.from": [
      "now-630s"
    ],
    "kibana.alert.rule.enabled": [
      "true"
    ],
    "kibana.alert.ancestors.type": [
      "event",
      "signal",
      "event",
      "signal",
      "event",
      "signal",
      "event",
      "signal",
      "event",
      "signal"
    ],
    "winlog.event_data.SubjectUserSid": [
      "xxxx"
    ],
    "kibana.alert.rule.actions.id": [
      "xxxx"
    ],
    "signal.ancestors.index": [
      ".ds-logs-system.security-2024.10.15-000001",
      "",
      ".ds-logs-system.security-2024.10.15-000001",
      "",
      ".ds-logs-system.security-2024.10.15-000001",
      "",
      ".ds-logs-system.security-2024.10.15-000001",
      "",
      ".ds-logs-system.security-2024.10.15-000001",
      ""
    ],
    "user.name": [
      "xxxx"
    ],
    "source.domain": [
      "xxxx"
    ],
    "winlog.logon.failure.status": [
      "This is either due to a bad username or authentication information"
    ],
    "winlog.event_data.Status": [
      "0xc000006d"
    ],
    "elastic_agent.snapshot": [
      false
    ],
    "user.domain": [
      "xxxx"
    ],
    "signal.original_event.type": [
      "start"
    ],
    "kibana.alert.rule.note": [
      "## Triage and analysis\n\n### Investigating Privileged Account Brute Force\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address against an account that contains the `admin` pattern on its name, which is likely a highly privileged account.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user name.\n  - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n  - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n  - Observe and collect information about the following activities in the alert source host:\n    - Attempts to contact external domains and addresses.\n      - Examine the DNS cache for suspicious or anomalous entries.\n        - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n    - Examine the host services for suspicious or anomalous entries.\n      - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n      - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n      - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n"
    ],
    "kibana.alert.rule.max_signals": [
      100
    ],
    "signal.rule.author": [
      "Elastic"
    ],
    "winlog.logon.type": [
      "Network"
    ],
    "kibana.alert.rule.risk_score": [
      47
    ],
    "signal.original_event.dataset": [
      "system.security"
    ],
    "signal.rule.threat.technique.id": [
      "xxxx"
    ],
    "kibana.alert.rule.consumer": [
      "siem"
    ],
    "kibana.alert.rule.category": [
      "Event Correlation Rule"
    ],
    "event.action": [
      "logon-failed"
    ],
    "@timestamp": [
      "2024-10-15T11:16:47.208Z"
    ],
    "kibana.alert.original_event.action": [
      "logon-failed"
    ],
    "kibana.alert.original_event.agent_id_status": [
      "xxxx"
    ],
    "data_stream.dataset": [
      "system.security"
    ],
    "agent.ephemeral_id": [
      "xxxx"
    ],
    "host.risk.calculated_level": [
      "Moderate"
    ],
    "kibana.alert.rule.execution.uuid": [
      "xxxx"
    ],
    "kibana.alert.uuid": [
      "xxxx"
    ],
    "signal.rule.note": [
      "## Triage and analysis\n\n### Investigating Privileged Account Brute Force\n\nAdversaries with no prior knowledge of legitimate credentials within the system or environment may guess passwords to attempt access to accounts. Without knowledge of the password for an account, an adversary may opt to guess the password using a repetitive or iterative mechanism systematically. More details can be found [here](https://attack.mitre.org/techniques/T1110/001/).\n\nThis rule identifies potential password guessing/brute force activity from a single address against an account that contains the `admin` pattern on its name, which is likely a highly privileged account.\n\n> **Note**:\n> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.\n\n#### Possible investigation steps\n\n- Investigate the logon failure reason code and the targeted user name.\n  - Prioritize the investigation if the account is critical or has administrative privileges over the domain.\n- Investigate the source IP address of the failed Network Logon attempts.\n  - Identify whether these attempts are coming from the internet or are internal.\n- Investigate other alerts associated with the involved users and source host during the past 48 hours.\n- Identify the source and the target computer and their roles in the IT environment.\n- Check whether the involved credentials are used in automation or scheduled tasks.\n- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.\n- Examine the source host for derived artifacts that indicate compromise:\n  - Observe and collect information about the following activities in the alert source host:\n    - Attempts to contact external domains and addresses.\n      - Examine the DNS cache for suspicious or anomalous entries.\n        - !{osquery{\"label\":\"Osquery - Retrieve DNS Cache\",\"query\":\"SELECT * FROM dns_cache\"}}\n    - Examine the host services for suspicious or anomalous entries.\n      - !{osquery{\"label\":\"Osquery - Retrieve All Services\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services\"}}\n      - !{osquery{\"label\":\"Osquery - Retrieve Services Running on User Accounts\",\"query\":\"SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE\\nNOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR\\nuser_account == null)\\n\"}}\n      - !{osquery{\"label\":\"Osquery - Retrieve Service Unsigned Executables with Virustotal Link\",\"query\":\"SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,\\nservices.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =\\nauthenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'\\n\"}}\n- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the host which is the source of this activity.\n\n### False positive analysis\n\n- Authentication misconfiguration or obsolete credentials.\n- Service account password expired.\n- Domain trust relationship issues.\n- Infrastructure or availability issues.\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the source host to prevent further post-compromise behavior.\n- If the asset is exposed to the internet with RDP or other remote services available, take the necessary measures to restrict access to the asset. If not possible, limit the access via the firewall to only the needed IP addresses. Also, ensure the system uses robust authentication mechanisms and is patched regularly.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).\n"
    ],
    "winlog.event_data.SubjectDomainName": [
      "-"
    ],
    "kibana.alert.rule.meta.kibana_siem_app_url": [
      ""
    ],
    "signal.rule.threat.technique.name": [
      "xxxx"
    ],
    "signal.rule.license": [
      "Elastic License v2"
    ],
    "kibana.alert.ancestors.rule": [
      "7c648ed0-87b5-11ef-a52d-b5993078b6ed",
      "7c648ed0-87b5-11ef-a52d-b5993078b6ed",
      "7c648ed0-87b5-11ef-a52d-b5993078b6ed",
      "7c648ed0-87b5-11ef-a52d-b5993078b6ed",
      "7c648ed0-87b5-11ef-a52d-b5993078b6ed"
    ],
    "kibana.alert.rule.rule_id": [
      "xxxx"
    ],
    "signal.rule.type": [
      "eql"
    ],
    "winlog.provider_guid": [
      "xxxx"
    ],
    "winlog.provider_name": [
      "xxxx"
    ],
    "user.risk.calculated_level": [
      "xxxx"
    ],
    "process.pid": [
      0
    ],
    "signal.rule.created_by": [
      "adiler"
    ],
    "signal.rule.interval": [
      "30s"
    ],
    "kibana.alert.rule.created_by": [
      "adiler"
    ],
    "kibana.alert.rule.name": [
      "xxxx"
    ],
    "host.name": [
      "xxxx"
    ],
    "kibana.alert.rule.threat.technique.reference": [
      "https://attack.mitre.org/techniques/T1110/"
    ],
    "event.kind": [
      "signal"
    ],
    "signal.rule.created_at": [
      "2024-10-11T09:45:01.777Z"
    ],
    "kibana.alert.workflow_status": [
      "open"
    ],
    "kibana.alert.rule.actions.frequency.notifyWhen": [
      "onActiveAlert"
    ],
    "kibana.alert.reason": [
      "authentication ev."
    ],
    "signal.rule.threat.tactic.id": [
      "xxxx"
    ],
    "data_stream.type": [
      "logs"
    ],
    "signal.ancestors.id": [
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx",
      "xxxx"
    ],
    "signal.original_time": [
      "2024-10-15T11:16:47.196Z"
    ],
    "ecs.version": [
      "8.0.0"
    ],
    "signal.rule.severity": [
      "medium"
    ],
    "kibana.alert.rule.actions.group": [
      "default"
    ],
    "winlog.event_data.LmPackageName": [
      "-"
    ],
    "kibana.alert.depth": [
      2
    ],
    "kibana.alert.rule.revision": [
      51
    ],
    "signal.rule.version": [
      "9"
    ],
    "signal.group.id": [
      "xxxx"
    ],
    "kibana.alert.status": [
      "active"
    ],
    "kibana.alert.last_detected": [
      "2024-10-15T11:16:47.258Z"
    ],
    "kibana.alert.original_event.dataset": [
      "system.security"
    ],
    "kibana.alert.rule.rule_type_id": [
      "xxxx"
    ],
    "kibana.alert.original_event.provider": [
      "xxxx"
    ],
    "signal.rule.rule_id": [
      "xxxx"
    ],
    "signal.rule.threat.tactic.reference": [
      "https://attack.mitre.org/tactics/TA0006/"
    ],
    "process.executable": [
      "-"
    ],
    "signal.rule.threat.tactic.name": [
      "xxxx"
    ],
    "kibana.alert.rule.threat.framework": [
      "MITRE ATT&CK"
    ],
    "kibana.alert.rule.updated_at": [
      "2024-10-15T11:15:59.436Z"
    ],
    "winlog.event_data.SubjectUserName": [
      "-"
    ],
    "data_stream.namespace": [
      "xxxx"
    ],
    "kibana.alert.rule.author": [
      "Elastic"
    ],
    "winlog.event_id": [
      "xxxx"
    ],
    "kibana.alert.rule.threat.tactic.reference": [
      "https://attack.mitre.org/tactics/TA0006/"
    ],
    "signal.original_event.action": [
      "logon-failed"
    ],
    "kibana.alert.rule.created_at": [
      "2024-10-11T09:45:01.777Z"
    ],
    "signal.rule.to": [
      "now"
    ],
    "winlog.event_data.SubStatus": [
      "0xc000006a"
    ],
    "event.type": [
      "start"
    ],
    "kibana.alert.rule.meta.from": [
      "10m"
    ],
    "event.dataset": [
      "system.security"
    ],
    "kibana.alert.original_time": [
      "2024-10-15T11:16:47.196Z"
    ]
  }
}

Hi @adilraad2001,

Welcome to the community! Are you creating your alert using Kibana UI or the API? Did you test the connection? Do you see any errors in the logs on the Kibana or Hive side?

Hi @carly.richmond ,

I'm using the Kibana UI to create alerts, and I’ve tested the connection successfully without any errors in the logs. Regarding your webhook, I get the values for description and rule name, but the rule_id or uuid is not being received.

It seems like context.rule.rule_id or context.uuid might not be available in the context object as expected. You could try logging the full context in your alert to verify what fields are present. Alternatively, ensure that these fields are part of the alert configuration in Kibana before passing them to TheHive.

Example of webhook body:

 {
  "type": "Elastic",
  "source": "Kibana",
  "sourceRef": "{{context.rule.rule_id}}",   // or context.uuid
  "title": "{{context.rule.name}}",
  "description": "{{context.rule.description}}",
  "observable":{"dataType": "ip", "data": "93.184.216.34"}
}