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.
config.yaml file if needed.…% 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./galah -p openai -m gpt-4.1-mini --suricata-enabled --suricata-rules-dir rulesTest:
…JSON event log:
…See more examples here.
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:
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:
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)No open issues yet, or sync has not completed.