Enhancing API Security Testing Against BOLA and Authentication Vulnerabilities Through an LLM-Enhanced Framework
摘要
This study explores the enhancement of API security testing against Broken Object Level Authorization (BOLA) and Authentication vulnerabilities through the integration of an LLM (Large Language Model)-enhanced framework. By incorporating the OpenHermes 2.5 Mistral 7B model, fine-tuned for domain-specific vulnerabilities, into the Karate testing framework, we demonstrate a novel approach to generating comprehensive and accurate test scenarios. Our methodology emphasizes prompt refinement, dynamic data handling, and endpoint context recognition to address the complexities of API security testing. A case study utilizing the VAmPI API Specification reveals significant improvements in test case generation and complexity, highlighting the potential of fine-tuned LLMs in identifying and mitigating API vulnerabilities. While promising, our exploration uncovers challenges in dataset development, token allocation, and mock data reliance, suggesting areas for future research, including the adoption of Retrieval Augmented Generation (RAG) and Retrieval Aware Fine-Tuning (RAFT) methods. Our findings underscore the transformative impact of LLMs on API security testing, paving the way for more robust and efficient testing frameworks.