Skip to content
Pedro Mora
Go back

HTB Preignition — Finding the Door They Forgot

Part of the OSAI Prep series → — HTB writeups mapped to OWASP LLM Top 10.

Machine Summary

FieldValue
PlatformHackTheBox
DifficultyVery Easy
OSLinux
VulnerabilityDefault admin credentials on an enumerable admin panel
OWASP MappingA07 — Identification and Authentication Failures

Reconnaissance

nmap -sC -sV -oN nmap.txt 10.129.21.71

Single open service: HTTP on port 80, running nginx 1.14.2. No SSH, no FTP, no unusual ports — the entire attack surface is the web server. With nothing useful on the visible homepage, we move to directory enumeration:

gobuster dir -u http://10.129.21.71 -w /usr/share/wordlists/dirbuster/directory-list-1.0.txt -x .php

nmap scan showing only port 80 open running nginx 1.14.2

GoBuster finds admin.php — a PHP admin panel not linked from anywhere on the visible site. Without enumeration, this stays invisible.

GoBuster output discovering admin.php

Entry

We navigate to admin.php and find a login page. Before trying anything sophisticated, we test the obvious: admin / admin.

admin.php login page

It works.

Successful login with admin/admin credentials, flag visible in the admin console

The admin console grants immediate access and the flag is retrieved.

Privilege Escalation

Not required. The default credential login gave us direct access to the admin console.

Root Cause

Two failures combined:

1. The admin panel was publicly accessible. admin.php sat in the public web root with no IP restriction, no authentication gateway, and no rate limiting. Directory enumeration found it in seconds.

2. Default credentials were never changed. The application shipped with admin/admin and the operator never rotated them.

Neither failure alone is fatal — a locked-down panel with default creds is annoying but unreachable; an accessible panel with strong credentials requires real effort. Together, they hand over the keys.

The AI Equivalent

OWASP LLM Top 10 Mapping: LLM07 — Insecure Plugin Design

The Preignition attack pattern — enumerate to find a management interface, authenticate with the default key — maps directly to how AI agent tool endpoints get compromised in practice. LangServe, Ollama’s management API, LlamaIndex server deployments, and open-source agent frameworks routinely expose admin or inference endpoints on default ports with no authentication, or with a default API key published in the project’s own README.

Finding them requires the same move as GoBuster: a port scan of a cloud-hosted IP, a /.well-known/ probe, or a simple GET /admin request. Getting in requires the same move as admin/admin: try the default key from the docs, or no key at all.

The plugin was deployed with a powerful management interface the operator never locked down. In the web app world, that’s an exposed admin.php with default creds. In the agentic world, that’s an exposed /v1/chat/completions endpoint with a default API token — or no token at all — that lets any caller send arbitrary instructions to the model, modify its system prompt, or extract its configuration. The attacker doesn’t need to break anything. They just need to find the door and try the key that was never changed.

Lessons Learned


Share this post on:

Previous Post
HTB Appointment — SQL Injection Skips the Lock
Next Post
HTB Dancing — When the File Share Has No Lock