Efficient Universal Goal Hijacking with Semantics-guided Prompt Organization

Universal goal hijacking is a kind of prompt injection attack that forces LLMs to return a target malicious response for arbitrary normal user prompts. The previous methods achieve high attack performance while being too cumbersome and time-consuming. Also, they have concentrated solely on optimization algorithms, overlooking the crucial role of the prompt. To this end, we propose a method called POUGH that incorporates an efficient optimization algorithm and two semantics-guided prompt organization strategies. Specifically, our method starts with a sampling strategy to select representative prompts from a candidate pool, followed by a ranking strategy that prioritizes them. Given the sequentially ranked prompts, our method employs an iterative optimization algorithm to generate a fixed suffix that can concatenate to arbitrary user prompts for universal goal hijacking. Experiments conducted on four popular LLMs and ten types of target responses verified the effectiveness.
View on arXiv@article{huang2025_2405.14189, title={ Efficient Universal Goal Hijacking with Semantics-guided Prompt Organization }, author={ Yihao Huang and Chong Wang and Xiaojun Jia and Qing Guo and Felix Juefei-Xu and Jian Zhang and Geguang Pu and Yang Liu }, journal={arXiv preprint arXiv:2405.14189}, year={ 2025 } }