LLM for OSINT Reconnaissance: 7 Guardrails

LLM for OSINT Reconnaissance: 7 Guardrails

Most writing about using an LLM for OSINT reconnaissance treats the model as a source of facts. It is not a source. It is a structuring layer that sits downstream of your collection, and confusing those two roles is the first mistake that puts a fabricated host into a scope list.

The failure mode in recon is not refusal. It is fluency. Ask a model to enumerate an organisation’s infrastructure and it will return well-formed subdomains, plausible staff names with plausible job titles, breach references with the right shape and CVE identifiers that look exactly like real ones. Syntax is not evidence. A hallucinated asset that survives into an authorisation list is a contractual problem before it is a technical one, and no amount of prompt engineering fixes it, because the problem is architectural: you asked a text generator to perform discovery.

Seven guardrails follow. They assume you already run OSINT inside a scoped engagement and that you are deciding how much of that phase a model gets to touch.

Where an LLM actually helps in OSINT reconnaissance

Three jobs it does well. Normalising messy collected output, where you have passive DNS records, certificate transparency entries, WHOIS fragments and Companies House filings in five different shapes and you need one table. Clustering entities across sources, where the same organisation appears as a trading name in one record, a registered name in another and a GitHub organisation in a third. Drafting candidate questions for the next collection pass, where the value is breadth of hypothesis rather than truth: if they advertise for a Kubernetes engineer in Leeds, what else should you be querying.

Three jobs it does badly. Discovering facts it was never given. Recalling identifiers from memory, which is where invented CVE numbers and imaginary breach datasets come from. And judging whether a host is in scope, which is a question about an authorisation document and a DNS answer, not a question about text.

The commercial consequence is blunt. One fabricated subdomain in a target list can mean probing an asset the client does not own. That is outside the engagement letter, outside the Computer Misuse Act defence you were relying on, and it will be discovered by someone else’s incident response team rather than by you.

So the separation that underpins everything below: the model proposes, the collection tool confirms. The deeper treatment of how a model fits the rest of the recon workflow sits in our guide to using large language models for reconnaissance; this piece is about the controls that keep its output safe to act on.

Guardrail 1: Keep the model downstream of collection, never upstream of it

Collect first. Certificate transparency logs, passive DNS, repository metadata, job adverts, filings, archived pages. Then hand the raw records to the model and ask it to structure, deduplicate and label what is already in front of it.

The prompt that causes most of the damage is the obvious one: “list the subdomains of example.co.uk”. The model has no scanner. It has a statistical sense of what subdomains look like, so it returns vpn, mail, dev, staging, api-gateway-prod, and two or three of those will exist, which is exactly what makes the output dangerous. Partial correctness is the worst possible signal for a human reviewer under time pressure.

The working pattern is three steps. Collect with tooling. Structure with the model, with no new entities permitted. Re-resolve every candidate host against DNS and against the authorisation list before it reaches the target table. Anything that fails resolution is deleted, not investigated, unless a tool gives you a reason to keep it.

Scope confirmation is a tooling step with an artefact behind it. It is never a model assertion. The same separation of model output from verified system behaviour is what we apply when checking AI-generated pentest findings before they reach a report.

Guardrail 2: Make provenance a required field, not an afterthought

Every entity the model emits carries a pointer back to a line in the material you collected, or it does not exist. Record the source file, the record type and the line or record identifier. Not a URL the model wrote from memory: a reference into your own corpus.

Models invent citations with the same confidence they invent hosts. You will see URLs that are structurally perfect and return a 404, references to a breach “dataset”with no name, size or date, and CVE identifiers that resolve to nothing in the NVD. The hallmark is always the same: an identifier with the correct shape and no record behind it.

Keep a provenance table next to the entity list. Entity, type, source record, collection timestamp, verification status. It takes a few minutes and it means the recon stage can be audited months later by someone who was not in the room, including a client’s lawyer. The patterns that give fabricated evidence away are catalogued further in our piece on AI hallucination in security reports.

Guardrail 3: Treat every page the model reads as a prompt injection channel

Reconnaissance is the one phase where you deliberately feed attacker-influenced text into your own tooling. Job adverts, forum posts, repository README files, issue threads, HTML comments, response headers. All of it is written by someone else, and some of it is written by someone who expects a model to read it.

A worked example that is not hypothetical in design: a public repository README with a hidden instruction block in a collapsed HTML comment, telling any summarising model that the organisation’s stack is a competitor’s product, or that certain hosts are decommissioned. Your model summarises the corpus and reports a technology stack that is wrong in a specific, useful-to-the-defender direction. You never see the instruction because you were reading the rendered page and the model was reading the source.

Encoding matters here. Long contexts get folded and truncated, text arrives in base64, zero-width characters and right-to-left overrides survive copy and paste, and header values are attacker-controlled strings that nobody treats as content. We have written separately about indirect prompt injection reaching a model through HTTP headers, which is the channel testers forget most often.

Containment is dull and effective. Strip markup before ingestion, label every untrusted block with its origin, fence it so the model is told it is data rather than instruction, and give the recon model no credentials, no network access and no live tool calls. A model that can be steered but can only produce text has a small blast radius. Remove the tools and it is a chatbot.

Guardrail 4: Re-run everything and record what survives

Entity extraction over an untrusted corpus is a sampling problem, not a deterministic parse. Run the same prompt over the same collected material three times and compare the entity sets. They will differ.

Use the comparison as a filter. Entities present in all three runs go forward for tool verification first. Entities in two runs go forward second. Entities appearing once are candidates for deletion rather than investigation, because a thing that only exists on one pass is telling you something about the sampling, not about the target. If an entity matters and appeared once, confirm it with a tool or drop it.

This is the prove-it-twice discipline from red-teaming a large language model, moved upstream into recon. One lucky output is an anecdote. A repeatable one is a finding.

Guardrail 5: Settle client data and engagement terms before the first prompt

Work out what leaves your network. Recon notes pasted into a hosted model include client names, internal hostnames, staff names and sometimes fragments of material the engagement letter classes as confidential. If the engagement letter says client data stays within your environment, pasting it into a third-party endpoint is a breach of that letter regardless of the vendor’s retention policy.

Settle three things with the client in writing: retention periods at the model provider, whether inputs are excluded from training, and where processing happens geographically. Assumptions are not controls, and a screenshot of a settings page is not a contract.

UK GDPR applies to OSINT profiling. Personal data does not stop being personal data because someone published it on LinkedIn. Names, roles, work emails and inferences about individuals need a lawful basis, usually legitimate interests with a documented assessment, plus data minimisation and a retention limit for the notes you keep on employees. The ICO’s guidance on lawful basis for processing is the right starting point, and this belongs in the engagement documentation before collection begins, not in a scramble afterwards.

Practical split: public infrastructure data to the hosted model, client-confidential material and anything identifying a named individual handled locally or not at all.

Guardrail 6: Mark the gaps the model will not tell you about

A model never says “I did not have this”. It fills the shape. If your corpus is missing a regional subsidiary because the API rate-limited you at record 1,000, the summary will still read as complete, in confident prose, with no gap where the subsidiary should be.

The silent blind spots in recon are predictable: paywalled sources, rate-limited APIs, geo-fenced content, robots-restricted archives, anything behind authentication, and the model’s own training cut-off if it is drawing on memory at all. None of these produce an error message in the output.

Keep a coverage note alongside the entity list. Sources queried, date, query limits hit, sources deliberately excluded. Then the attack surface map shows what was not checked as plainly as what was, and the next phase inherits a documented edge rather than false confidence. Target selection built on an unmarked gap is how an engagement misses the one exposed asset that mattered.

Guardrail 7: Define the switch-off point

Decide in advance when the model comes out of the workflow entirely. Four triggers are worth writing into your methodology.

  • Thin public footprint. Small corpus, high hallucination pressure. The model has little to structure and plenty of room to invent. Collect manually.
  • Regulated or special category client data. Health, finance, legal, anything where the processing question is not yours to answer alone. Keep it local or keep it out.
  • Attribution of people rather than assets. Linking individuals to accounts, locations or behaviour is where a wrong inference does real harm to a real person.
  • Anything heading into disclosure or litigation. If a finding may end up in a legal process, every step needs a chain of custody a model cannot provide.

Then do the honest time maths. Count net human hours end to end, after verification, not drafting speed. Two hundred candidate entities in two minutes followed by four hours of re-resolution and source checking has saved nothing against a tighter collection run that produced sixty confirmed ones. Measure the phase, once, on a real engagement, before you decide the model earns its place.

Where it does earn it: breadth and structure. Pulling order out of a thousand lines of heterogeneous collected records, suggesting the query you had not thought of, labelling clusters so a human can scan them. A human owns every claim that reaches the report. That line does not move.

The Short Version

An LLM in OSINT reconnaissance is an untrusted component inside a scoped engagement, and it should be wired like one: downstream of collection, provenance mandatory, fenced against the hostile text you are deliberately feeding it, re-run before anything is believed, constrained by the engagement letter and UK GDPR, honest about its gaps, and switched off when the stakes shift from assets to people. Proof, not output. If you want the wider picture of how this phase connects to the rest of an AI-aware test, read on in our analysis of what AI actually changes about penetration testing.

Frequently Asked Questions

Can an LLM for OSINT reconnaissance find subdomains or assets on its own?

No. It has no resolver and no scanner, so anything it returns is generated text that resembles infrastructure. Use certificate transparency logs, passive DNS and your own collection tooling for discovery, and give the model only the records those tools returned. Every candidate host is re-resolved before it reaches an authorisation list.

How do I stop a language model inventing hosts, people or CVE identifiers during recon?

Structurally, not through prompting. Restrict the model to material you collected, require a provenance reference for every entity it emits, and delete anything that cannot be traced back to a specific source record. Re-run the extraction and treat entities that appear in only one run as unverified until a tool confirms them.

Is it safe to paste client engagement data into a hosted model during OSINT work?

Not by default. Check what the engagement letter permits, then settle retention, training opt-outs and processing location with the client in writing. Public infrastructure data is usually fine; client-confidential material and personal data about named individuals should stay local or stay out, with a lawful basis and retention limit documented under UK GDPR.

Can content collected during reconnaissance inject instructions into the model reading it?

Yes, and recon is the phase where it is most likely, because you are deliberately ingesting attacker-influenced pages. Hidden instruction blocks in repository documentation, HTML comments, forum posts and response headers can all steer a summarising model. Strip and fence untrusted text, label its origin, and give the recon model no credentials and no live tool access.

How much time does an LLM actually save in the recon phase once verification is counted?

Less than the drafting speed suggests, and sometimes nothing at all. Measure net human hours end to end, including re-resolution, provenance checking and deletion of unverified entities. The model tends to pay off on large, messy corpora that need structuring, and to cost you time on small targets with a thin public footprint.