DEV Community

Samyuktha Rajeev
Samyuktha Rajeev

Posted on

Ghost in the Logs: A 100% Offline AI Security Log Detective

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission πŸ‘»πŸŒΌ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

I built Ghost in the Logs, a privacy-first local AI log analyzer. It runs 100% offline via Ollama to prevent data leaks, featuring two modes: a Spooky Ghost Story mode and a professional SOC Cybersecurity Audit mode.

Demo

πŸ‘» Ghost in the Logs: Privacy-First Local AI Security & Anomaly Detective

Built for the Hacktoberfest 2026 Open-Source AI Challenge (Week 4: Ghost in the Machine).

πŸ’‘ Overview

In cybersecurity and cloud administration, pasting sensitive server, authentication, or firewall logs into third-party cloud chatbots creates severe data exfiltration and compliance risks.

Ghost in the Logs solves this by running an open-weight language model (llama3.2:1b) 100% locally via Ollama. It features two modes:

  • πŸ•―οΈ Ghost in the Machine Mode: Personifies security anomalies and server bugs as a spooky ghost story before explaining the fix.
  • πŸ›‘οΈ SOC Cybersecurity Audit Mode: Delivers a structured threat severity rating, plain-English anomaly breakdown, and actionable remediation steps.

βš™οΈ Architecture

System / Auth Logs βž” Streamlit Web UI (Python) βž” Local Ollama API (localhost:11434) βž” Llama 3.2 (1B) Open-Weight Model

πŸš€ How to Run Locally

  1. Install Ollama and pull the lightweight open-weight model:
    ollama pull llama3.2:1b
    Enter fullscreen mode Exit fullscreen mode

Code

The complete Python source code (main.py) is available directly in my public GitHub repository: GitHub - Ghost in the Logs

How I Built It

  • Open-Weight Model: Meta's llama3.2:1b running 100% locally.
  • Local Inference Engine: Ollama serving the model offline over localhost.
  • Frontend & Logic: Python 3.14 and Streamlit framework developed in PyCharm.

Why Does Open Innovation Matter?

Open-source and open-weight AI aren't just about avoiding API feesβ€”they are essential for security and data privacy. Running a compact open-weight model locally eliminates the risk of cloud data exfiltration, allowing security engineers and students to analyze sensitive system telemetry safely on everyday consumer hardware.

The Spirit of It

The inspiration behind this project was making AI practical and safe for students and security engineers. I wanted to build something that bridges the gap between a fun, spooky Halloween theme and real-world cybersecurity challenges. Watching raw, cryptic system logs get translated into an eerie ghost story, while knowing that all the data stayed 100% private and offline on my laptop really brought the "Ghost in the Machine" theme to life.


Top comments (0)