跳到正文
DEV Community· Samyuktha Rajeev·· 4 小時前AI 評分33

Ghost in the Logs:100% 離線 AI 安全日誌偵查工具

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

AI 導讀

Ghost in the Logs 是一款以私隱為先的本地 AI 日誌分析器,透過 Ollama 使用 llama3.2:1b 完全離線分析安全日誌,以避免資料外洩。工具設有「Ghost in the Machine」鬼故事模式,以及提供威脅嚴重程度評級、異常説明和修復建議的 SOC 網絡安全審核模式。

正文

Samyuktha Rajeev

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

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.


來源:DEV Community · dev.to