offsecnotes

Web LLM

by frankheat

LLMs are AI algorithms that generate plausible responses by predicting word sequences from user inputs.


Methodology

  1. Identify the LLM’s inputs, including direct (e.g., a prompt) and indirect (e.g., training data).
  2. Determine the data and APIs accessible to the LLM
  3. Examine this attack surface for vulnerabilities.

Mapping LLM API attack surface


Chaining vulnerabilities in LLM APIs

The idea is to map the APIs and then send classic web exploits to all identified APIs.


Insecure output handling

A web app uses an LLM to generate content from user prompts without sanitization. You could submit a crafted prompt causing the LLM to return unsanitized JavaScript, leading to XSS/CSRF etc.