Skip to content

llama.cpp

Quick Reference

Category: InferenceEngine  |  OS: Windows, Linux, macOS  |  Privileges: user  |  Free: Yes

llama.cpp is the foundational open-source C/C++ inference engine for GGUF-format LLM models. It compiles to a small set of standalone binaries (llama-cli, llama-server, llama-quantize) with no runtime dependencies. llama-server exposes an OpenAI-compatible REST API on port 8080. Because it is a compiled binary with no installer or package manager, it has a minimal footprint and can be dropped in any writable directory. Most other local inference engines (Ollama, koboldcpp, LM Studio) embed or wrap llama.cpp internally.


Details

Field Value
Website https://github.com/ggerganov/llama.cpp
License MIT

Capabilities: LocalInference, APIServer, GPUAcceleration


Disk Artifacts

Path OS Type Phase Trust Description
llama-cli Linux Binary Install — Interactive CLI for single-turn and chat inference (no standard install path — runs from any directory)
llama-server Linux Binary Install — OpenAI-compatible HTTP inference server binary
llama-cli.exe Windows Binary Install — Interactive CLI binary (Windows)
llama-server.exe Windows Binary Install — OpenAI-compatible HTTP server binary (Windows)
llama-quantize Linux Binary Install — Model quantization utility — converts models to GGUF format

Model Storage

*.gguf (Any) — GGUF model files loaded at runtime via --model flag (no fixed path — user-specified) (Install)

Format Magic Bytes (hex) Offset
GGUF 47 47 55 46 0

Process Artifacts

llama-server (Use)

HTTP inference server process — spawned to serve the OpenAI-compatible API

Expected parent: bash

CLI Pattern Phase Trust Description
llama-server.*--model\s+\S+\.gguf Use — Server loading a GGUF model file
llama-server.*--port\s+\d+ Use — Server bound to a non-default port (default 8080)
llama-server.*--host\s+0\.0\.0\.0 Abuse — Server exposed on all interfaces — lateral movement risk

llama-cli (Use)

Interactive or scripted inference CLI

Expected parent: bash

CLI Pattern Phase Trust Description
llama-cli.*--model\s+\S+\.gguf Use — CLI loading a GGUF model
llama-cli.*-p\s+ Use — Single-prompt non-interactive execution (scripting/automation)

Network Artifacts

Description Protocol Ports Bind Address Domains Phase Trust
llama-server OpenAI-compatible REST API (default port) TCP 8080 127.0.0.1 — Use —

Persistence Mechanisms

OS Type Path Phase Trust Description
Linux Service /etc/systemd/system/llama-server.service Activation — User-created systemd unit to persist llama-server as a background service

Windows Event Log

Event ID Provider Log File Phase Trust Description
4688 Microsoft-Security-Auditing Security.evtx Use — Process creation for llama-server.exe or llama-cli.exe

Detection Rules

YARA

  • detections/yara/gguf_magic_bytes.yar (Install; trust: —) — Matches GGUF model files loaded by llama.cpp

References

  • https://github.com/ggerganov/llama.cpp

  • https://github.com/ggerganov/ggml/blob/master/docs/gguf.md