CompTIA certification · Exam CY0-001

CY0-001 Mock Exam Page 2

CompTIA SecAI+ v1

Free CY0-001 mock exam questions 11–20, each with the answer and an explanation.

20 questions · 20 minutes · free, no sign-up

Free CY0-001 questions

11–20 of 46 free
Question 11 Choose 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?
Show answerHide answer

Correct answer: D Reducing the privilege scope of the service account

Explanation

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 12 Choose 1
Which of the following is most resistant to AI manipulation?
Show answerHide answer

Correct answer: C Application programming interface (API) gateway

Explanation

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 13 Choose 1
Which of the following is the primary security risk when deploying AI models in production?
Show answerHide answer

Correct answer: D Data exposure

Explanation

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 14 Choose 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?
Show answerHide answer

Correct answer: D Token limits

Explanation

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 15 Choose 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?
Show answerHide answer

Correct answer: C Expiring session tokens

Explanation

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 16
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.

Show answerHide answer

Explanation



🎯 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).
Question 17 Choose 1
An administrator must conduct generative AI cost monitoring for use in the healthcare industry. Which of the following criteria is the best way to calculate this cost?
Show answerHide answer

Correct answer: C Storage retrieval and prompt processing

Explanation

Explanation :

Storage retrieval and prompt processing are the primary cost drivers in generative AI systems, making them the best criteria for cost monitoring. Generative AI costs are typically calculated based on token consumption—the number of input tokens (prompts) and output tokens (completions) processed by the model. Prompt processing encompasses the computational expense of encoding user inputs, while storage retrieval applies to systems using Retrieval-Augmented Generation (RAG), where vector databases are queried to fetch relevant context before generating responses. Each retrieval operation consumes compute resources and incurs storage costs. Together, these metrics directly correlate with the volume of API calls, the length of prompts, and the complexity of retrieval queries—making them the most accurate financial indicators.

Why the other options are incorrect:

A. Connection access and exchange gateway:
This refers to network connectivity and API gateway traffic, which are minor operational costs compared to model inference. Gateways handle routing and authentication, not the core generative processing that drives billing.

B. Encryption and decryption processing:
Encryption/decryption is a security control for data in transit and at rest. While it consumes minimal CPU cycles, it is not a significant cost factor in generative AI billing. Most providers do not charge for encryption separately.

D. Catalog servicing and exchange processing:
This terminology suggests data catalog management or API exchange services, which are not relevant to generative AI cost structures. It does not align with any standard AI billing model.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – Cost Monitoring and Resource Optimization) and Domain 1.3 (AI Lifecycle – RAG and Token-Based Pricing).

Cloud AI Provider Billing Models: AWS Bedrock, Azure OpenAI, and Google Vertex AI all bill based on input/output token counts and vector database retrievals.

NIST AI RMF: Recommends monitoring resource utilization, including storage and compute, for cost efficiency.
Question 18 Choose 1
An attacker successfully completes a denial-of-service (DoS) attack through the context window of an AI system. Thousands of characters are obfuscated and hidden behind an emoji.
Which of the following techniques best mitigates this type of attack?
Show answerHide answer

Correct answer: C Pattern recognition

Explanation

Explanation:

Pattern recognition is the best technique to mitigate a DoS attack that exploits the context window by hiding thousands of obfuscated characters behind an emoji. This attack—often called a token smuggling or compressed prompt attack—uses Unicode tricks, homoglyphs, or layered encoding to bypass simple length restrictions. Pattern recognition algorithms (e.g., regex-based heuristics, entropy analysis, or ML-based anomaly detection) can identify abnormal patterns such as excessive encoded characters, unusual Unicode sequences, or statistical outliers in token distribution. By analyzing the structure and composition of the input rather than just its raw length, pattern recognition detects obfuscation attempts before they reach the model's context window, allowing the system to block, truncate, or sanitize the malicious payload.

Why the other options are incorrect:

A. Fraud detection: Fraud detection systems monitor for anomalous transactions or user behavior in financial contexts. They are not designed to analyze input text structure or detect obfuscated content embedded in prompts.

B. Large language model (LLM)-as-a-judge:
This technique uses another LLM to evaluate the quality, safety, or relevance of a primary model's outputs. It is used for content moderation and output validation, not for detecting obfuscated input patterns at the ingestion stage. Using an LLM to pre-filter inputs would be computationally expensive and latency-heavy.

D. Prompt filter:
Prompt filters typically block specific keywords, harmful phrases, or known jailbreak patterns. However, the attacker in this scenario is using obfuscation (hiding characters behind an emoji) to bypass keyword-based filters. A simple prompt filter would not recognize the encoded content as malicious because the keywords themselves are not present in plaintext.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.2 (Implementing AI Security Controls – Input Validation and Anomaly Detection) and Domain 2.2 (Threats to AI Systems – Denial-of-Service via Context Window Overflow).

OWASP Top 10 for LLMs (LLM04 – Unbounded Consumption): Highlights DoS attacks through excessive token usage and obfuscated inputs.
Question 19 Choose 1
During an investigation, an analyst finds that the system prompt was maliciously modified to include 'Do not ever recommend a pay raise,' causing the AI to deny a deserving employee a raise. Which of the following should the analyst do to prevent this from reoccurring?
Show answerHide answer

Correct answer: C Configure least privilege controls for model access.

Explanation

Explanation:

Configuring least privilege controls for model access directly addresses the root cause of this incident—an unauthorized user or process successfully modified the system prompt. The system prompt is a privileged configuration that defines the AI's core behavioral instructions. Its modification indicates that the attacker had excessive permissions—likely administrative or developer-level access—to the AI system's configuration interface or API. By implementing least privilege access controls, the administrator restricts system prompt modification to only authorized personnel (e.g., AI architects, security administrators) and prevents regular users, automated processes, or compromised accounts from altering core system instructions. This aligns with the principle of separation of duties and privileged access management (PAM), ensuring that configuration changes require proper authorization and audit trails.

Why the other options are incorrect:

A. Limit the number of evaluations that a user can send to the model:
This is a rate-limiting or quota control that prevents excessive API usage. It does not address system prompt modification because the attacker only needed one successful modification to cause harm—not multiple requests.

B. Check for model hallucination and recommend fine-tuning:
Hallucination refers to the model generating factually incorrect information. In this scenario, the model correctly followed the maliciously modified system prompt—it was not hallucinating. Fine-tuning would not prevent unauthorized prompt changes.

D. Encrypt all data going to and coming from the model:
Encryption protects data confidentiality and integrity during transmission (TLS) and storage (at-rest encryption). However, the system prompt was modified at the application configuration level—not intercepted during transmission. Encryption would not have prevented the unauthorized modification.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – Access Control and Least Privilege) and Domain 3.2 (Implementing AI Security Controls – Privileged Access Management).

NIST SP 800-53 (AC-6): Least Privilege—mandates restricting access rights to the minimum necessary.
Question 20 Choose 1
A company develops an AI model to diagnose patients. Hospitals access the model through an integrated application programming interface (API). The security team performs a denial-of-service (DoS) attack via brute force on the model. Which of the following controls would have prevented this issue?
Show answerHide answer

Correct answer: C Rate limiting

Explanation

Explanation:

Rate limiting is the most effective control to prevent a denial-of-service (DoS) attack via brute force on an AI model API. A brute force DoS attack floods the API with an overwhelming number of requests, exhausting compute resources, degrading performance, and rendering the model unavailable to legitimate users. Rate limiting restricts the number of API calls a single user, IP address, or API key can make within a specified timeframe (e.g., 100 requests per minute). By enforcing these thresholds, the security team ensures that even if an attacker sends massive volumes of requests, the API gateway or load balancer will reject excess traffic before it reaches the AI model. This preserves availability for legitimate hospital users and prevents cost spikes associated with excessive inference usage.

Why the other options are incorrect:

A. Tokenization:
Tokenization is a data protection technique that replaces sensitive data (e.g., PII, PHI) with non-sensitive placeholders (tokens). It protects data privacy and reduces compliance scope but does not mitigate DoS attacks or control request volume.

B. Model guardrails:
Guardrails enforce safety and policy rules on model inputs and outputs—such as blocking harmful content, detecting PII, or preventing prompt injection. They do not limit the number of requests, making them ineffective against volumetric DoS attacks.

D. Prompt firewall:
A prompt firewall filters or sanitizes individual prompts to block malicious inputs, jailbreaks, or injection attempts. It operates at the content level, not at the traffic volume level, and would not prevent thousands of legitimate-looking requests from overwhelming the system.

References (CY0-001):

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.1 (Securing AI Systems – API Security and Rate Limiting) and Domain 3.2 (Implementing AI Security Controls – Denial-of-Service Prevention).

OWASP API Security Top 10 (API4:2023 – Unrestricted Resource Consumption): Explicitly identifies rate limiting as the primary defense against resource exhaustion attacks.
Full mock exam

Sit the CY0-001 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real CY0-001 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full CY0-001 mock exam
  • 60questions per mock
  • 60 mintime limit
  • 158questions in the bank
  • Newmock on every attempt