All EC-Council exams

Free Certified Offensive AI Security Professional (C|OASP) practice test: 30 questions with answers

30 original questions for Certified Offensive AI Security Professional (C|OASP), drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.

Free questions
30
Full bank
112 questions

Certified Offensive AI Security Professional (C|OASP) exam guide: topics, cost and format

All 30 Certified Offensive AI Security Professional (C|OASP) questions with answers

The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.

Attacking LLM Applications (4 questions)

  1. Question 1

    A chatbot can query a customer database. It follows instructions hidden in a web page it retrieved and reveals another customer's details. Which vulnerability does this describe?

    1. ATraining data leakage, which reveals content that the model memorised during training
    2. BModel denial of service, which exhausts compute with very long and repeated prompts
    3. CIndirect prompt injection, where retrieved untrusted content carries instructions
    4. DSupply-chain compromise, which tampers with a model file before it is deployed to users
    Show answer and explanation
    Correct answer: C

    The model obeyed instructions contained in untrusted retrieved content, which is indirect prompt injection, and the database access turned that into a data exposure. The other options concern resource exhaustion, memorisation and tampering with the supply chain, which do not match this chain of events.

  2. Question 2

    Which control is most effective against sensitive data exposure through the outputs of an LLM application?

    1. ALimiting the data the model can reach and filtering results by user role
    2. BStoring all customer data inside the prompt so that the model keeps it in context
    3. CIncreasing the maximum output length so that the model shows the complete context
    4. DRaising the temperature so that the model paraphrases sensitive data before it answers
    Show answer and explanation
    Correct answer: A

    Restricting the data the model can reach and filtering results by the user's role reduces what can be exposed, whatever the prompt says. Higher temperature does not hide data, and placing all customer data in the prompt makes the exposure larger.

  3. Question 3

    Why is insecure output handling a risk when an LLM's response is displayed in a web page?

    1. AThe output is stored permanently in the browser cache and shared with all users of the site
    2. BThe output may contain script or markup that the app renders without encoding it first
    3. CThe model's response has a fixed length that truncates the content of the page on display
    4. DThe model always produces unreadable text that breaks the page layout for every user
    Show answer and explanation
    Correct answer: B

    If the application renders model output as HTML or script without encoding, an attacker who controls part of the output can inject code into other users' pages. Layout problems, caching and fixed lengths are not the security concern.

  4. Question 4

    Which control reduces the risk of jailbreaks that bypass a chatbot's safety instructions?

    1. ASetting unlimited output length so that the model can explain every refusal to the user fully
    2. BDisabling logging so that jailbreak attempts are not recorded by the monitoring team at all
    3. CLayered defences: input and output filters plus adversarial testing
    4. DRelying on a single system prompt with no filters, since the prompt always overrides everything
    Show answer and explanation
    Correct answer: C

    Jailbreak resistance comes from layers: input and output filtering, monitoring and adversarial testing before release, so one bypass does not defeat the system. A single prompt is easy to override, and disabling logs or lengthening outputs make attacks harder to detect or no safer.

Agent Security and Tool Use (4 questions)

  1. Question 5

    An AI agent can send emails and update records on its own. Which principle best reduces the risk of excessive agency?

    1. AGive the agent full administrator rights so that it never fails a task it has started
    2. BRun the agent only at weekends, when fewer people use the system and risks are lower
    3. CLet the agent choose its own permissions based on each request that it receives from users
    4. DGrant only the tools and permissions needed, and require approval for high-impact actions
    Show answer and explanation
    Correct answer: D

    Least privilege limits the damage an agent can do, and human approval for high-impact actions keeps a person in control of consequential steps. Broad rights, self-granted permissions and running at quiet times do not control what the agent can do.

  2. Question 6

    Which control best limits what a tool-using agent can do if an attacker manipulates it?

    1. AAllow-listed tool calls with scoped credentials and an audit log of every action taken
    2. BA single shared API key with unlimited access that every one of the agent's tools uses
    3. CTurning off all logging so that the agent's activity stays private from security reviewers
    4. DAllowing the agent to call any internet address that it finds useful for completing a task
    Show answer and explanation
    Correct answer: A

    Allow-listed tools limit which actions are possible, scoped credentials limit what each action can reach, and logs make misuse visible. A shared unlimited key, disabled logging and unrestricted internet calls each widen the damage a manipulated agent can cause.

  3. Question 7

    What is a sensible limit on an autonomous agent working on a multi-step task?

    1. ANo limit at all, so that the agent can finish every task it starts without interruption
    2. BA defined step or cost budget, with human checkpoints before any high-impact action
    3. CA limit of one step, so that the agent can never take any action on its own at all
    4. DA limit that the agent sets for itself, based on how confident it feels about the task
    Show answer and explanation
    Correct answer: B

    A step or cost budget stops runaway behaviour, and human checkpoints keep consequential actions under control. No limit invites runaway actions, a one-step limit makes the agent useless, and a self-set limit relies on the agent judging its own risk.

  4. Question 8

    Which TWO are true about least-privilege design for AI agents? (Choose two.)

    1. AAgents need broad credentials so that they never fail a task because of a permission
    2. BEach tool should use its own scoped credential, limited to what that tool needs
    3. CRead and write rights should always be granted together to keep the workflow simple
    4. DPermissions should be decided once when the agent is built and never reviewed again
    5. EAccess should be reviewed regularly and revoked when the agent no longer needs it
    Show answer and explanation
    Correct answer: B, E

    Scoped credentials for each tool and regular review with revocation are core least-privilege practices for agents. Broad credentials, combined read and write rights and permissions that are never reviewed each increase the damage a manipulated agent can cause.

  1. Question 9

    A tester finds sensitive personal data during an AI assessment. Which principle should govern how the tester handles it?

    1. ACopy the data to a personal drive so that the findings can be checked again later
    2. BPost examples of the data publicly to show how serious the finding is for the client
    3. CShare the data with the model vendor so that it can fix the issue faster for everyone
    4. DMinimise access, avoid copies, and follow the agreed handling rules
    Show answer and explanation
    Correct answer: D

    Minimising access and avoiding copies protects the individuals concerned and limits the tester's own exposure, and the agreed rules define how evidence is handled and reported. Copying, publishing or sharing the data each create new harm.

  2. Question 10

    How should an AI-specific finding be described in a report to the client?

    1. AWith the affected component, the impact, reproduction steps and a fix
    2. BWith a screenshot of the chat alone, and no reproduction conditions or impact analysis at all
    3. CWith a general claim that the model is unsafe overall, without naming any specific component
    4. DOnly with the model's name, because the client does not need details of the component affected
    Show answer and explanation
    Correct answer: A

    A useful finding names the affected component, explains the impact, gives the conditions needed to reproduce it and suggests a fix. A screenshot without reproduction, a single model name or a general claim does not let the client act on the finding.

  3. Question 11

    Before testing an AI system that a third party owns, what must the tester confirm?

    1. AThat the owner has given written permission covering the systems and the testing methods
    2. BThat the model's developer has been told so that its engineers can help with the test
    3. CThat the system is publicly available on the internet, which makes testing lawful by default
    4. DThat the test results will be sold to the vendor after the engagement has ended
    Show answer and explanation
    Correct answer: A

    Written permission from the owner, covering the systems and the methods, is the basis for lawful testing. Telling the developer, public availability and selling results do not give the tester authority to test.

  4. Question 12

    Which TWO are typical elements of a rules of engagement or statement of work for an AI security test? (Choose two.)

    1. AA list of the model's favourite prompts, so that testers can reuse them in the engagement
    2. BThe tester's preferred laptop configuration and the software it has installed for testing
    3. CThe scope, including which AI components, endpoints and data sources are in bounds
    4. DThe data-handling rules for any sensitive information that the test encounters along the way
    5. EA forecast of the vendor's next model release, so that the test plan can be updated
    Show answer and explanation
    Correct answer: C, D

    A rules of engagement or statement of work defines the scope of AI components and endpoints in bounds and the rules for handling sensitive data. Favourite prompts, laptop configuration and vendor release forecasts are not part of the engagement terms.

Adversarial Attacks on AI Systems (4 questions)

  1. Question 13

    Which attack inserts manipulated samples into a model's training data so that the model learns a hidden behaviour?

    1. AMembership inference, which tests whether a particular record was in the training set
    2. BModel inversion, which reconstructs sensitive training records from the model's outputs
    3. CData poisoning, which corrupts the training data so the model learns a hidden behaviour
    4. DEvasion, which modifies inputs at inference time so that the model fails to detect them
    Show answer and explanation
    Correct answer: C

    Data poisoning changes what the model learns by tampering with its training data, often with a trigger that activates a hidden behaviour. Model inversion and membership inference are privacy attacks on outputs, and evasion changes inputs at inference time rather than training data.

  2. Question 14

    An attacker makes small, deliberate changes to an image so that a classifier assigns it to the wrong class. What is this attack called?

    1. AData poisoning, which changes the training data rather than the inputs at test time
    2. BModel extraction, which copies a model's behaviour by making many repeated queries
    3. CPrompt injection, which overrides the instructions given to a language model at runtime
    4. DAdversarial evasion example, which perturbs inputs so that the model misclassifies them
    Show answer and explanation
    Correct answer: D

    An adversarial evasion example perturbs an input so that the model misclassifies it while a person sees little change. Data poisoning alters training, model extraction copies the model, and prompt injection targets language models through text instructions.

  3. Question 15

    A model owner wants to know whether an attacker could work out if a specific customer record was used to train the model. Which attack is this?

    1. ABackdoor insertion, which plants a trigger word in the training data during training
    2. BPrompt leakage, which reveals the system prompt text to a user who asks for it
    3. CMembership inference, which estimates whether a record was part of the training data
    4. DModel theft, which copies the weights of the model to a new storage location
    Show answer and explanation
    Correct answer: C

    Membership inference estimates whether a given record was in the training data, which is a privacy risk for the individual. Prompt leakage exposes instructions, model theft copies the model, and backdoor insertion plants a trigger during training.

  4. Question 16

    Which technique builds a copy of a model by sending it many queries and training a new model on the responses?

    1. AMembership inference, which estimates whether a sample was in the training data
    2. BModel extraction, which trains a copy of a model from its query responses
    3. CPrompt leakage, which reveals the system prompt through repeated and clever queries
    4. DData poisoning, which corrupts the training set so that the model learns wrong labels
    Show answer and explanation
    Correct answer: B

    Model extraction trains a substitute model from the outputs of the target, which can copy its behaviour and expose intellectual property. The other techniques target training membership, training integrity or system prompts rather than copying the model.

Foundations of Offensive AI Security (4 questions)

  1. Question 17

    A tester is asked to assess an AI chatbot that a company runs for customers. Which item must be agreed before any testing begins?

    1. AThe model's parameter count, so that the test can be sized to its complexity
    2. BWritten authorisation and a defined scope agreed with the system owner
    3. CThe programming language used to build the chatbot's user interface
    4. DThe number of tokens each test prompt will use within the test budget
    Show answer and explanation
    Correct answer: B

    Written authorisation and a defined scope protect the tester and the client, and they set which systems and methods are allowed. Parameter counts, interface languages and token budgets may inform planning, but they do not authorise testing.

  2. Question 18

    Which published list describes the most significant security risks for applications that are built on large language models?

    1. AOWASP Top 10 for Web Applications, which covers classic web flaws only
    2. BNIST SP 800-53, which is a control catalogue for federal information systems
    3. COWASP Top 10 for LLM Applications, which lists the main risks for LLM apps
    4. DCIS Controls, which list the safeguards for enterprise endpoints and servers
    Show answer and explanation
    Correct answer: C

    The OWASP Top 10 for LLM Applications is the community list that names the principal risks in LLM-based systems, such as prompt injection and sensitive data disclosure. The web application list does not cover model-specific risks, and the CIS Controls and NIST catalogue are broader security references.

  3. Question 19

    Which framework provides Govern, Map, Measure and Manage functions for managing the risks of AI systems?

    1. AISO 27001, which specifies the requirements for an information security management system
    2. BNIST AI Risk Management Framework, with its Govern, Map, Measure and Manage functions
    3. CPCI DSS, which sets the requirements for protecting cardholder data in payment systems
    4. DSOC 2, which reports on the controls relevant to a service organisation's systems
    Show answer and explanation
    Correct answer: B

    The NIST AI Risk Management Framework is organised around Govern, Map, Measure and Manage, and it is widely used to structure AI risk work. ISO 27001, PCI DSS and SOC 2 are valuable security standards but do not use these functions for AI risk.

  4. Question 20

    Which TWO are part of an engagement's rules of engagement? (Choose two.)

    1. AThe tester's personal preference for a particular tool or operating system
    2. BThe permitted targets and the testing windows agreed with the client
    3. CThe model's estimated training cost, shared as background to the engagement
    4. DThe escalation contacts and the rule to stop testing if harm occurs
    5. EMarketing claims about the product that the client wants to be checked
    Show answer and explanation
    Correct answer: B, D

    The rules of engagement set the permitted targets, the testing windows, the escalation contacts and when to stop. Tool preference, training cost and marketing claims are not rules that govern how the test is run.

Foundations of LLMs and Agent Architectures (4 questions)

  1. Question 21

    Why can a language model be manipulated by text that is placed in its input?

    1. AIt executes any code found in its training corpus automatically during each inference
    2. BIt stores every previous conversation in a shared database that other users can query
    3. CIt cannot reliably separate instructions from data in one context
    4. DIt validates each user's identity before it follows any instructions inside the prompt
    Show answer and explanation
    Correct answer: C

    A model receives instructions and data as one stream of text, so it cannot always tell which part should be obeyed. That is the root of prompt injection. The other options describe storage, execution or authentication that language models do not perform by default.

  2. Question 22

    In an LLM-based agent, what does the system prompt normally do?

    1. AIt records every API call the agent makes so that auditors can review them
    2. BIt sets the model's standing role, rules and constraints for the conversation
    3. CIt holds the training corpus that the model learned from during pre-training
    4. DIt stores each user's password so that the agent can log in to services
    Show answer and explanation
    Correct answer: B

    The system prompt sets the standing role, rules and constraints the model should follow. It is not a credential store, a training corpus or an audit log, although it is a sensitive asset that attackers may try to extract.

  3. Question 23

    In a retrieval-augmented generation system, what is the role of the vector store?

    1. AIt logs every user's chat history for compliance reviews and long-term audit storage
    2. BIt stores embeddings of documents so that relevant passages can be retrieved for a query
    3. CIt holds the model's weights so that they can be loaded quickly at each request
    4. DIt encrypts the prompts before they are sent to the language model for processing
    Show answer and explanation
    Correct answer: B

    A vector store holds embeddings of document chunks and returns the passages closest to a query, which are then added to the prompt. Model weights, chat logs and prompt encryption are handled elsewhere in the system.

  4. Question 24

    Why is a tool-using agent a larger attack surface than a plain chat model?

    1. AIt always runs more slowly, so attackers have more time to find weaknesses to use
    2. BIt cannot be logged, so no record exists of what it did or why it did it at all
    3. CIt uses more memory than a chat model, which makes it easier for attackers to crash
    4. DIt can take actions through tools, so a manipulated decision can change systems and data
    Show answer and explanation
    Correct answer: D

    Tools let the agent act on systems and data, so a manipulated decision has real consequences beyond the text it writes. Speed, memory use and logging are not the reason agents widen the attack surface, and agents can and should be logged.

Offensive AI Tooling and Automation (3 questions)

  1. Question 25

    An AI-assisted tester wants to use generated payloads or scripts in an engagement. Which practice is correct?

    1. ARun every generated payload against production systems straight away to save time on testing
    2. BReview and validate each output, and use it only within the agreed authorised scope
    3. CShare the generated payloads publicly so that other testers can reuse them without limits
    4. DTrust generated code without review, since the model has been trained on expert material
    Show answer and explanation
    Correct answer: B

    Generated output can be wrong, unsafe or out of scope, so the tester must review it, validate it and keep its use within the agreed boundaries. Running it untested on production, trusting it blindly or publishing it all break the engagement rules.

  2. Question 26

    Why should a human stay in the loop when an AI tool generates attack scenarios for a test?

    1. AModels can produce plausible but wrong or out-of-scope steps
    2. BHuman testers always find more issues than any model, so the model adds no value at all
    3. CModels are too slow to run a test, so the human has to do the actual work instead
    4. DThe law requires a human to type every command that is entered during an engagement
    Show answer and explanation
    Correct answer: A

    AI-generated attack ideas can look convincing while being wrong, unsafe or outside the authorised scope, so a human must check them. The speed, value and legal arguments in the other options are not the reason for keeping a person in the loop.

  3. Question 27

    A tester uses an AI model to draft a list of test cases for a web API. Which step must come before any test is run?

    1. APublish the list on a public forum so that other testers can review and reuse it freely
    2. BRun all cases at once against the production API to see the results quickly for the report
    3. CSend the list to the client as the final results, since the model drafted it and checked it
    4. DCheck the cases against the agreed scope and remove any that touch out-of-scope systems
    Show answer and explanation
    Correct answer: D

    Generated test cases must be checked against the agreed scope before running, because the model may suggest actions that are out of bounds. Running them against production, presenting unchecked results, or publishing the list each bypass the required review.

AI Reconnaissance and Threat Profiling (3 questions)

  1. Question 28

    When mapping an AI-enabled application before testing, which information is most useful for planning the assessment?

    1. AThe office location of the company's data centre and the power supply it uses
    2. BThe colour scheme used in the chat widget on the company's public website
    3. CThe salaries of the team members who maintain the chatbot and its deployment
    4. DThe model family, its callable tools and the data sources it reads
    Show answer and explanation
    Correct answer: D

    The model family, its tools and its data sources determine where untrusted content can enter and what actions the system can take, which shapes the test plan. Facility details, styling and salaries do not change how the application can be attacked.

  2. Question 29

    Which activity maps how an AI system is built before testing, including its data pipelines and third-party components?

    1. APassword cracking of the administrator accounts on the chatbot's hosting platform
    2. BPort scanning of the public website to list any open network services it exposes
    3. CA phishing simulation for the staff who use the chatbot every day in their work
    4. DArchitecture and supply-chain review of components and dependencies
    Show answer and explanation
    Correct answer: D

    An architecture and supply-chain review identifies components, data flows and third-party dependencies, which shows where attacks can enter. Password cracking, port scanning and phishing simulations are different activities that do not map the design of an AI system.

  3. Question 30

    A threat profile for an AI assistant lists what the attacker is likely to want and how they might reach it. Which element of the profile is about the attacker's goal?

    1. AThe version of the web server that hosts the assistant and its open network ports
    2. BThe attacker's motivation and the assets they most want, such as customer records
    3. CThe number of employees who have been trained to use the assistant each quarter
    4. DThe programming language used to write the assistant's frontend user interface
    Show answer and explanation
    Correct answer: B

    Motivation and the assets an attacker wants define the goal of the threat profile, and they guide which attack paths matter most. Server versions, training counts and frontend languages are technical or organisational details rather than the attacker's objective.