TY - GEN
T1 - To Protect the LLM Agent Against the Prompt Injection Attack with Polymorphic Prompt
AU - Wang, Zhilong
AU - Nagaraja, Neha
AU - Zhang, Lan
AU - Bahsi, Hayretdin
AU - Patil, Pawan
AU - Liu, Peng
N1 - Publisher Copyright:
© 2025 IEEE.
PY - 2025
Y1 - 2025
N2 - LLM agents are widely used as agents for customer support, content generation, and code assistance. However, they are vulnerable to prompt injection attacks, where adversarial inputs manipulate the model's behavior. Traditional defenses like input sanitization, guard models, and guardrails are either cumbersome or ineffective. In this paper, we propose a novel, lightweight defense mechanism called Polymorphic Prompt Assembling (PPA), which protects against prompt injection with near-zero overhead. The approach is based on the insight that prompt injection requires guessing and breaking the structure of the system prompt. By dynamically varying the structure of system prompts, PPA prevents attackers from predicting the prompt structure, thereby enhancing security without compromising performance. We conducted experiments to evaluate the effectiveness of PPA against existing attacks and compared it with other defense methods.
AB - LLM agents are widely used as agents for customer support, content generation, and code assistance. However, they are vulnerable to prompt injection attacks, where adversarial inputs manipulate the model's behavior. Traditional defenses like input sanitization, guard models, and guardrails are either cumbersome or ineffective. In this paper, we propose a novel, lightweight defense mechanism called Polymorphic Prompt Assembling (PPA), which protects against prompt injection with near-zero overhead. The approach is based on the insight that prompt injection requires guessing and breaking the structure of the system prompt. By dynamically varying the structure of system prompts, PPA prevents attackers from predicting the prompt structure, thereby enhancing security without compromising performance. We conducted experiments to evaluate the effectiveness of PPA against existing attacks and compared it with other defense methods.
UR - https://www.scopus.com/pages/publications/105011416473
UR - https://www.scopus.com/inward/citedby.url?scp=105011416473&partnerID=8YFLogxK
U2 - 10.1109/DSN-S65789.2025.00037
DO - 10.1109/DSN-S65789.2025.00037
M3 - Conference contribution
AN - SCOPUS:105011416473
T3 - Proceedings - 2025 55th Annual IEEE/IFIP International Conference on Dependable Systems and Networks - Supplemental Volume, DSN-S 2025
SP - 22
EP - 28
BT - Proceedings - 2025 55th Annual IEEE/IFIP International Conference on Dependable Systems and Networks - Supplemental Volume, DSN-S 2025
A2 - Cinque, Marcello
A2 - Cotroneo, Domenico
A2 - De Simone, Luigi
A2 - Eckhart, Matthias
A2 - Lee, Patrick P. C.
A2 - Zonouz, Saman
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 55th Annual IEEE/IFIP International Conference on Dependable Systems and Networks - Supplemental Volume, DSN-S 2025
Y2 - 23 June 2025 through 26 June 2025
ER -