Hub
Email

Kaspersky Secure Mail Gateway

Kaspersky Secure Mail Gateway (KSMG) ScanLogic events — anti-virus, anti-spam, anti-phishing, content filtering, mail authentication (SPF/DKIM/DMARC), KATA integration, message backup, and scan failure events in ECS-compatible JSON.

Quick Start

uv tool install eventum-generator
git clone https://github.com/eventum-generator/content-packs.git
cd content-packs
eventum generate \
  --path generators/email-kaspersky-ksmg/generator.yml \
  --id email-kaspersky-ksmg \
  --live-mode true

Event Types

Event IDDescriptionFrequencyCategory
av-scanAnti-Virus scan results (clean, infected, disinfected, encrypted)25%email
as-scanAnti-Spam scan results (clean, spam, probable spam, mass mail)25%email
ap-scanAnti-Phishing scan results (clean, phishing, malicious links)15%email
ma-authMail Authentication checks (SPF/DKIM/DMARC)15%email
cf-filterContent Filtering (banned files, size violations)10%email
kt-kataKATA integration (APT/zero-day detection)4%email
message-backupMessage quarantine events4%email
not-processedScan failure events (errors, timeouts)2%email

Realism Features

  • Weighted scan outcomes per module — e.g., AV: 93.5% clean, 3% infected, 1% disinfected, 2% encrypted
  • Directional email flow — 72% inbound from external domains, 28% outbound from internal users
  • Lognormal message sizes with realistic distribution (500 B to 30 MB)
  • Categorized subjects tied to scan type — spam/phishing subjects for AS/AP, business subjects for others
  • Threat database with realistic Kaspersky detection names (Trojan, Exploit, Ransomware, Stealer)
  • Processing rule engine with weighted rule selection and configurable actions

Sample Output

{
  "@timestamp": "2026-03-06T14:22:31.000Z",
  "event": {
    "kind": "event",
    "category": [
      "email"
    ],
    "type": [
      "info"
    ],
    "action": "scan-result",
    "outcome": "failure",
    "severity": 7,
    "reason": "ThreatDetected"
  },
  "observer": {
    "vendor": "Kaspersky",
    "product": "Secure Mail Gateway",
    "version": "2.0.1.6960",
    "hostname": "ksmg-node01",
    "ip": [
      "10.1.0.20"
    ]
  },
  "email": {
    "direction": "inbound",
    "from": {
      "address": [
        "jdoe@partner-corp.com"
      ]
    },
    "to": {
      "address": [
        "d.brown@corp.example.com"
      ]
    },
    "subject": "Updated invoice attached"
  },
  "kaspersky": {
    "ksmg": {
      "event_class": "LMS_EV_SCAN_LOGIC_AV_STATUS",
      "scan_type": "av",
      "status": "Infected",
      "action": "Reject",
      "threat_name": "HEUR:Trojan.Script.Generic",
      "threat_file": "invoice_2024.pdf.exe"
    }
  }
}

Parameters

ParameterDefaultDescription
ksmg_hostnameksmg-node01KSMG gateway hostname
ksmg_ip10.1.0.20KSMG gateway IP address
domaincorp.example.comOrganization email domain
ksmg_version2.0.1.6960KSMG software version
agent_idc4d5e6f7-...Elastic Agent UUID
agent_version8.17.0Elastic Agent version

Related Generators