CompTIA certification · Exam CY0-001

CY0-001 Mock Exam

CompTIA SecAI+ v1

Find out if you're ready for CY0-001. Take the free timed mock exam and get your score in minutes, or study the free CY0-001 questions below with answers and explanations.

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

Free CY0-001 questions

1–10 of 46 free
Question 1 Choose 1
Which of the following strengthens the performance of a large language model (LLM) for malicious reconnaissance?
Show answerHide answer

Correct answer: D Prompting a chatbot to describe server naming patterns and Internet Protocol (IP) ranges

Explanation

Explanation:

Prompting a chatbot to reveal internal infrastructure details—such as server naming conventions and IP subnets—directly strengthens an LLM’s utility for malicious reconnaissance. This technique, known as informational prompt engineering, exploits the model’s training data, which often includes publicly exposed code repositories, forum posts, or documentation containing organizational network patterns. By crafting a benign-sounding query, the attacker coerces the LLM to output specific, actionable intelligence without modifying the model itself. This is far more effective than other methods because it leverages the LLM’s parametric memory and reasoning capabilities to correlate fragmented data points, producing a comprehensive reconnaissance report. The attack falls under the OWASP LLM06: Sensitive Information Disclosure category, where the model inadvertently reveals proprietary or internal system details.

Why the other options are incorrect:

A. RAG:
RAG enhances accuracy by grounding responses in an external vector database. It does not inherently improve the model’s reasoning or ability to perform reconnaissance; it simply retrieves documents. An attacker would need prior access to the RAG data store, making it a secondary vector, not a performance enhancer.

B. Web scraper script:
This is an external OSINT tool, not an LLM capability. While it gathers data, it does not “strengthen” the model’s internal performance or reasoning. The LLM merely consumes the scraped data; its core functionality remains unchanged.

C. Query as an administrator:
This describes a role-playing jailbreak to bypass guardrails. While dangerous, it targets policy enforcement, not the model’s ability to perform reconnaissance. It does not make the LLM more effective at identifying patterns or correlating network data—it only removes content filters.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 2.2 (Threats to AI Systems – Inference and Extraction Attacks) and Domain 3.2 (Implementing AI Security Controls – Prompt Filtering).

OWASP Top 10 for LLMs (v1.1): LLM06 – Sensitive Information Disclosure, which explicitly warns against extracting internal system details via prompts.
Question 2 Choose 1
A detection engineering team wants to use AI to automatically prevent vulnerable code from reaching production. Which of the following is the most effective way to accomplish this task?
Show answerHide answer

Correct answer: C Implementing a large language model (LLM) in the continuous integration and continuous deployment (CI/CD) runner to examine code and pass or fail build jobs

Explanation

Explanatio:

Implementing an LLM directly within the CI/CD pipeline runner is the most effective way to automatically prevent vulnerable code from reaching production because it creates a blocking gate in the deployment workflow. By integrating the LLM into the CI/CD runner (e.g., GitHub Actions, Jenkins, GitLab CI), the organization ensures that every code commit triggers an automated security review. The LLM can analyze code for common vulnerabilities (e.g., injection flaws, hardcoded secrets, insecure deserialization) and, based on a defined risk threshold, fail the build job—preventing the code from progressing to staging or production. This approach is fully automated, operates at the point of merge, provides immediate feedback to developers, and eliminates human dependency or delayed reviews. It shifts security left, embedding it directly into the developer workflow without requiring manual intervention.

Why the other options are incorrect:

A. IDE plug-in warning:
While this provides real-time feedback to developers, it is advisory only—developers can ignore or dismiss warnings and still commit vulnerable code. It does not enforce a mandatory block, making it ineffective as an automatic prevention mechanism.

B. SOAR with ML model:
SOAR platforms are designed for incident response and alert triage, not code validation in build pipelines. Using SOAR here introduces latency and operational complexity, and classification alone does not enforce a build failure.

D. Agentic penetration testing tool:
Penetration testing is dynamic and time-consuming, typically run against deployed applications. It is not suitable for CI/CD gating due to long execution times, false positives, and inability to provide immediate pass/fail decisions per commit.

References

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.3 (Securing AI-Enabled Systems – AI in CI/CD and DevSecOps) and Domain 4.1 (AI for Security Operations – Automating Security Controls).

NIST SSDF (SP 800-218): Emphasizes automated vulnerability scanning as a gate in the build pipeline.
Question 3 Choose 1
Which of the following is an example of how a security analyst uses generative AI in the triage process?
Show answerHide answer

Correct answer: C To summarize security findings by category

Explanation

Explanation:

Summarizing security findings by category is a primary example of how security analysts use generative AI in the triage process. In security operations, analysts are inundated with thousands of alerts, logs, and findings from SIEMs, EDRs, and vulnerability scanners. Generative AI—specifically LLMs—can ingest large volumes of raw security data and produce concise, human-readable summaries grouped by category (e.g., malware families, threat actor TTPs, affected asset types, or severity levels). This accelerates the triage process by allowing analysts to quickly understand the scope and nature of security events without manually sifting through massive datasets. Generative AI excels at synthesis, contextualization, and natural language output—making it ideally suited for summarizing complex technical findings into actionable intelligence.

Why the other options are incorrect:

A. To predict the next attack target with higher accuracy:
This describes predictive analytics, which is typically achieved using traditional machine learning (classification, regression, time-series forecasting), not generative AI. Predictive modeling requires structured data and statistical algorithms, not the natural language generation capabilities of LLMs.

B. To use statistical analysis for malicious code assessment:
Statistical analysis—such as entropy calculation, opcode frequency distribution, or byte-level pattern matching—is performed using traditional ML or heuristic methods. Generative AI is not designed for statistical feature extraction; it is designed for content generation and language understanding.

D. To tag malware using ML algorithms:
Malware tagging (e.g., classifying files as ransomware, trojan, or worm) is a supervised classification task performed by traditional ML models (e.g., random forest, SVM, or deep neural networks) trained on labeled malware samples. Generative AI is not the appropriate tool for this structured classification task.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 4.1 (AI for Security Operations – Triage and Alert Prioritization) and Domain 1.2 (AI Types – Generative AI vs. Predictive ML).

SANS GIAC: Emphasizes using generative AI for automated report generation and alert summarization in SOC environments.
Question 4 Choose 1
A security analyst needs to conduct a security assessment of the output from an AIenabled development tool. Which of the following should the analyst do first?
Show answerHide answer

Correct answer: D Perform a source code review.

Explanation

Explanation:

Performing a source code review is the first and most critical step when assessing the output from an AI-enabled development tool. AI-generated code can contain vulnerabilities, insecure patterns, logic errors, or even malicious code fragments—often referred to as "hallucinated" or "suggested" code that lacks proper security validation. A manual or automated source code review allows the security analyst to examine the generated code for common weaknesses such as injection flaws (SQL, OS command), insecure deserialization, improper error handling, hard-coded credentials, and business logic flaws. This assessment must occur before any other security controls are applied because the analyst needs to understand what the AI produced. Code review provides the foundational security analysis upon which additional controls are built.

Why the other options are incorrect:

A. Remove hard-coded secrets from the source code:
Removing secrets is a remediation step, not an assessment step. The analyst must first review the code to identify hard-coded secrets before removing them. Performing removal without review may miss other critical vulnerabilities.

B. Enforce strict access controls for code repositories:
Access controls govern who can view or modify the code. While important for overall code security, they are preventive controls that should already be in place, not the first assessment step. They do not evaluate the quality or security of the AI-generated output itself.

C. Enable sensitive data discovery on code repositories:
Sensitive data discovery scans for PII, credentials, or secrets in repositories. This is a subset of code review focused specifically on data exposure. However, it does not address logic flaws, injection vulnerabilities, or insecure design—making it too narrow as a first step. A comprehensive source code review encompasses sensitive data discovery and more.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 3.3 (Securing AI Systems – AI Code Generation Security) and Domain 4.2 (AI for Security Operations – Code Analysis).

OWASP Top 10 (A03:2021 – Injection): Highlights code-level vulnerabilities that must be reviewed in AI-generated output.
Question 5 Choose 1
An AI architect reviews AI utilization and wants to improve the user experience. Which of the following should the architect review within the logs?
Show answerHide answer

Correct answer: B Model accuracy

Explanation

Explanation:

Model accuracy is the log metric that directly impacts user experience. When an AI architect reviews logs to improve user experience, they need to analyze how well the model is performing its core function—delivering correct, relevant, and useful outputs. Logs containing accuracy metrics (e.g., prediction confidence scores, error rates, false positive/negative rates, or user feedback signals) reveal whether the model is meeting user expectations. Poor accuracy leads to frustrated users, wasted time, and loss of trust in the system. By reviewing accuracy trends over time, the architect can identify degradation (drift), spot problematic query patterns, and prioritize retraining or fine-tuning efforts. Accuracy logs are the most direct indicator of whether the AI is fulfilling its intended purpose from the user's perspective.

Why the other options are incorrect:

A. Rate monitoring:
Rate monitoring tracks request volume, throughput, and API throttling. While performance and latency affect user experience, rate monitoring is primarily a capacity and cost management tool. It does not tell the architect whether the model's responses are accurate or useful—only how many requests are being made.

C. Access controls:
Access controls govern who can use the system. Reviewing access logs would show authentication and authorization events, which are security and compliance concerns. They do not provide insight into the quality of the AI's outputs or user satisfaction.

D. Data storage:
Data storage logs track how much data is stored, backup status, and retrieval performance. Storage metrics relate to infrastructure and data management, not to the AI model's inference quality or user experience. Storage issues might affect availability, but they do not reveal whether the model is delivering accurate responses.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 1.3 (AI Lifecycle – Model Performance Monitoring) and Domain 4.2 (AI for Security Operations – Log Analysis and Performance Metrics).

NIST AI RMF (Playbook): Emphasizes monitoring model accuracy and performance to ensure trustworthiness and user satisfaction.
Question 6 Choose 1
A security team is using an AI-based tool to try to bypass organizational boundaries. The team uses AI to look at the current state and suggest different attack vectors based on the outcome of the previous ones. Which of the following techniques is the team most likely using?
Show answerHide answer

Correct answer: D Automated penetration testing

Explanation

Explanation:

Automated penetration testing is the technique the security team is most likely using. The description matches an AI-driven penetration testing tool that iteratively assesses the current security state, uses AI to select attack vectors, and adapts its approach based on previous outcomes—essentially simulating an intelligent adversary. This is a hallmark of autonomous or AI-assisted penetration testing, where the AI models decision-making processes, prioritizes high-value targets, and recommends or executes exploitation steps without continuous human intervention. By leveraging AI, the team can scale reconnaissance and exploitation efforts, cover more ground faster, and uncover complex attack chains that manual testers might miss.

Why the other options are incorrect:

A. Manual signature matching:
Manual signature matching involves comparing network traffic, files, or system behavior against a database of known indicators of compromise (IoCs) or attack signatures. It is a reactive, rule-based detection method and does not involve iterative attack vector selection or adaptive decision-making.

B. Code quality testing:
Code quality testing (e.g., static analysis, linters, or unit testing) evaluates software for bugs, maintainability, and security vulnerabilities in the source code. It does not "try to bypass organizational boundaries" or simulate adversarial behavior—it is a development-phase quality assurance activity.

C. Fraud detection:
Fraud detection uses AI/ML to identify anomalous transactions, user behaviors, or financial activities indicative of fraud. It is a defensive monitoring capability, not an offensive technique to breach organizational boundaries or discover attack paths.

References:

CompTIA SecAI+ CY0-001 Exam Objectives: Domain 2.1 (AI-Powered Cyberattacks – AI for Penetration Testing) and Domain 4.1 (AI for Security Operations – Automated Red Teaming).
Question 7 Choose 1
An organization is concerned with the exposure of sensitive data. Which of the following is the most relevant security concern?
Show answerHide answer

Correct answer: B Model inversion

Explanation

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

Correct answer: D Deploy prompt templates.

Explanation

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

Correct answer: D Improper output handling

Explanation

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

Correct answer: D Endpoint

Explanation

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