Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

galah

> AI 编程
Open source

Galah: An LLM-powered web honeypot.

656 stars0 likes0 views
WebsiteGitHub

About

Galah: An LLM-powered web honeypot.

TL;DR: Galah (/ɡəˈlɑː/ - pronounced ‘guh-laa’) is an LLM-powered web honeypot designed to mimic various applications and dynamically respond to arbitrary HTTP requests. Galah supports major LLM providers, including OpenAI, GoogleAI, GCP's Vertex AI, Anthropic, Cohere, and Ollama.

Unlike traditional web honeypots that manually emulate specific web applications or vulnerabilities, Galah dynamically crafts relevant responses—including HTTP headers and body content—to any HTTP request. Responses generated by the LLM are cached for a configurable period to prevent repetitive generation for identical requests, reducing API costs. The caching is port-specific, ensuring that responses generated for a particular port will not be reused for the same request on a different port.

Galah can optionally inspect incoming HTTP requests against a set of Suricata rules, matching on various HTTP buffers including method, URI, headers, cookies, and request body (the current implementation doesn't support all Suricata keywords, and PCRE handling is limited). To enable and configure rule matching, see Suricata HTTP Rule Matching.

The prompt configuration is key in this honeypot. While you can update the prompt in the configuration file, it is crucial to maintain the segment directing the LLM to produce responses in the specified JSON format.

Note: Galah was developed as a fun weekend project to explore the capabilities of LLMs in crafting HTTP messages. The honeypot may be identifiable through various methods such as network fingerprinting techniques, prolonged response times depending on the LLM provider and model, and non-standard responses. To protect against Denial of Wallet attacks, be sure to set usage limits on your LLM API.

Getting Started

Local Deployment

  • Ensure you have Go version 1.22+ installed.
  • Depending on your LLM provider, create an API key (e.g., from here for OpenAI and here for GoogleAI Studio) or set up authentication credentials (e.g., Application Default Credentials for GCP's Vertex AI).
  • If you want to serve HTTPS ports, generate TLS certificates.
  • Clone the repo and install the dependencies.
  • Update the config.yaml file if needed.
  • Build and run the Go binary!
…

Run in Docker

  • Ensure you have Docker CE or EE installed locally.
  • Clone the repo and build the docker image.
  • You can mount a local directory to the container to store the logs.
  • Run the docker container.
bash
% git clone [email protected]:0x4D31/galah.git
% cd galah
% mkdir logs
% export LLM_API_KEY=your-api-key
% docker build -t galah-image .
% docker run -d --name galah-container -p 8080:8080 -v $(pwd)/logs:/galah/logs -e LLM_API_KEY galah-image -o logs/galah.json -p openai -m gpt-3.5-turbo-1106

Example Usage

bash
./galah -p openai -m gpt-4.1-mini --suricata-enabled --suricata-rules-dir rules

Test:

…

JSON event log:

…

See more examples here.

Library Usage

The galah package can be used as a standalone library. Create a galah.Service and call GenerateHTTPResponse with an http.Request to produce a response. If ConfigFile, EventLogFile, or CacheDBFile are omitted, their default paths (config/config.yaml, event_log.json, and cache.db) are used. Specify RulesConfigFile to enable rule checking; leaving it empty disables the rule engine entirely. Options.Logger can be supplied with a *log.Logger; if nil, Galah creates a default text logger.

…

You can also build a service from an already loaded configuration:

go
cfg, _ := config.LoadConfig("config.yaml")
rulesCfg, _ := config.LoadRules("rules.yaml")
svc, err := galah.NewServiceFromConfig(context.Background(), cfg, rulesCfg.Rules, galah.Options{
    LLMProvider: "openai",
    LLMModel:    "gpt-4.1-mini",
    LLMAPIKey:   "YOUR_KEY",
    EventLogFile: "event_log.json", // use default if empty
    CacheDBFile:  "cache.db",       // use default if empty
    Logger:       log.NewWithOptions(os.Stderr, log.Options{}),
})

To turn off rule checking completely, omit RulesConfigFile when creating a service or pass nil/an empty slice to NewServiceFromConfig. Any unused option fields can be left empty to rely on their defaults.

The service also exposes helper methods for cache and event logging when used as a library:

go
respBytes, _ := svc.CheckCache(req, "8080") // returns nil if no cached entry

svc.LogEvent(req, llm.JSONResponse{Headers: map[string]string{"Content-Type": "text/plain"}, Body: "hi"}, "8080", "llm", nil)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gogolanghoneypotllmopenai

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.