Proceedings

LPDetective: Dusting the LLM Chats for Prompt Template Abusers

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 7616-7624.

https://doi.org/10.24963/ijcai.2025/847

Abstract

The abuse of LLM Chatbot interfaces by web robots leads to a significant waste of GPU and server resources, posing a serious security challenge. To address this issue, we propose LPDetective, an unsupervised method for detecting robot prompt templates. This method is based on the assumption that robot-generated text repeatedly uses the same or highly similar phrases and sentence structures across multiple sessions, differing from human natural conversations. We design a multi-stage workflow, including message grouping, text similarity measurement, hierarchical clustering analysis, and regular expression extraction, to automatically extract potential robot behavior patterns from chat logs. LPDetective does not require predefined templates or rely on training data, enabling it to adaptively discover new, unknown patterns. We conduct systematic experiments on three large-scale real-world datasets: Bing Copilot, Wildchat, and ChatLog. The results show that LPDetective can efficiently and accurately detect robot prompt templates in various scenarios, achieving a 7.5% improvement in F1 score compared to the state-of-the-art XLNet method and reducing detection latency by 178 times on the Bing Copilot dataset.

  1. [Agomuoh, 2022] F. Agomuoh. Your siri conversa- tions may have been recorded without your per- mission. https://www.digitaltrends.com/computing/ developer-finds-apple-bluetooth-security-flaw-worth-7000/, 2022. Link
  2. [Ayanouz et al., 2020] Soufyane Ayanouz, Boudhir Anouar Abdelhakim, and Mohammed Benhmed. A smart chatbot architecture based nlp and machine learning for health care assistance. In Proceedings of the 3rd international confer- ence on networking, information systems & security, pages 1-6, 2020.
  3. [Baki et al., 2017] Shahryar Baki, Rakesh Verma, Arjun Mukherjee, and Omprakash Gnawali. Scaling and effec- tiveness of email masquerade attacks: Exploiting natural language generation. In Proceedings of the 2017 ACM on Asia conference on computer and communications secu- rity, pages 469-482, 2017.
  4. [Cavnar et al., 1994] William B Cavnar, John M Trenkle, et al. N-gram-based text categorization. In Proceedings of SDAIR-94, 3rd annual symposium on document anal- ysis and information retrieval, volume 161175, page 14. Las Vegas, NV, 1994.
  5. [Chung et al., 2017] Hyunji Chung, Michaela Iorga, Jeffrey Voas, and Sangjin Lee. Alexa, can i trust you? Computer, 50(9):100-104, 2017.
  6. [CNBC, 2023] CNBC. Openai says chatgpt downtime caused by targeted attack, 2023.
  7. [Coles, 2023] C Coles. 11% of data employees paste into chatgpt is confidential. Cyberhaven. Accessed: May, 1, 2023.
  8. [Defays, 1977] Daniel Defays. An efficient algorithm for a complete link method. The computer journal, 20(4):364- 366, 1977.
  9. [Economist, 2023] T. Economist. Concerns turned into re- ality... as soon as samsung electronics unlocks chatgpt, 'misuse' continues. https://economist.co.kr/article/view/ ecn202303300057?s=31, 2023. Link
  10. [Fleiss, 1971] Joseph L Fleiss. Measuring nominal scale agreement among many raters. Psychological bulletin, 76(5):378, 1971.
  11. [Følstad and Skjuve, 2019] Asbjørn Følstad and Marita Skjuve. Chatbots for customer service: user experience and motivation. In Proceedings of the 1st international conference on conversational user interfaces, pages 1-9, 2019.
  12. [Frieder et al., 2023] S. Frieder, L. Pinchetti, R.-R. Griffiths, T. Salvatori, T. Lukasiewicz, P. C. Petersen, A. Chevalier, and J. Berner. Mathematical capabilities of chatgpt. arXiv preprint arXiv:2301.13867, 2023.
  13. [Giaretta and Dragoni, 2020] Alberto Giaretta and Nicola Dragoni. Community targeted phishing: A middle ground between massive and spear phishing through natural lan- guage generation. In Proceedings of 6th International Conference in Software Engineering for Defence Applica- tions: SEDA 2018 6, pages 86-93. Springer, 2020.
  14. [Gondaliya et al., 2020] Krishna Gondaliya, Sergey Bu- takov, and Pavol Zavarsky. Sla as a mechanism to man- age risks related to chatbot services. In 2020 IEEE 6th Intl Conference on Big Data Security on Cloud (BigDataSe- curity), IEEE Intl Conference on High Performance and Smart Computing,(HPSC) and IEEE Intl Conference on Intelligent Data and Security (IDS), pages 235-240. IEEE, 2020.
  15. [Gupta et al., 2020] Aishwarya Gupta, Divya Hathwar, and Anupama Vijayakumar. Introduction to ai chatbots. In- ternational Journal of Engineering Research and Technol- ogy, 9(7):255-258, 2020.
  16. [Hochreiter, 1997] S Hochreiter. Long short-term memory. Neural Computation MIT-Press, 1997.
  17. [Hurler, 2023] K. Hurler. Amazon warns employ- ees to beware of chatgpt. https://gizmodo.com/ amazon-chatgpt-ai-software-job-coding-1850034383, 2023. Link
  18. [Hussain et al., 2019] Shafquat Hussain, Omid Ameri Sianaki, and Nedal Ababneh. A survey on conversational agents/chatbots classification and design techniques. In Web, Artificial Intelligence and Network Applications: Proceedings of the Workshops of the 33rd International Conference on Advanced Information Networking and Applications (WAINA-2019) 33, pages 946-956. Springer, 2019.
  19. [Joulin et al., 2016] Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. Bag of tricks for effi- cient text classification. arXiv preprint arXiv:1607.01759, 2016.
  20. [Karanjai, 2022] R. Karanjai. Targeted phishing campaigns using large scale language models. arXiv preprint arXiv:2301.00665, 2022.
  21. [Kim, 2014] Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Con- ference on Empirical Methods in Natural Language Pro- cessing (EMNLP), pages 1746-1751, 2014.
  22. [Lei et al., 2017] X. Lei, G.-H. Tu, A. X. Liu, K. Ali, C.- Y. Li, and T. Xie. The insecurity of home digital voice assistants-amazon alexa as a case study. arXiv preprint arXiv:1712.03327, 2017.
  23. [Levenshtein, 1966] VI Levenshtein. Binary codes capable of correcting deletions, insertions, and reversals. Proceed- ings of the Soviet physics doklady, 1966.
  24. [McGee, 2023] Robert W McGee. What will the united states look like in 2050? a chatgpt short story. A Chat- gpt Short Story (April 8, 2023), 2023.
  25. [Mijwil and Aljanabi, 2023] M. Mijwil and M. Aljanabi. Towards artificial intelligence-based cybersecurity: The practices and chatgpt generated ways to combat cyber- crime. Iraqi Journal For Computer Science and Mathe- matics, 4:65-70, 2023.
  26. [Mulgrew, 2023] Aaron Mulgrew. I built a zero day virus with undetectable exfiltration using only chatgpt prompts. Forcepoint. Retrieved May, 17:2023, 2023. [
  27. [OpenAI, 2023] OpenAI. Gpt-4 technical report. https: //arxiv.org/abs/2303.08774, 2023. Link
  28. [Ouyang et al., 2022] L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, and A. Ray. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pages 27730-27744, 2022.
  29. [OWASP, 2023] OWASP. OWASP top 10 for LLM, 2023.
  30. [Paliwal et al., 2020] Shweta Paliwal, Vishal Bharti, and Amit Kumar Mishra. Ai chatbots: Transforming the digi- tal world. Recent trends and advances in artificial intelli- gence and internet of things, pages 455-482, 2020.
  31. [Point, 2023] Check Point. Opwnai: Cybercriminals start- ing to use chatgpt. Check Point. Retrieved May, 15:2023, 2023.
  32. [Prakken, 2020] H. Prakken. A persuasive chatbot using a crowd-sourced argument graph and concerns. Computa- tional Models of Argument, 326:9, 2020.
  33. [Qian et al., 2023] C. Qian, H. Qi, G. Wang, L. Kunc, and S. Potdar. Distinguish sense from nonsense: Out-of- scope detection for virtual assistants. arXiv preprint arXiv:2301.06544, 2023.
  34. [Rousseeuw, 1987] Peter J Rousseeuw. Silhouettes: a graph- ical aid to the interpretation and validation of cluster anal- ysis. Journal of computational and applied mathematics, 20:53-65, 1987.
  35. [Sadowski and Levin, 2007] Caitlin Sadowski and Greg Levin. Simhash: Hash-based similarity detection. In Tech- nical report, Google, 2007.
  36. P. Security. Cortana security flaw means your pc may be compromised. https://www.pandasecurity. com/mediacenter/mobile-news/cortana-security-flaw/, 2018. Link
  37. [Shu et al., 2020] Kai Shu, Suhang Wang, Dongwon Lee, and Huan Liu. Mining disinformation and fake news: Con- cepts, methods, and recent advancements. Disinformation, misinformation, and fake news in social media: Emerging research challenges and opportunities, pages 1-19, 2020.
  38. [Stiff and Johansson, 2022] Harald Stiff and Fredrik Jo- hansson. Detecting computer-generated disinformation. International Journal of Data Science and Analytics, 13(4):363-383, 2022.
  39. [Tu et al., 2023] Shangqing Tu, Chunyang Li, Jifan Yu, Xi- aozhi Wang, Lei Hou, and Juanzi Li. Chatlog: Record- ing and analyzing chatgpt across time. arXiv preprint arXiv:2304.14106, 2023.
  40. [Van Dis et al., 2023] Eva AM Van Dis, Johan Bollen, Willem Zuidema, Robert Van Rooij, and Claudi L Bock- ting. Chatgpt: five priorities for research. Nature, 614(7947):224-226, 2023.
  41. [VARINDIA, 2022] VARINDIA. Chatgpt produces ma- licious emails and code. https://varindia.com/news/ chatgpt-produces-malicious-emails-and-code, 2022. Link
  42. [Wang, 2018] Baoxin Wang. Disconnected recurrent neural networks for text categorization. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (ACL 2018), pages 2311-2320, 2018.
  43. [Wikipedia, 2022] Wikipedia. Chatgpt. https://en.wikipedia. org/wiki/ChatGPT, 2022. Link
  44. [Wollny et al., 2021] Sebastian Wollny, Jan Schneider, Daniele Di Mitri, Joshua Weidlich, Marc Rittberger, and Hendrik Drachsler. Are we there yet?-a systematic literature review on chatbots in education. Frontiers in artificial intelligence, 4:654924, 2021.
  45. [Xu et al., 2021] Jing Xu, Da Ju, Margaret Li, Y-Lan Boureau, Jason Weston, and Emily Dinan. Bot-adversarial dialogue for safe conversational agents. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2950-2968, 2021.
  46. [Yang et al., 2019] Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. Xlnet: generalized autoregressive pretraining for language understanding. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, 2019.
  47. [Zellers et al., 2019] R. Zellers, A. Holtzman, H. Rashkin, Y. Bisk, A. Farhadi, F. Roesner, and Y. Choi. Defending against neural fake news. In Advances in neural informa- tion processing systems, volume 32, 2019.
  48. [Zhao et al., 2024] Wenting Zhao, Xiang Ren, Jack Hessel, Claire Cardie, Yejin Choi, and Yuntian Deng. Wildchat: 1m chatgpt interaction logs in the wild. arXiv preprint arXiv:2405.01470, 2024.
  49. [Zhou et al., 2020] Jie Zhou, Chunping Ma, Dingkun Long, Guangwei Xu, Ning Ding, Haoyu Zhang, Pengjun Xie, and Gongshen Liu. Hierarchy-aware global model for hi- erarchical text classification. In Proceedings of the 58th Annual Meeting of the Association for Computational Lin- guistics (ACL 2020), pages 1106-1117, 2020.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards