A Python utility for loading security data from the jamesspi/ohmymalware repository into Elasticsearch.
- Downloads security events and alerts from the OhMyMalware repository
- Creates properly configured Elasticsearch indices for security data
- Sets up ingest pipelines for Elastic Security rule compatibility
- Handles various file formats (JSON, NDJSON, CSV, logs)
- Processes episode data from the repository
- Python 3.6+
- Elasticsearch 7.x+
- Python packages: pandas, requests, elasticsearch
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .Edit the configuration section in main.py:
# Configuration - MODIFY THESE VALUES
ES_HOST = "localhost" # Your Elasticsearch host
ES_PORT = 9200 # Your Elasticsearch port
ES_USER = "elastic" # Your Elasticsearch username (if auth required)
ES_PASSWORD = "changeme" # Your Elasticsearch password (if auth required)python main.pyThe script will:
- Connect to your Elasticsearch instance
- Create necessary indices and pipelines
- Download and process security data
- Index the data into the appropriate indices
- Events are indexed into:
logs-endpoint.events.imported - Alerts are indexed into:
logs-endpoint.alerts-imported - An ingest pipeline is created:
ohmymalware-security-pipeline
MIT