Topic · 21 of 71 questions freeSecuring AI systems
Question 1Choose 1
An organization is concerned with the exposure of sensitive data.
Which of the following is the most relevant security concern?
Correct answer:
B. Model inversion
Explanation:
Model inversion is a privacy attack where an adversary exploits a machine learning model's predictions to reconstruct sensitive training data. In a model inversion attack, the attacker queries the model with carefully crafted inputs and analyzes the output probabilities to reverse-engineer statistically accurate representations of the original training samples. This is the most direct and relevant security concern when an organization fears exposure of sensitive data—such as personally identifiable information (PII), medical records, or financial details—because the attack does not require breaching the database; it extracts information solely through the model's API endpoint. For example, researchers have demonstrated model inversion attacks on facial recognition systems that can reconstruct recognizable face images from the model's confidence scores. This attack falls under inference attacks, which are specifically designed to leak confidential training data.
Why the other options are incorrect:
A. Overfitting: Overfitting occurs when a model memorizes noise or specific details from training data rather than generalizing. While overfitting can increase the success of a model inversion attack by making the model too sensitive to individual training points, overfitting itself is a performance issue, not a direct attack vector. It is a vulnerability that enables inversion, but the security concern is the attack, not the condition.
C. Data normalization: This is a preprocessing technique used to scale numerical features to a standard range (e.g., Z-score or Min-Max scaling) to improve model convergence. It has no security implications regarding data exposure; it is purely a data preparation step.
D. Hyperparameter tuning: This is the process of optimizing model configuration parameters (e.g., learning rate, number of layers, batch size) to improve accuracy. It is a machine learning engineering activity and does not cause or relate to sensitive data leakage.
References:
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 2.2 – Threats to AI Systems (specifically Inference Attacks which include model inversion and membership inference).
OWASP Top 10 for Machine Learning (ML03): Model Inversion is explicitly listed as a key threat to data privacy.
Question 2Choose 1
An organization implements a domain-specific AI chatbot. After operating normally for
weeks, the model returns contextually incorrect responses — treating 'worm' as a biological
pest rather than a computer worm when answering a cybersecurity question.
Which of the following should the organization do to address the issue?
Correct answer:
D. Deploy prompt templates.
Explanation:
Prompt templates are predefined, structured input formats that guide the LLM toward desired outputs by providing context, role definitions, and explicit instructions. In this scenario, the chatbot misinterpreted "worm" as a biological pest instead of a computer worm because the model lacked sufficient cybersecurity context in the user's raw query. By deploying prompt templates, the organization can prepend a system-level instruction such as "You are a cybersecurity assistant. Always interpret technical terms in the context of information security unless explicitly stated otherwise." This anchors the model's reasoning, reduces semantic ambiguity, and ensures domain-specific terminology is consistently interpreted correctly without retraining the underlying model. Prompt templates are a lightweight, non-invasive control that directly addresses contextual misclassification, making them the most immediate and effective solution.
Why the other options are incorrect:
A. Configure guardrails: Guardrails are policy-based filters that enforce safety, compliance, and toxicity rules—such as preventing the model from generating harmful, offensive, or prohibited content. They do not resolve contextual ambiguity or improve the model's understanding of technical terminology. Guardrails block outputs; they do not guide the model's interpretation of ambiguous words.
B. Encrypt the weights at rest: This is a data-at-rest security control that protects the model's proprietary parameters from unauthorized access or theft. While critical for intellectual property protection and compliance, encryption has no impact on the model's inference-time reasoning or its ability to differentiate between "worm" as a pest versus "worm" as malware. It is a storage security measure, not a performance or accuracy fix.
C. Apply model access controls: Access controls manage who can query the model, authenticate users, and enforce role-based permissions (RBAC). They prevent unauthorized usage but do not influence the model's output quality, contextual understanding, or semantic interpretation. The chatbot would still misclassify "worm" regardless of who asks the question.
References:
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Implementing Secure AI Systems – Prompt Engineering and Template Usage) and Domain 1.3 (AI Lifecycle – Model Validation and Performance Monitoring).
Question 3Choose 1
A security analyst notices that regardless of user-submitted prompts, an AI model always
returns unsanitized responses. These responses are then passed to multiple plug-ins. The
analyst is concerned with the potential security implications.
Which of the following Open Worldwide Application Security Project (OWASP) categories
addresses this vulnerability?
Correct answer:
D. Improper output handling
Explanation:
Improper output handling is the OWASP category that directly addresses this vulnerability. The scenario describes an AI model that always returns unsanitized responses, which are then passed to multiple plug-ins. Improper output handling occurs when an LLM's output is accepted without validation, sanitization, or filtering before being passed downstream to other systems—such as plug-ins, APIs, databases, or rendering engines. This creates a critical security gap because malicious or unexpected LLM outputs can trigger cross-plugin execution, command injection, XSS, or privilege escalation in connected systems. Even if the model itself is not compromised, failing to validate its outputs before they reach plug-ins effectively trusts the LLM as an authoritative source, which is a dangerous assumption. OWASP explicitly warns that insufficient output validation can lead to severe consequences, including sensitive data leakage, system compromise, and arbitrary code execution in connected components.
Why the other options are incorrect:
A. Misinformation: This is a content integrity and accuracy issue, not a security vulnerability. Misinformation relates to factual incorrectness or hallucinations, not unsafe data flowing to plug-ins. It does not address the injection or execution risk in downstream components.
B. Prompt injection: This is an input-side attack where an adversary crafts malicious prompts to override system instructions or extract sensitive data. The scenario specifically describes the output being unsanitized, not the input being manipulated. The vulnerability lies in how the response is handled after generation.
C. Unbounded consumption: This refers to resource exhaustion attacks (e.g., denial of service through excessive token usage or computational cost). The scenario does not mention performance degradation, high costs, or resource limits—only output safety.
References:
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.2 (Implementing AI Security Controls – Output Validation and Sanitization) and Domain 2.2 (Threats to AI Systems – Plugin Exploitation).
OWASP Top 10 for LLMs (v1.1): LLM08 – Improper Output Handling explicitly defines this as failing to validate LLM outputs before passing them to downstream systems.
Question 4Choose 1
A security administrator must implement security controls for AI systems.
Which of the following access controls should the administrator set up first for
authentication?
Correct answer:
D. Endpoint
Explanation:
Endpoint access control is the first and most critical authentication control a security administrator must implement for AI systems. The endpoint—whether an API gateway, web interface, or application programming interface (API) endpoint—represents the entry point through which all users, applications, and external systems interact with the AI model. Without robust endpoint authentication (e.g., API keys, OAuth 2.0, mutual TLS, or JSON Web Tokens), an attacker can bypass all downstream controls by simply calling the model directly. Endpoint authentication establishes the first line of defense, ensuring that only authenticated and authorized entities can submit prompts or retrieve responses. This aligns with the fundamental security principle of defense in depth—securing the perimeter before layering internal controls. Once endpoint authentication is enforced, administrators can then implement finer-grained access controls on models, data, and infrastructure.
Why the other options are incorrect:
A. Model: Model-level access controls manage which users can query specific models or versions (e.g., fine-tuned versus base models). However, model access is meaningless if the endpoint itself is unauthenticated—an attacker could bypass model controls entirely by directly accessing the API. Endpoint authentication must precede model-level authorization.
B. Server: Server-level controls (e.g., firewall rules, network segmentation, SSH access) protect the underlying infrastructure . While important, these are network-layer controls, not authentication mechanisms. They restrict where traffic comes from, not who is making the request. Authentication must occur at the application layer first.
C. Data: Data access controls restrict who can view, modify, or delete training data, fine-tuning datasets, or inference logs. This is a privacy and compliance control, not an authentication control for the AI system itself. Data protection is secondary to ensuring the endpoint is properly authenticated.
References (CY0-001):
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – Access Control and Authentication) and Domain 3.2 (Implementing AI Security Controls – API Security).
NIST AI RMF: Emphasizes securing AI system interfaces and APIs as a foundational control.
Question 5Choose 1
A penetration tester is assessing the controls of a deployed AI system that is designed to
search and return the contents of files.
The tester runs the following:
Which of the following is the best control to prevent abuse of the system?
Correct answer:
D. Reducing the privilege scope of the service account
Explanation:
Reducing the privilege scope of the service account is the best control to prevent abuse of this system. The script demonstrates a command injection or privilege escalation vulnerability where the penetration tester is iterating through administrative commands—deleteBuckets, getObjects, listAcl, listPermissions—via the file_id parameter. The fact that these commands execute successfully (indicated by 200 responses and a count of 4) proves the service account running the AI application has excessive privileges far beyond what is required for its core function of searching and returning file contents. By applying the principle of least privilege, the administrator should restrict the service account to only the specific permissions needed—such as readObjects within a designated bucket—and explicitly deny administrative or destructive operations. This immediately neutralizes the attacker's ability to execute privileged commands, regardless of other vulnerabilities.
Why the other options are incorrect:
A. Custom detection rules for anomalous model behavior: Detection rules would identify suspicious activity after it occurs, not prevent the abuse. The script's commands would still execute successfully, causing potential damage before any alert is triggered. Prevention is superior to detection.
B. Segmenting the workload into a separate VPC: VPC segmentation is a network-level isolation control that limits lateral movement. However, it does not address the underlying issue—the service account itself has excessive permissions. The attacker could still execute privileged commands within the segmented environment.
C. Adding an LLM guardrails library to the application code: LLM guardrails filter or validate inputs and outputs at the application layer. However, the vulnerability is not prompt injection—it is a direct API call with a crafted parameter. The script bypasses the LLM entirely and interacts directly with the backend filesystem or cloud storage API. Guardrails would not intercept this backend request.
References:
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – Identity and Access Management, Least Privilege) and Domain 2.2 (Threats to AI Systems – Privilege Escalation).
Question 6Choose 1
Which of the following is most resistant to AI manipulation?
Correct answer:
C. Application programming interface (API) gateway
Explanation:
An API gateway is the most resistant to AI manipulation because it operates as a strict, rule-based intermediary between clients and backend services. Unlike AI models, which are probabilistic and susceptible to adversarial inputs, prompt injection, and data poisoning, an API gateway enforces deterministic security controls—including rate limiting, authentication (API keys, OAuth, JWT), input validation, request filtering, IP allowlisting/denylisting, and payload size restrictions. These controls are configured by administrators and do not rely on machine learning or natural language processing, making them immune to the adversarial manipulation techniques that target AI systems. Even if an attacker crafts a sophisticated adversarial prompt or poisons training data, the API gateway remains an independent, hardcoded barrier that enforces security policies without interpretation or deviation. This deterministic nature gives it inherent resistance to AI-specific threats.
Why the other options are incorrect:
A. Payloads: Payloads are the data being transmitted and can be easily crafted or manipulated by attackers using AI-generated content. They are the attack vector, not a defensive control.
B. AI-generated content: AI-generated content itself can be manipulated through prompt injection, adversarial inputs, or fine-tuning attacks. It is the source of the threat, not a resistance mechanism.
D. Attack surface reduction: This is a security strategy that minimizes exposed entry points. While effective, it does not inherently resist AI manipulation—it reduces opportunities but does not actively defend against adversarial inputs that reach the remaining surface.
E. Antivirus: Traditional antivirus relies on signature-based detection and is increasingly ineffective against AI-generated polymorphic malware. AI can easily evade signature matching, making antivirus highly susceptible to AI manipulation.
References:
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – API Security and Gateway Controls) and Domain 3.2 (Implementing AI Security Controls – Input Validation, Rate Limiting).
OWASP API Security Top 10 (API1-API10): Highlights API gateways as foundational for enforcing authentication, authorization, and throttling.
Question 7Choose 1
Which of the following is the primary security risk when deploying AI models in production?
Correct answer:
D. Data exposure
Explanation:
Data exposure is the primary security risk when deploying AI models in production because AI systems inherently process, store, and generate vast amounts of sensitive information—including personally identifiable information (PII), intellectual property, financial records, and proprietary business data. Unlike traditional applications, AI models can inadvertently memorize training data and leak it through inference attacks such as model inversion, membership inference, and prompt extraction. These attacks allow adversaries to reconstruct individual training records or infer whether specific data was used in training, all without breaching the underlying database. Additionally, production AI systems expose APIs that can be queried thousands of times, providing attackers with repeated opportunities to extract sensitive information through carefully crafted inputs. Data exposure also carries severe regulatory consequences under GDPR, HIPAA, and CCPA, making it the highest-stakes security concern.
Why the other options are incorrect:
A. Graphics processing unit (GPU) acceleration: GPU acceleration is a performance optimization for training and inference, not a security risk. While GPUs may have theoretical side-channel vulnerabilities (e.g., cache timing attacks), these are not the primary production risk.
B. Model overfitting: Overfitting is a performance issue where a model memorizes training data instead of generalizing. While it increases the risk of data exposure through model inversion, overfitting itself is a machine learning engineering problem, not a direct security risk. Data exposure is the actual threat caused by overfitting.
C. Model encryption: Model encryption protects proprietary model weights at rest or in transit. It is a security control, not a risk. Encryption does not expose data—it protects it.
References:
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 2.2 (Threats to AI Systems – Model Inversion, Membership Inference, Data Leakage) and Domain 3.2 (Implementing AI Security Controls – Data Protection).
OWASP Top 10 for LLMs (LLM06): Sensitive Information Disclosure—specifically warns against data exposure through AI outputs
Question 8Choose 1
An AI security administrator receives an inquiry about an unusually high monthly bill from
the AI solution provider. The administrator thinks the majority of staff might be using the
most powerful model available.
Which of the following AI measures should the administrator implement to lower costs?
Correct answer:
D. Token limits
Explanation:
Token limits are the most direct and effective measure to lower costs when staff are overusing powerful AI models. Most commercial AI solutions charge based on token consumption—the number of input (prompt) and output (completion) tokens processed per request. High token usage directly correlates with higher monthly bills. By implementing token limits, the administrator can enforce per-user, per-session, or per-day caps, preventing excessive usage of the most powerful (and expensive) models. Token limits can be configured at the API gateway or application layer to throttle requests, truncate overly long prompts, restrict output length, or route excessive queries to more cost-effective smaller models. This provides immediate, granular cost control while maintaining operational availability.
Why the other options are incorrect:
A. Storage monitoring: Storage monitoring tracks data storage volume and costs, not inference or API usage. The inquiry is about high monthly bills from AI model usage, not data storage fees. Storage monitoring does not address token consumption.
B. Modality types: Modality refers to the data types a model can process (e.g., text, image, audio, video). Restricting modalities would limit functionality but does not directly lower costs—staff could still generate excessive text tokens. This is a capability control, not a cost control.
C. Prompt firewalls: Prompt firewalls are security controls that filter or block malicious inputs (e.g., prompt injection, jailbreaks). They do not enforce usage quotas or token caps. While they protect against attacks, they do not reduce token consumption from legitimate staff queries.
References :
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – API Security and Usage Controls) and Domain 3.2 (Implementing AI Security Controls – Rate Limiting and Quotas).
NIST AI RMF (Playbook): Recommends establishing usage policies and resource limits to manage operational costs.
Question 9Choose 1
A developer is selecting authentication controls for an AI system.
Which of the following is the best way to prevent threat actor replay attacks?
Correct answer:
C. Expiring session tokens
Explanation:
Expiring session tokens are the most effective control to prevent replay attacks, where an attacker intercepts a valid authentication token and reuses it to impersonate a legitimate user. By implementing short-lived session tokens with built-in expiration times (e.g., JWTs with short exp claims, OAuth 2.0 access tokens with limited lifetimes, or SAML assertions with time constraints), the system ensures that even if a token is intercepted, it becomes invalid after a short period—typically minutes to hours. This drastically reduces the attack window and forces attackers to use the token immediately, making replay attacks significantly harder to execute. For additional protection, combining expiring tokens with nonces, timestamps, or one-time-use mechanisms further mitigates replay risks.
Why the other options are incorrect:
A. Identity provider (IdP) federation: IdP federation enables single sign-on (SSO) across multiple systems using standards like SAML or OIDC. While it centralizes authentication, it does not inherently prevent replay attacks—tokens from a federated IdP can still be intercepted and reused if they lack expiration controls.
B. Secure Shell (SSH)-based certificate authentication: SSH certificates are used for secure remote access to servers and infrastructure, not for API or application-level authentication in AI systems. SSH does not address token replay in AI application contexts.
D. Identity and access management (IAM) access keys: IAM access keys (e.g., AWS access keys) are long-lived static credentials used for programmatic access to cloud resources. They are highly vulnerable to replay attacks because they remain valid until manually revoked, making them the opposite of a replay-resistant control.
References:
CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – Authentication, Session Management, and Token Security).
NIST SP 800-63B (Digital Identity Guidelines): Recommends short-lived session tokens and frequent re-authentication to mitigate replay attacks.
Question 10
Instructions: Use the drop-down menus to define two appropriate security controls for each
component of the AI system. Each control may be used only once.
An engineer is deploying a new AI system and wants to integrate it into the core system
through an API.
🎯 Component Control Assignments
1. Cloud Control Plane
Control 1: IAM policies
Control 2: Resource policies
2. Prompt Firewall
Control 1: Injection policies
Control 2: Output monitoring
3. WAF (Web Application Firewall)
Control 1: Connection rate limits
Control 2: Input token validation
4. API Gateway
Control 1: Load balancing
Control 2: Authentication token validation
5. Backend (Front-end API / Model / Vector Database)
Control 1: Guardrails
Control 2: Input quota
Explanation
Cloud Control Plane: Manages cloud-level access and governance using IAM policies (identity permissions) and Resource policies (restricting cloud service deployments/access).
Prompt Firewall: Specifically inspects prompt content to stop adversarial input via Injection policies and verifies generated responses using Output monitoring.
WAF: Operates at the network/application edge to protect web interfaces, controlling traffic surges via Connection rate limits and inspecting payloads via Input token validation.
API Gateway: Acts as the entry point for API requests, providing traffic distribution through Load balancing and verifying identity using Authentication token validation.
Model & Vector Database Layer: Secures the core AI execution environment using Guardrails (to restrict model generation boundaries) and Input quota (to protect against resource exhaustion and denial of service).
Practice Like It's Exam Day
Get exam-ready with a timed CY0 001 CompTIA SecAI+ v1 mock exam designed to match the official exam's question format, question count, and time limit.