Wazuh_Alert_Investigation Kopie

Fortgeschritten

Dies ist ein SecOps, AI Summarization-Bereich Automatisierungsworkflow mit 6 Nodes. Hauptsächlich werden If, Webhook, Telegram, LmChatOpenAi, ChainSummarization und andere Nodes verwendet. Automatisiere die Triage und Berichterstattung von Wazuh-Alarmen mit GPT-4o-mini und Telegram

Voraussetzungen
  • HTTP Webhook-Endpunkt (wird von n8n automatisch generiert)
  • Telegram Bot Token
  • OpenAI API Key
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "",
  "meta": {
    "instanceId": "",
    "templateCredsSetupCompleted": true
  },
  "name": "Wazuh_Alert_Investigation copy",
  "tags": [
    {
      "id": "",
      "name": "Github",
      "createdAt": "2025-07-08T08:24:29.609Z",
      "updatedAt": "2025-07-08T08:24:29.609Z"
    }
  ],
  "nodes": [
    {
      "id": "If-0",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        240,
        -20
      ],
      "parameters": {
        "options": {
          "ignoreCase": true
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.body.severity }}",
              "rightValue": "1 low"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "Wazuh-Alert-1",
      "name": "Wazuh Alert",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -20,
        -20
      ],
      "webhookId": "",
      "parameters": {
        "path": "",
        "options": {
          "rawBody": true
        },
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "Keine-Operations-2",
      "name": "Keine Operations",
      "type": "n8n-nodes-base.noOp",
      "position": [
        260,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "Investigation-Summarization-3",
      "name": "Investigation Summarization",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        540,
        -40
      ],
      "parameters": {
        "options": {
          "summarizationMethodAndPrompts": {
            "values": {
              "prompt": "You are the experinced SOC AI Analyst designed by Mariskarthick M, Analyse the following and provide the detailed investigation with the below mentioned format.\n\n\"{text}\"\n\nconicise summary",
              "combineMapPrompt": "You are the experinced SOC AI Analyst designed by Mariskarthick M, Analyse the following and provide the detailed investigation with the below mentioned format.\n\n#Analyse:\n{{ $json.body.all_fields.full_log }}\n\n#Format:\nAlert Name: \nAlert Description: (describe about that alert)\nMitre Tactic & Technique\nImpacted Scope: Source IP, Destiantion IP, Host Machine\n\nExternal Artificats Reputation check:\n\nAnalysis:\n\nSecurity Recommendations.\n\nPlease make the investigation report in organized way and each fields line by line.\n {{ $json.body }}"
            }
          }
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "SOC-Team-4",
      "name": "SOC Team",
      "type": "n8n-nodes-base.telegram",
      "position": [
        920,
        -20
      ],
      "webhookId": "",
      "parameters": {
        "text": "={{ \n  $json.output.text\n    .replaceAll('\\\\', '')                       // Remove escape slashes\n    .replaceAll('*', '')                        // Remove Markdown stars\n    .replaceAll('#', '')                        // Remove Markdown headers\n    .replaceAll('_', '')                        // Remove underscores\n    .replaceAll('[', '')                        // Remove leftover brackets\n    .replaceAll(']', '')                        // Remove closing brackets\n    .replaceAll('(', '(')                       // Retain parentheses\n    .replaceAll(')', ')')\n    .replaceAll('`', '')                        // Remove backticks\n    .replaceAll('  ', ' ')                      // Extra space trim\n    .replaceAll('\\n\\n', '\\n')                   // Collapse double newlines\n    .replaceAll('\\n ', '\\n')                    // Remove leading spaces on lines\n    .replaceAll(' - ', ' — ')                   // Optional: replace dash with em dash for clarity\n    .trim()\n}}\n",
        "chatId": "",
        "additionalFields": {
          "appendAttribution": true
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "717713de-4a80-4b51-910c-3b6a588e2f56",
      "name": "Customized AI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        560,
        200
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2f2786be-474f-4ab6-a41e-391e7427d022",
  "connections": {
    "If-0": {
      "main": [
        [
          {
            "node": "Investigation-Summarization-3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wazuh-Alert-1": {
      "main": [
        [
          {
            "node": "If-0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "717713de-4a80-4b51-910c-3b6a588e2f56": {
      "ai_languageModel": [
        [
          {
            "node": "Investigation-Summarization-3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Investigation-Summarization-3": {
      "main": [
        [
          {
            "node": "SOC-Team-4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Sicherheitsbetrieb, KI-Zusammenfassung

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes6
Kategorie2
Node-Typen6
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
mariskarthick

mariskarthick

@mariskarthick

An Opensource Enthusiast specializing in detection engineering, threat hunting, and automating security operations to accelerate threat detection and response.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34