Skip to content
Book

A Virtual Lab for Learning AI Security and Adversarial Prompt Engineering

Jul 2026 · Annual Conference on Innovation and Technology in Computer Science Education · pp. 107-113 · 1 citation · 34 references
Computer Science

TL;DR

This paper presents a virtual learning environment that integrates a secure sandbox with access to multiple commercial and open-source LLMs to support experiential learning in AI security.

Abstract

Computing education increasingly focuses on teaching secure coding and developing secure web applications. Now, with the rise of generative AI, we face new challenges, particularly the potential misuse of this technology for identifying and exploiting software vulnerabilities. This paper presents a virtual learning environment that integrates a secure sandbox with access to multiple commercial and open-source LLMs to support experiential learning in AI security. The lab offers scenario-based exercises that cover web, code, and system-level vulnerabilities. Students craft adversarial prompts, test LLM-generated exploits, and analyse models behaviour using established metrics such as attack success rate (ASR), exploit generation accuracy, and refusal rate. Our expert validation revealed distinct model behaviours: GPT-4o achieved the highest ASR (77.5% in web testing), demonstrating consistent exploit generation, while Claude exhibited the highest safety refusal rate (32.56%). By engaging with these observable outcomes, students develop a critical understanding of LLM capabilities, limitations, and ethical risks. We argue that AI-integrated virtual labs are essential for preparing students to work responsibly with emerging AI-assisted security tools.

View source

Similar papers

Review

Security Vulnerabilities in AI-Generated JWT Authentication Code for Spring Boot

Investigating the security vulnerabilities present in AI-generated JWT authentication code for Java Spring Boot Representational State Transfer Application Programming Interfaces (REST API) reinforces that AI-generated JSON Web Token (JWT) authentication code requires dedicated security review.

Hoang Long Nguyen, Mezid Hmudda, Benjamin Powley · 0 citations
Jul 2026

IssueTrojanBench: Benchmarking AI Coding Agents Against Malicious Issue Requests

A systematic evaluation of malicious issue requests against state-of-the-art coding agents powered by two major model families reveals critical vulnerabilities in the as-deployed modern coding agents, highlighting the urgent need for stronger agent- and model-level safety mechanisms to protect AI coding agents.

Ankur Singh, Jinqiu Yang, T. Chen · 2 citations
Jul 2026

The Illusion of Secure LLM Code: Closing the Security Gap via Iterative Reprompting

It is proved that current AI coding assistants do not produce secure-by-default applications, dictating that enterprise deployments must transition from single-shot prompt engineering to continuous, standards-driven verification pipelines.

Ishpuneet Singh, Shreyas Mahajan, Gurjot Singh et al. · 0 citations
Book Open access Jul 2026

BREAK-IT: Understanding Novice Approaches to an Attack Challenge Task

This paper examines how undergraduates conceptualize and identify security threats by analyzing how they attempt to find ''attacks'' in other students' code, and offers recommendations for CS instructors and curriculum committees on integrating foundational security concepts into programming assignments to help student...

Michelle Jensen, Matthew Berland, Rahul Chatterjee · 0 citations
Conference Jul 2026

VectorSec: A Web-Based AI Security Scanner for Systematic Evaluation of LLM Vulnerabilities

The increasing deployment of Large Language Models (LLMs) in critical infrastructure has introduced a class of security risks that remain insufficiently characterised and poorly tooled in practice. Attack vectors including prompt injection, jailbreaking, code execution facilitation, covert data exfiltration, and traini...

M. Yamin · 0 citations
Conference Jul 2026

Is AI-Generated Web Code Vulnerability-Free?

With the increasing usage of AI-generated code in software development workflows, new security challenges and concerns arise. This paper analyzes five LLMs: ChatGPT, Claude, Gemini, DeepSeek, and Grok in three phases of security assessments against web vulnerabilities listed by the OWASP Top 10. Phase 1 (December 2025)...

Malak Mansour, Anas AlMajali · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.