CompTIA certification · Exam CS0-003

CS0-003 Mock Exam Page 2

CompTIA CySA+

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

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

Free CS0-003 questions

11–20 of 151 free
Question 11 Choose 1
An analyst reviews a recent government alert on new zero-day threats and finds the following CVE metrics for the most critical of the vulnerabilities:

CVSS: 3.1/AV:N/AC: L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:U/RL:W/RC:R Which of the following represents the exploit code maturity of this critical vulnerability?
Show answerHide answer

Correct answer: A E:U

Explanation

Summary
The question asks for the specific metric within the CVSS vector that represents the "exploit code maturity." In the Common Vulnerability Scoring System (CVSS) v3.1, the state of exploit availability and reliability is explicitly defined by the Exploit Code Maturity (E) metric. This metric indicates whether a functional exploit is publicly available, which directly influences the likelihood of the vulnerability being exploited in the wild.

Correct Option

A. E:U
In the CVSS v3.1 vector string, the E metric stands for Exploit Code Maturity. It describes the current state of exploit techniques or code availability for the vulnerability.

The value U stands for Unproven, meaning that no exploit code is available, or that an exploit is purely theoretical. The other possible values are: P (Proof-of-Concept)

F (Functional)

H (High)

Incorrect Options

B. S:C
This metric stands for Scope (S). A value of C (Changed) indicates that a successful attack can impact components beyond the vulnerable component itself (e.g., a vulnerability in a virtual machine that compromises the host). It does not describe exploit maturity.

C. RC:R
This metric stands for Remediation Level (RL). The value R (Official Fix) indicates that a complete, vendor-supported solution is available. The code shown in the question is RL:W (Workaround), not RC:R. RC:R (Report Confidence: Confirmed) would indicate the vulnerability is confirmed by the vendor, but it is still not the exploit maturity metric.

D. AV:N
This metric stands for Attack Vector (AV). A value of N (Network) means the vulnerability can be exploited over a network. This describes the attack pathway, not the maturity of any existing exploit.

E. AC:L
This metric stands for Attack Complexity (AC). A value of L (Low) means the attack does not require special conditions and is easy to perform. While related to how easily an exploit can be used, it is a measure of the vulnerability's inherent complexity, not the maturity or existence of an exploit.

Reference
FIRST.org CVSS v3.1 Specification Document: The official CVSS v3.1 user guide from FIRST (the governing body for CVSS) explicitly defines the Exploit Code Maturity (E) metric as part of the Temporal Metrics group. It is used to "measure the current state of exploit techniques or code availability." This directly answers the question.
Question 12 Choose 1
A SOC analyst recommends adding a layer of defense for all endpoints that will better protect against external threats regardless of the device's operating system. Which of the following best meets this requirement?
Show answerHide answer

Correct answer: D EDR

Explanation

Summary:
In cybersecurity, protecting endpoints—such as laptops, servers, and mobile devices—from external threats like malware and ransomware requires tools focused on real-time monitoring and response. Endpoint Detection and Response (EDR) solutions excel here by providing cross-platform compatibility across Windows, macOS, Linux, and others, enabling behavioral analysis and automated isolation to mitigate risks effectively, unlike broader or non-endpoint-specific tools.

Correct Option:

D. EDR
EDR delivers comprehensive endpoint protection through continuous monitoring of device activities, leveraging behavioral analytics and threat intelligence to detect anomalies indicative of external threats. It supports diverse operating systems via unified agents, allowing SOC teams to hunt threats proactively, isolate compromised devices, and rollback changes. This cross-OS versatility ensures consistent defense in heterogeneous environments, reducing breach impacts as highlighted in industry benchmarks where EDR prevents escalation in 68% of endpoint attacks.

Incorrect Option:

A. SIEM
SIEM aggregates and correlates logs from network-wide sources for compliance and overarching threat visibility but lacks deep, real-time endpoint forensics or automated response capabilities. It relies on EDR for endpoint data, making it unsuitable as a standalone layer for OS-agnostic endpoint defense; instead, it can overwhelm teams with alerts without direct mitigation, often requiring integration to address endpoint-specific external threats effectively.

B. CASB
CASB secures cloud access by enforcing policies on SaaS apps, data loss prevention, and shadow IT visibility, but it does not monitor or protect endpoint devices themselves. Focused on cloud traffic rather than local threats, it fails to address OS-independent endpoint vulnerabilities like malware execution, rendering it irrelevant for broad external threat defense at the device level.

C. SOAR
SOAR automates incident workflows and orchestrates responses across tools like SIEM or EDR, enhancing efficiency but not providing native detection or protection on endpoints. As a coordination layer, it depends on underlying sensors for data, so it cannot independently add endpoint defense against external threats, potentially leaving OS-diverse devices exposed without integrated detection mechanisms.

Reference:
https://www.comptia.org/certifications/security
Question 13 Choose 1
An analyst is suddenly unable to enrich data from the firewall. However, the other open intelligence feeds continue to work. Which of the following is the most likely reason the firewall feed stopped working?
Show answerHide answer

Correct answer: A The firewall service account was locked out.

Explanation

Summary
The scenario specifies that only the firewall data feed has failed, while other intelligence feeds continue to function. This points to a problem specific to the connection or authentication between the enrichment tool and the firewall. A common cause for such a sudden, specific failure in automated system-to-system communication is a change in authentication status. A locked service account would immediately prevent the enrichment tool from authenticating to the firewall's API or logging system to pull data, while leaving other, independently authenticated feeds unaffected.

Correct Option

A. The firewall service account was locked out.
Security tools typically use a dedicated service account with appropriate permissions to automatically pull logs and data from devices like firewalls. If this account becomes locked out due to failed login attempts, password expiration, or an administrative action, the data feed will immediately fail.

This explains the specificity of the failure (only the firewall feed is down) and its sudden nature, as account lockouts can occur without warning. The other intelligence feeds use different connection methods and credentials, so they remain operational.

Incorrect Options

B. The firewall was using a paid feed.
This refers to the firewall receiving threat intelligence, not the analyst's tool receiving data from the firewall. The issue is about exporting the firewall's own log data for enrichment. A subscription lapse on an inbound intelligence feed to the firewall would not affect the outbound flow of its connection logs.

C. The firewall certificate expired.
While a certificate expiration could disrupt a TLS-encrypted connection, it is less likely than an account lockout for a few reasons. Certificates typically have a long validity period and warn before expiring. Also, such an expiration might affect multiple services, not just a single data feed, and would often result in a different error message related to trust or handshake failure.

D. The firewall failed open.
"Fail open" is a network traffic handling state for a firewall. If a firewall fails, it might allow all traffic through instead of blocking it. This is a operational state affecting network traffic, not its ability to generate and export its own log data to a security tool. The firewall can be operational and passing traffic (even incorrectly) while its management plane and logging functions remain active.

Reference
NIST Special Publication 800-53 (Security and Privacy Controls for Information Systems and Organizations): Control IA-5 deals with authenticator management. It highlights the importance of managing service accounts, including password policies and handling lockout conditions, as these are common points of failure for automated system integrations, precisely as described in this scenario.
Question 14 Choose 2
Which of the following items should be included in a vulnerability scan report? (Choose two.)
Show answerHide answer

Correct answer: D, E Affected hostsRisk score

Explanation

Summary
A vulnerability scan report is a technical document designed to communicate the specific findings of a security assessment to stakeholders who need to understand and remediate the risks. Its primary purpose is to detail what was found, where it was found, and how severe it is. Therefore, it must include a list of the systems affected by each vulnerability and a standardized metric that quantifies the severity of the finding to enable prioritization.

Correct Options

D. Affected hosts
This is a fundamental component of any vulnerability scan report. It provides the essential context of where the vulnerability is located. Without a list of specific IP addresses, hostnames, or asset tags, remediation teams cannot locate and fix the vulnerable systems. It answers the critical question: "Which servers, workstations, or devices are impacted?"

E. Risk score
A risk score, typically derived from the Common Vulnerability Scoring System (CVSS), provides a standardized, quantitative measure of a vulnerability's severity. This allows security teams and management to prioritize remediation efforts effectively, focusing on the most critical issues first (e.g., Critical and High severity vulnerabilities) to reduce risk most efficiently.

Incorrect Options

A. Lessons learned
This is an element of a post-incident report or a lessons-learned meeting following a security incident. It is a retrospective analysis of what went wrong in the response process and is not part of the standard output of a routine vulnerability scan.

B. Service-level agreement
A Service-Level Agreement (SLA) is a contractual document that defines the expected level of service between a provider and a customer. It is not a component of a technical findings report like a vulnerability scan report.

C. Playbook
A playbook is a predefined set of procedures for responding to a specific type of security incident or alert. It is an operational document used by the SOC for response, not a finding included in a vulnerability assessment report.

F. Education plan
An education or training plan is a strategic document for improving security awareness among staff. While vulnerability scan results might inform the topics of a training plan, the plan itself is not included within the scan report.

Reference
NIST Special Publication 800-40 (Guide to Enterprise Patch Management Technologies): While focused on patching, this guide emphasizes the importance of vulnerability assessment reports that include details on "the specific machines affected" (affected hosts) and "the severity of the vulnerabilities" (risk score) to enable effective and prioritized remediation.
Question 15 Choose 1
An organization conducted a web application vulnerability assessment against the corporate website, and the following output was observed:src="https://selfexamtraining.com/uploadimages/CS0-003-Qu1.jpg">
Which of the following tuning recommendations should the security analyst share?
Show answerHide answer

Correct answer: B Block requests without an X-Frame-Options header

Explanation

Explanation:

This question refers to the output of a web application vulnerability assessment, and while we can’t see the image directly (src="https://selfexamtraining.com/uploadimages/CS0-003-Qu1.jpg"), we can infer from the options that the assessment identified issues related to Cross-Origin Resource Sharing (CORS). Let’s break down the most likely diagnosis and tuning recommendation:

Understanding the Core Issue: CORS Misconfiguration

The key clue is:

One of the options is: “Configure an Access-Control-Allow-Origin header to authorized domains”

This strongly implies the vulnerability scan found that the server is either

Not setting the Access-Control-Allow-Origin header at all, or

Setting it too permissively (e.g., *), which allows any origin to access the web resource via browser requests

This is a security risk, especially for applications dealing with:

Session cookies

User data

Private APIs

Amisconfigured CORS policy can allow malicious domains to make unauthorized cross-origin requests to your application and steal sensitive data, like session tokens.

Correct Remediation:

Configure an Access-Control-Allow-Origin header to only allow requests from trusted, authorized domains.

This limits cross-origin requests to only domains you control or trust (e.g., your frontend application hosted on another subdomain).

References:
OWASP CORS Misconfiguration Guide

MDN - Access-Control-Allow-Origin

NIST SP 800-53 Rev. 5 - SC-18: Outlines secure access control enforcement

Summary:
The scan likely flagged overly permissive or missing CORS headers. To address this securely, the analyst should configure the Access-Control-Allow-Origin header to limit access only to authorized, trusted domains. Let me kn
Question 16 Choose 1
A company is deploying new vulnerability scanning software to assess its systems. The current network is highly segmented, and the networking team wants to minimize the number of unique firewall rules. Which of the following scanning techniques would be most efficient to achieve the objective?
Show answerHide answer

Correct answer: A Deploy agents on all systems to perform the scans

Explanation

Explanation:

The question asks for the most efficient scanning technique to assess systems in a highly segmented network while minimizing the number of unique firewall rules, as part of deploying new vulnerability scanning software. Deploying agents on all systems is the most efficient approach, as it allows scans to occur locally on each system without requiring network traffic to traverse segmented boundaries, thus minimizing the need for firewall rule changes. This aligns with the CS0-003 exam’s Vulnerability Management (Domain 2) and Security Operations (Domain 1) objectives, which emphasize efficient vulnerability scanning and network security configuration.

Why A is Correct:

Local Scanning: Agent-based scanning installs lightweight software on each system (e.g., endpoints, servers) to perform vulnerability scans locally. Results are sent to a central management server over a single, standardized protocol (e.g., HTTPS), requiring minimal firewall rules (e.g., one rule to allow outbound communication to the server).

Minimized Firewall Rules: Since scans occur on the host itself, no additional rules are needed for scan traffic to cross network segments, addressing the networking team’s goal of minimizing unique firewall rules in a highly segmented network.

Cross-Segment Efficiency: Agents work independently of network segmentation, as they don’t rely on external scanners reaching each segment, making them ideal for complex, segmented environments.

CS0-003 Alignment: Agent-based scanning supports comprehensive vulnerability assessments (Domain 2) and aligns with secure network operations (Domain 1) by reducing network exposure and simplifying firewall configurations.

Why Other Options Are Wrong:

B. Deploy a central scanner and perform non-credentialed scans

Reason: A central scanner requires network access to all systems across the segmented network to perform scans, necessitating multiple firewall rules to allow scan traffic (e.g., TCP/UDP ports for protocols like SMB, SSH, or SNMP) between the scanner and each segment. Non-credentialed scans rely on network probes, which are less accurate and still require extensive firewall rule configurations to reach all systems, conflicting with the goal of minimizing rules. This approach is inefficient in a highly segmented network due to the increased rule complexity.

C. Deploy a cloud-based scanner and perform a network scan

Reason: A cloud-based scanner operates externally, requiring inbound access to all systems or a VPN/gateway setup, which demands multiple firewall rules to allow scan traffic into each network segment. Network scans from the cloud are typically non-credentialed, offering limited visibility into system vulnerabilities and requiring open ports (e.g., 445, 22) across segments, significantly increasing the number of firewall rules. This approach is impractical for minimizing firewall changes in a segmented network.

D. Deploy a scanner sensor on every segment and perform credentialed scans

Reason: Deploying a scanner sensor in each network segment allows credentialed scans, which are more accurate, but requires configuring firewall rules for each sensor to communicate with systems within its segment and back to a central management server. In a highly segmented network, this could result in numerous rules (e.g., one per segment for scan traffic and management traffic), failing to minimize unique firewall rules. The overhead of deploying and maintaining sensors in every segment also reduces efficiency compared to agent-based scanning.

Additional Context:

Agent-Based Scanning: Tools like Tenable Nessus Agents, Qualys Cloud Agents, or Rapid7 InsightVM agents perform local scans and report results to a central server, typically over a single port (e.g., 443). This reduces firewall complexity, as only outbound rules are needed, regardless of network segmentation.

Segmented Network Challenge: Highly segmented networks use VLANs, firewalls, or subnets to isolate systems, making centralized or external scanning difficult due to the need for multiple rules to allow scan traffic across boundaries. CS0-003 Relevance:The exam tests vulnerability scanning strategies, including selecting tools and techniques that balance accuracy, efficiency, and network security. Agent-based scanning is a common recommendation for complex environments.

Reference:

CompTIA CySA+ (CS0-003) Exam Objectives, Domains 1 (Security Operations) and 2 (Vulnerability Management),covering vulnerability scanning techniques and network security considerations.

CompTIA CySA+ Study Guide: Exam CS0-003 by Chapple and Seidl, discussing agent-based vs. network-based scanning and firewall rule management.
Question 17 Choose 1
A cybersecurity analyst notices unusual network scanning activity coming from a country that the company does not do business with. Which of the following is the best mitigation technique?
Show answerHide answer

Correct answer: A Geoblock the offending source country.

Explanation

Explanation:

The question describes unusual network scanning activity originating from a foreign country where the company does not conduct any business. This makes the traffic both unsolicited and suspicious.

The best mitigation is to geoblock (geographically block) traffic from that entire country, which helps to: Proactively reduce attack surface from high-risk or irrelevant geolocations.

Eliminate future scans or attacks from the region.

Reduce the need for manual, ongoing IP-based blocking.

Since the company has no reason to accept traffic from that country, geoblocking is a clean, efficient, and effective solution.

Reference:
CompTIA CySA+ CS0-003 Objective 3.1 – Apply security solutions for infrastructure managem

NIST SP 800-41 Rev. 1 – Guidelines on Firewalls and Firewall Policy.

OWASP Security Logging and Monitoring suggests geolocation-based controls for anomalous traffic patterns.

Why the other options are less effective:

Block the IP range of the scans at the network firewall:

This could help, but attackers often rotate IPs or come from large, dynamic cloud blocks. It's less scalable than geoblocking.

Perform a historical trend analysis and look for similar scanning activity:

Good for investigation, but it’s passive, not a mitigation.

Block the specific IP address of the scans at the network firewall:

This is too narrow; attackers frequently change IPs, making this approach ineffective over time.

Summary:

Since the company does not interact with the country in question, geoblocking the entire region is the most efficient and effective mitigation technique to stop ongoing and future suspicious scanning activity Ask ChatGPT
Question 18 Choose 1
During a scan of a web server in the perimeter network, a vulnerability was identified that could be exploited over port 3389. The web server is protected by a WAF. Which of the following best represents the change to overall risk associated with this vulnerability?
Show answerHide answer

Correct answer: D The risk would increase because the host is external facing.

Explanation

Explanation:

The vulnerability scan revealed an issue exploitable over port 3389, which is commonly used for Remote Desktop Protocol (RDP) — not web services. The key points in the scenario are:

The vulnerable host is a web server in the perimeter network (i.e., externally accessible).

The system is protected by a Web Application Firewall (WAF).

The vulnerability affects port 3389 (RDP) — not web traffic.

Why the correct answer is: "The risk would increase because the host is external facing":

Because the host is accessible from the internet, any vulnerability exposed on an open port like 3389 represents a higher risk:

External exposure means attackers worldwide can attempt to exploit the vulnerability.

RDP has a long history of critical vulnerabilities and brute-force attacks.

A WAF only protects web-layer (HTTP/HTTPS) traffic, not RDP, so the vulnerability on port 3389 is not mitigated by the WAF.

As a result, having an unprotected, exploitable port open to the internet increases the likelihood of compromise, which increases the overall risk.

Reference:

NIST SP 800-30 Rev. 1 – Risk Assessment Guide for Information Technology Systems

NIST SP 800-30 Rev. 1 – Risk Assessment Guide for Information Technology Systems

Why the other options are incorrect:

"The risk would not change because network firewalls are in use":

If firewalls were effectively blocking RDP, it wouldn’t have shown up as exploitable in the scan. So, either firewalls aren't configured properly, or port 3389 is open — meaning risk is not neutralized.

"The risk would decrease because RDP is blocked by the firewall": The question doesn’t state that RDP is blocked. In fact, the scan found it vulnerable, suggesting it is open and reachable.
"The risk would decrease because a web application firewall is in place": A WAF only protects web applications (typically on ports 80/443), not RDP. Therefore, it does not reduce risk on port 3389.
Summary:

An external-facing host with a vulnerability on port 3389 poses increased risk, regardless of WAF protection, because the exposure to the public internet greatly increases the likelihood of attack — making "The risk would increase because the host is external facing" the correct and most complete answer.
Question 19 Choose 1
A security administrator needs to import Pll data records from the production environment to the test environment for testing purposes. Which of the following would best protect data confidentiality?
Show answerHide answer

Correct answer: A Data masking

Explanation

Explanation:

The question asks for the best method to protect the confidentiality of Personally Identifiable Information (PII) data records when importing them from a production environment to a test environment. Data masking is the most effective solution, as it obscures sensitive data (e.g., PII) while preserving its format and usability for testing, ensuring confidentiality. This aligns with the CS0-003 exam’s Security Operations (Domain 1) and Reporting and Communication (Domain 4) objectives, which emphasize protecting sensitive data and implementing secure data handling practices.

Why A is Correct:

Data Masking Overview: Data masking replaces sensitive data (e.g., names, Social Security numbers, credit card numbers) with realistic but fictitious values, maintaining the data’s structure and functionality for testing without exposing actual PII. For example, “John Doe” might become “Jane Smith,” or “123-45-6789” might become “987-65-4321.”

Confidentiality Protection: By altering PII, data masking ensures that even if the test environment is compromised, the exposed data is not real, safeguarding confidentiality.

Test Environment Suitability: Masked data retains the format needed for testing (e.g., valid field lengths or data types), allowing developers to test applications without accessing actual PII.

CS0-003 Alignment: The exam emphasizes secure data handling practices, including protecting PII during data transfers or testing, making data masking a standard approach for compliance with regulations like GDPR or HIPAA.

Why Other Options Are Wrong:

B. Hashing
Reason: Hashing transforms data into a fixed-length, irreversible value (e.g., SHA-256 hash) using a one-way function. While hashing protects data integrity and is useful for password storage, it renders data unusable for testing because the original format (e.g., a readable name or phone number) is lost. Test environments require data that mimics production data’s structure, which hashing cannot provide, making it unsuitable for this scenario.

C. Watermarking
Reason: Watermarking embeds identifiable markers into data (e.g., a digital signature or visible overlay) to track its origin or detect unauthorized use. It does not obscure or encrypt PII, so it fails to protect confidentiality. If a watermarked PII record is exposed in the test environment, the actual sensitive data remains at risk, making this option ineffective for the stated goal.

D. Encoding
Reason: Encoding (e.g., Base64) converts data into a different representation for transmission or storage but is easily reversible (e.g., decoding Base64 restores the original data). It provides no confidentiality, as anyone with access to the test environment can decode the PII, exposing sensitive information. Encoding is not a security measure and doesn’t meet the requirement to protect data confidentiality.

Additional Context:

PII and Test Environments: PII (e.g., names, addresses, SSNs) requires strict protection under regulations like GDPR, HIPAA, or CCPA. Importing unmasked PII into a test environment risks breaches, especially if the test environment is less secure than production.

Data Masking Techniques: Common methods include substitution (replacing data with fake values), shuffling, or anonymization, ensuring the data remains functional for testing. Tools like Informatica or Delphix support data masking for compliance.

CS0-003 Relevance: The exam tests secure data handling and risk mitigation, including protecting sensitive data during transfers or testing (Domain 1) and communicating compliance requirements (Domain 4).

Reference:

CompTIA CySA+ (CS0-003) Exam Objectives, Domains 1 (Security Operations) and 4 (Reporting and Communication),covering secure data handling and PII protection. CompTIA CySA+ Study Guide: Exam CS0-003 by Chapple and Seidl, discussing data masking as a best practice for protecting sensitive data in non-production environments.
Question 20 Choose 1
A vulnerability analyst received a list of system vulnerabilities and needs to evaluate the relevant impact of the exploits on the business. Given the constraints of the current sprint, only three can be remediated. Which of the following represents the least impactful risk, given the CVSS3.1 base scores?
Show answerHide answer

Correct answer: A AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:L - Base Score 6.0

Explanation

Explanation:

This question tests your ability to compare CVSS v3.1 base scores to determine risk impact, especially under remediation constraints

The goal is to identify the least impactful vulnerability — the one with the lowest overall risk — so it can be deferred.

CVSS v3.1 Base Score Overview:

The Common Vulnerability Scoring System (CVSS) uses the following vectors:

AV (Attack Vector) – How remote the attack can be.

AC (Attack Complexity) – How difficult it is to exploit.

PR (Privileges Required) – Level of access needed.

UI (User Interaction) – Whether user input is needed.

S (Scope) – Whether other systems or components are affected.

C/I/A (Confidentiality, Integrity, Availability impact) – Degree of impact (None, Low, High).

Why Option A (Base Score 6.0) is Least Impactful:

Vector Breakdown: AV:N – Network (can be exploited remotely)

AC:H – High complexity (makes exploitation difficult)

PR:H – High privileges required (attacker must already be privileged)

UI:R – Requires user interaction

S:U – Scope is unchanged (limited to the same component)

C:H/I:H/A:L – High confidentiality & integrity impact, low availability impact

Despite high C and I impact, the high attack complexity, high privileges required, and required user interaction make exploitation unlikely in real-world terms.

Comparison to Other Options:

Option B (7.2) – Has scope changed (S:C) and no user interaction, so it's more impactful.

Option C (6.4) – Similar to A, but higher availability impact, so more risk.

Option D (6.5) – Requires no privileges and no user interaction, making it easier to exploit despite low impact values.

Summary:

The lowest-risk option — considering both CVSS score and exploit conditions — is:

AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:L — Base Score 6.0

This is the least impactful risk and can be safely deprioritized for remediation this sprint

Reference:

CVSS v3.1 Specification

CompTIA CySA+ CS0-003 Objective 2.5 – Interpret the output from vulnerability scans.
Full mock exam

Sit the CS0-003 exam before exam day

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

Get full CS0-003 mock exam
  • 85questions per mock
  • 165 mintime limit
  • 506questions in the bank
  • Newmock on every attempt