Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Pasquini, Dario, Strohmeier, Martin, Troncoso, Carmela
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914780181168128
author Pasquini, Dario
Strohmeier, Martin
Troncoso, Carmela
author_facet Pasquini, Dario
Strohmeier, Martin
Troncoso, Carmela
contents We introduce a new family of prompt injection attacks, termed Neural Exec. Unlike known attacks that rely on handcrafted strings (e.g., "Ignore previous instructions and..."), we show that it is possible to conceptualize the creation of execution triggers as a differentiable search problem and use learning-based methods to autonomously generate them. Our results demonstrate that a motivated adversary can forge triggers that are not only drastically more effective than current handcrafted ones but also exhibit inherent flexibility in shape, properties, and functionality. In this direction, we show that an attacker can design and generate Neural Execs capable of persisting through multi-stage preprocessing pipelines, such as in the case of Retrieval-Augmented Generation (RAG)-based applications. More critically, our findings show that attackers can produce triggers that deviate markedly in form and shape from any known attack, sidestepping existing blacklist-based detection and sanitation approaches.
format Preprint
id arxiv_https___arxiv_org_abs_2403_03792
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks
Pasquini, Dario
Strohmeier, Martin
Troncoso, Carmela
Cryptography and Security
Machine Learning
We introduce a new family of prompt injection attacks, termed Neural Exec. Unlike known attacks that rely on handcrafted strings (e.g., "Ignore previous instructions and..."), we show that it is possible to conceptualize the creation of execution triggers as a differentiable search problem and use learning-based methods to autonomously generate them. Our results demonstrate that a motivated adversary can forge triggers that are not only drastically more effective than current handcrafted ones but also exhibit inherent flexibility in shape, properties, and functionality. In this direction, we show that an attacker can design and generate Neural Execs capable of persisting through multi-stage preprocessing pipelines, such as in the case of Retrieval-Augmented Generation (RAG)-based applications. More critically, our findings show that attackers can produce triggers that deviate markedly in form and shape from any known attack, sidestepping existing blacklist-based detection and sanitation approaches.
title Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks
topic Cryptography and Security
Machine Learning
url https://arxiv.org/abs/2403.03792