# Free CS0-004 practice questions

> 10 free CS0-004 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/comptia-cs0-004/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/comptia-cs0-004/

### Question 1 of 10

An analyst sees DNS queries from a server such as 4a6f686e2d7061.exfil-cdn.net, 73737764206c69.exfil-cdn.net, and hundreds more with long hexadecimal subdomains, each queried only once. What is the MOST likely explanation and the BEST detection approach?

- A. Domain generation algorithm for C2; block only the specific queried hostnames
- B. Content delivery network cache busting; allowlist the parent domain in the internal DNS resolver
- C. DNS amplification attack; rate-limit recursive responses on the resolver
- D. DNS tunneling for exfiltration; alert on unique, high-entropy subdomains of one domain

**Answer:** D

**Explanation:** Encoded data packed into many unique, high-entropy subdomains of a single parent domain is characteristic of DNS tunneling used for exfiltration, so detection should focus on entropy, query volume, and uniqueness per parent domain. CDN cache busting does not encode hex data this way. DNS amplification abuses responses to flood victims, and DGA malware rotates parent domains rather than encoding data under one; blocking individual hostnames would also fail because each is used once.

### Question 2 of 10

Authentication logs show 400 different user accounts each failing to log on exactly once within ten minutes, all from the same external IP address and all against the VPN portal. Which attack does this MOST likely represent?

- A. Pass-the-hash lateral movement
- B. Brute-force guessing against one account
- C. Password spraying
- D. Credential stuffing with breached username-password pairs

**Answer:** C

**Explanation:** Trying one or two common passwords across many accounts, with very few attempts per account to avoid lockout, is the signature of password spraying. Credential stuffing replays breached username-password pairs and typically produces a mix of successes and per-account retries. Brute force tries many passwords against a single account, and pass-the-hash reuses an NTLM hash for lateral movement rather than generating failed logons at a portal.

### Question 3 of 10

An organization is concerned that attackers could tamper with the training data used by its in-house machine learning model that scores login risk, causing it to treat attacker logins as normal. Which risk is this, and which control BEST mitigates it?

- A. Model inversion; add more GPUs so the model can be trained much faster on fresh data
- B. Data poisoning; validate the provenance of training data and monitor model drift
- C. Prompt injection; require all users to type their passwords twice at each login attempt to the portal
- D. Hallucination; switch the model to produce free-text explanations instead of risk scores

**Answer:** B

**Explanation:** Manipulating training data to skew a model's behavior is data poisoning, mitigated by controlling data sources, validating data integrity, and monitoring for unexpected drift in model outputs. Model inversion extracts training data from a model, hallucination concerns generative output, and prompt injection targets instruction-following models; none of their stated mitigations addresses tampered training data.

### Question 4 of 10

A scan report flags a critical OpenSSL vulnerability on a Linux server. The administrator confirms that the server's package manager shows a backported fix applied, although the version string is still older than the fixed upstream release. How should the analyst classify the finding?

- A. True positive that requires upgrading OpenSSL to the newer upstream release on every affected server
- B. False negative that indicates the scanner missed other related flaws
- C. True negative because the server has no OpenSSL package installed
- D. False positive caused by version-based detection that ignores the vendor backport

**Answer:** D

**Explanation:** Many Linux distributions backport security fixes without changing the upstream version number, so a scanner that relies on the version string reports a false positive. Upgrading to the upstream release is unnecessary because the fix is already present. A false negative is a missed real issue, and a true negative would mean the scanner correctly reported nothing, which is not what happened.

### Question 5 of 10

A web application returns a different user's invoice when an authenticated user changes the URL from /invoice?id=1043 to /invoice?id=1044. Which vulnerability is present?

- A. Cross-site request forgery
- B. Reflected cross-site scripting
- C. Insecure direct object reference
- D. Server-side request forgery (SSRF)

**Answer:** C

**Explanation:** Accessing another user's record by changing an identifier without an authorization check is an insecure direct object reference, a form of broken access control. CSRF tricks a victim's browser into submitting unwanted requests. SSRF makes the server fetch attacker-chosen URLs, and reflected XSS injects script into responses; neither describes this behavior.

### Question 6 of 10 (choose 2)

A legacy medical device runs an unsupported operating system with a critical remote code execution flaw, and the manufacturer will not release a patch. The device must stay in service for two more years. Which combination is the BEST risk treatment? (Choose two.)

- A. Place the device on a segmented network that only allows required traffic
- B. Document a formal risk exception with an owner and review date
- C. Transfer the risk by moving the device's data to a public cloud bucket
- D. Apply the manufacturer's last available firmware and close the finding
- E. Disable vulnerability scanning of the device to avoid noisy findings

**Answer:** A, B

**Explanation:** When a flaw cannot be patched, compensating controls such as strict segmentation reduce exposure, and a documented exception with an owner and review date makes the accepted residual risk visible. The last available firmware does not contain a fix, so closing the finding misstates the risk. Suppressing scans hides the risk rather than treating it, and moving data to a cloud bucket does not transfer the risk of the device itself being exploited.

### Question 7 of 10 (choose 2)

Which TWO items should be recorded in an incident timeline to support later analysis and reporting? (Choose two.)

- A. The personal opinions of responders about who is to blame
- B. Only the events that occurred after the incident was declared
- C. Only events confirmed by two independent log sources, with all others omitted
- D. The source of each event, such as the log or system it came from
- E. Timestamps normalized to a single time zone such as UTC

**Answer:** D, E

**Explanation:** A useful timeline normalizes timestamps to one time zone so events from different systems line up, and records the source of each event so it can be verified. Responder opinions about blame are not evidence. Restricting the timeline to post-declaration events omits the attacker's earlier activity, and dropping every single-source event discards valid evidence that should instead be marked with its confidence.

### Question 8 of 10

An organization's incident response plan names a single person as the only one authorized to approve containment actions. During a weekend incident, that person is unreachable for 9 hours while ransomware spreads. Which plan improvement BEST addresses this?

- A. Provide the authorized person with a satellite phone and a backup pager for on-call duty
- B. Add a rule that containment waits until the authorized person can be reached by phone
- C. Define delegated authority and an escalation chain with pre-approved containment actions
- D. Remove all approvals so that any analyst can take any containment action without coordination

**Answer:** C

**Explanation:** Delegated authority, backups in an escalation chain, and pre-approved actions for common scenarios ensure decisions can be made quickly when a key person is unavailable. Better communication devices do not eliminate the single point of failure, and waiting for that one person repeats the delay. Removing all approvals invites uncoordinated disruptive actions.

### Question 9 of 10

An incident report will be shared with a partner organization that was also targeted. Which practice is MOST appropriate before sharing?

- A. Sanitize sensitive internal data and label the report with Traffic Light Protocol markings
- B. Share the full internal report, including employee names and internal IP addresses, to save time
- C. Share nothing because sharing incident information is never permitted by law
- D. Share only the IOCs, but include the internal hostnames where each was found

**Answer:** A

**Explanation:** Sanitizing internal and personal details and labeling the report with TLP communicates handling restrictions while enabling useful sharing. Sharing everything exposes sensitive data, and attaching internal hostnames to the indicators leaks network details the partner does not need. Sharing is often permitted and encouraged, so refusing entirely gives up useful collaboration.

### Question 10 of 10

A CISO wants a metric that shows how quickly the organization fixes vulnerabilities after they are discovered, to compare performance against internal service-level objectives. Which metric is BEST?

- A. Mean time to remediate
- B. Total number of scanned assets
- C. Number of open firewall rules
- D. Mean time between failures

**Answer:** A

**Explanation:** Mean time to remediate measures the average time between discovering a vulnerability and fixing it, which maps directly to remediation SLOs. The number of scanned assets shows coverage, not speed. Firewall rule counts relate to configuration hygiene, and MTBF is a reliability metric for hardware or systems.

Ready for a timed run? Take the free 15-question CS0-004 mini exam: https://devopscodelab.com/app/exams/comptia-cs0-004/mini/

DevOpsCode Lab is not affiliated with CompTIA. CS0-004 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
