Large Language Models (LLMs) are seeing significant adoption in every type of organization due to their exceptional generative capabilities. However, LLMs are found to be vulnerable to various adversarial attacks, particularly prompt injection attacks, which trick them into producing harmful or inappropriate content. Adversaries execute such attacks by crafting malicious prompts to deceive the LLMs. In this paper, we propose a novel approach based on embedding-based Machine Learning (ML) classifiers to protect LLM-based applications against this severe threat. We leverage three commonly used embedding models to generate embeddings of malicious and benign prompts and utilize ML classifiers to predict whether an input prompt is malicious. Out of several traditional ML methods, we achieve the best performance with classifiers built using Random Forest and XGBoost. Our classifiers outperform state-of-the-art prompt injection classifiers available in open-source implementations, which use encoder-only neural networks.
Design Patterns for Securing LLM Agents against Prompt Injections
Invariant Labs;IBM;EPFL(苏黎世联邦理工学院);ETH Zurich(苏黎世联邦理工学院);Swisscom(瑞士通信);Google(谷歌);ETH AI Center(苏黎世联邦理工学院人工智能中心);AppliedAI Institute for Europe(欧洲应用AI研究院);Microsoft(微软);Lakera
A Multi-Agent LLM Defense Pipeline Against Prompt Injection Attacks
School of Computing, Wichita State University, Kansas, USA(威斯康星州立大学计算机学院);College of Engineering and Computer Sciences, Marshall University, Huntington, WV, USA(马歇尔大学工程与计算机科学学院);Department of Computer Science and Engineering, University of Rajshahi, Bangladesh(拉贾沙希大学计算机科学与工程系);Department of Computer Science and Engineering, American International University-Bangladesh, Dhaka, Bangladesh(美国国际大学-孟加拉国计算机科学与工程系);School of Computer Science and Engineering, The University of Aizu, Aizuwakamatsu, Japan(立命馆大学计算机科学与工程学院)
The Promptware Kill Chain: How Prompt Injections Gradually Evolved Into a Multistep Malware Delivery Mechanism
Department of Software and Information Systems Engineering, Ben-Gurion University of the Negev(本·古里安大学软件与信息系统工程系);School of Electrical and Computer Engineering, Tel Aviv University(特拉维夫大学电气与计算机工程学院);Harvard Kennedy School, Harvard University, and Munk School, University of Toronto(哈佛大学哈佛肯尼迪学校及多伦多大学穆克学校)
Measuring Real-World Prompt Injection Attacks in LLM-based Resume Screening
University of North Carolina at Chapel Hill(北卡罗来纳大学教堂山分校);Duke University(杜克大学);Arizona State University(亚利桑那州立大学);hireEZ;University of California, Berkeley(加州大学伯克利分校)
When Prompts Control Robots: Prompt Injection Attacks in Multi-Agent Robotic Systems
School of Informatics, Computing, and Cyber Systems, Northern Arizona University(北亚利桑那大学信息学、计算与网络安全学院);Department of Software Science, Tallinn University of Technology(塔林理工大学软件科学系)
Soft Begging: Modular and Efficient Shielding of LLMs against Prompt Injection and Jailbreaking based on Prompt Tuning
Deutsches Forschungszentrum für Künstliche Intelligenz (DFKI)(德国人工智能研究中心);Centre for European Research in Trusted AI (CERTAIN)(欧洲可信人工智能研究中心);sequire technology GmbH(sequire技术有限公司)
What If Prompt Injection Never Left? Rethinking Agent Security through Cross-Session Stored Prompt Injection
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院);AI Sec Lab, Beijing Chaitin Technology Co.,Ltd(北京柴坦科技有限公司AI安全实验室)
UC Berkeley(加州大学伯克利分校);UC Santa Barbara(加州大学圣巴巴拉分校);Duke University(杜克大学);National University of Singapore(新加坡国立大学);King Abdulaziz City for Science and Technology(国王阿卜杜勒阿齐兹城市科学技术学院);University of Washington(华盛顿大学)