Topic · 6 of 22 questions freeAI-assisted security
Question 1Choose 1
Which of the following strengthens the performance of a large language model (LLM) for
malicious reconnaissance?
Correct answer:
D. Prompting a chatbot to describe server naming patterns and Internet Protocol (IP)
ranges
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 2Choose 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?
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
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 3Choose 1
Which of the following is an example of how a security analyst uses generative AI in the
triage process?
Correct answer:
C. To summarize security findings by category
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 4Choose 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?
Correct answer:
D. Perform a source code review.
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 5Choose 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?
Correct answer:
B. Model accuracy
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 6Choose 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?
Correct answer:
D. Automated penetration testing
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).
That's the last free question in AI-assisted security
You've seen the free 30% of this topic (6 of 22 questions). Get complete access for every question, explanation and the timed mock exam.