Exploring The Security Risks of Using Large Language Models
Exploring The Security Risks of Using Large Language Models
Exploring the
Risks of Using
Large Language
Models
www.brightsec.com
Introduction
(LLMs) like GPT-4 have gained immense popularity. While these models hold great
and customer service to research and development—they also come with their
own set of risks and ethical concerns. In this paper, we will comprehensively
Large language models like ChatGPT are susceptible to various kinds of attacks
This is becoming more critical by the day as more and more software
development is actually done with the help of AI LLM tools such as GitHub’s Co-
of this transformative
technology.
This white paper will cover the
following topics:
Feedback
Exploration & Validation Wrangling (cleaning)
New Data From Model
Inference Monitoring & Logging
Train Test
model versioning
code code
Model Engineering
param
Model Evaluation
param
Model Packaging MODEL
Model Format
Model Serving
- pKI. ONNK fax - service, Docker, K8s
Feature Engineering
Best Model Selection
Hyperparameters Tuning Model Performance Metric ODE uild & Integration Testing Deploument Dev to Production
accurac F1
C B
precision
code versioning
The result is a highly sophisticated model capable of understanding and generating human like -
text, answering questions, translating languages, and performing various other language related -
tasks.
LLM Attack Vectors Introduction to the
OWASP Top 10
As can be seen in the diagram above,
Vulnerabilities for
there are three key vectors that can
be attacked in the overall LLM. There
LLMs
are:
The Open Web Application Security Project
Attack the LLM Model directly (OWASP), a respected authority in web
security, has compiled a critical list of the top
10 vulnerabilities frequently encountered in
Attack the infrastructure and Large Language Model (LLM) applications. This
integrations list serves as an authoritative guide, shedding
light on the severity, exploitability, and
Attack the application commonality of each vulnerability. Notable
risks such as prompt injections, data exposure,
insufficient sandboxing, and unauthorized code
execution are detailed, illustrating the array of
security challenges that LLM applications may
This curated list is more than a simple catalog face.
of vulnerabilities; it is an educational tool aimed
at a broad audience, from developers and This curated list is more than a simple catalog
designers to architects and organizational of vulnerabilities; it is an educational tool aimed
leaders. Its purpose is to enhance the collective at a broad audience, from developers and
understanding of the security vulnerabilities designers to architects and organizational
inherent in the deployment and operation of leaders. Its purpose is to enhance the collective
LLMs. By bringing these issues to the forefront, understanding of the security vulnerabilities
OWASP not only raises awareness but also inherent in the deployment and operation of
provides valuable remediation tactics and LLMs. By bringing these issues to the forefront,
strategic advice designed to fortify the security OWASP not only raises awareness but also
framework of LLM applications. provides valuable remediation tactics and
strategic advice designed to fortify the security
framework of LLM applications.
Vulnerability Description
world consequences.
There's a real danger of intellectual property minimum required for its intended purpose.
Network Segmentation:
Attack Scenarios
Isolate the LLM from sensitive internal resources to
Include: minimize the potential damage from an SSRF attack.
An attacker could craft a prompt designed to Implement real-time monitoring to quickly detect
instruct the LLM to request data from an internal and respond to unusual or unauthorized activities.
service. This can bypass established access
controls, enabling unauthorized access to system
files to which the LLM has access, potentially Least Privilege Access:
leaking sensitive information.
Limit what the LLM can do and access, both in terms
of data and actions, to minimize the impact of an
API Exploitation: attack.
emerging threats cannot be overstated. This white paper has introduced the
SSRF, these vulnerabilities are not mere glitches but profound gaps that
compromising not only the integrity of the LLMs but also the very
vigilant, ensuring that our advances are not sullied by lapses in security that