ECCouncil 312-50v13 (Certified Ethical Hacker v13) Practice Test 28

Question 270

A defender analyzing an approved exercise sees this pattern: A Linux host regularly launches a suspicious shell script under a service account after an unexpected new crontab entry appears. Which mechanism is most consistent with it?

  1. Scheduled-task persistence
  2. Cron-job persistence
  3. Registry Run-key persistence
  4. SSH authorized-key persistence

Explanation

Correct Answer

B:

Cron executes scheduled commands under a designated user context, so a malicious job can survive session termination and run unattended. For a production safeguard, operators can audit crontabs and apply least privilege to scheduler files; trusted task baselines and restricted edit permissions make unauthorized scheduled execution easier to detect and harder to establish.

Incorrect Answers

A:

Scheduled tasks can execute code on triggers or schedules without keeping the original user session alive, making them a possible persistence mechanism; the case demonstrates cron-job persistence rather than the alternate mechanism.

C:

Run keys cause configured programs to launch during user logon; they can maintain user-context execution across reboots without replacing a system service; the test record points specifically to cron-job persistence, not this separate mechanism.

D:

SSH public-key authentication trusts allowed public keys in account configuration; adding an unapproved key can preserve remote access independent of password rotation; that behavior is distinct from the cron-job persistence finding being classified.

Question 271

An authorized security review documents this behavior: After an authorized password audit exports a hash database, the analyst tests candidate secrets locally without sending login requests. Which mechanism best accounts for the finding?

  1. SSH authorized-key persistence
  2. Offline password hash attack
  3. Password spraying
  4. Kerberoasting

Explanation

Correct Answer

B:

Offline cracking compares computed candidate hashes with stored password verifiers; network account lockouts do not normally constrain the local comparison process. The appropriate hardening measure is to use salted memory-hard password hashing and strong password policy, since per-account salts defeat precomputed hash tables, while expensive password hashing slows each offline guess after a database leak.

Incorrect Answers

A:

SSH public-key authentication trusts allowed public keys in account configuration; adding an unapproved key can preserve remote access independent of password rotation; the observed evidence concerns offline password hash attack instead.

C:

Password spraying distributes a small candidate set across many usernames to evade per-account lockout thresholds, unlike repeated guessing against one user; that behavior is distinct from the offline password hash attack finding being classified.

D:

Kerberoasting targets service-ticket data encrypted using service-account secrets; a service password guess can be checked without repeatedly logging in to the service; the scenario identifies offline password hash attack, which has a different triggering condition.

Question 272

A security change request summarizes the problem as follows: An iPhone app requests access to a restricted operating-system feature not included in its provisioning profile, despite being signed by a recognized development team. Which remediation is best suited to it?

  1. Review provisioning entitlements and use only approved capabilities
  2. Use device attestation and restrict access from unsupported rooted endpoints
  3. Restrict risky overlay and accessibility grants and monitor suspicious apps
  4. Check platform integrity and limit high-risk access from modified devices

Explanation

Correct Answer

A:

Least-capability provisioning reduces unnecessary platform privileges and clarifies which features the operating system should allow. The technical basis for the recommendation is that iOS entitlements specify permitted platform capabilities and form part of the code-signing trust model; a valid signature does not grant every protected operation.

Incorrect Answers

B:

Integrity checks and conditional access prevent high-trust applications from assuming ordinary platform protections remain intact on modified devices; the proposed improvement would make sense for rooted Android exposure but not as the main fix here; the tested fault instead involves iOS entitlement control.

C:

Platform safeguards and application controls reduce the ability of one app to draw deceptive credential forms over another; the specific root cause belongs to iOS entitlement control, beyond this control's intended scope.

D:

Device posture controls keep sensitive services from relying on security guarantees a jailbroken host may no longer provide; that change targets jailbroken iOS risk, while the confirmed weakness involves iOS entitlement control.

Question 273

A defender analyzing an approved exercise sees this pattern: An API lets callers choose an output column, but the database driver cannot parameterize a table or column name as a value. Which mechanism is most consistent with it?

  1. Dynamic SQL identifier control
  2. Second-order SQL injection
  3. Time-based blind SQL injection
  4. Stacked query injection

Explanation

Correct Answer

A:

Prepared-statement parameters represent data values, not arbitrary SQL identifiers; dynamic object names must be chosen through trusted code. A targeted mitigation is to map requested identifiers to an explicit approved field list; allowlisting identifiers preserves flexible reports without concatenating arbitrary client text into SQL grammar positions.

Incorrect Answers

B:

Second-order injection occurs when previously stored untrusted data becomes executable SQL syntax in a later, different processing step; the scenario identifies dynamic SQL identifier control, which has a different triggering condition.

C:

Time-based blind injection infers a condition through deliberate execution-time differences when application output conceals query results and errors; the defining symptom in the prompt is associated with dynamic SQL identifier control instead.

D:

Stacked SQL injection relies on executing additional statements in the same request, a capability controlled by database and connector behavior; the events given do not establish this behavior but do support dynamic SQL identifier control.

Question 274

A security change request summarizes the problem as follows: An adversary leverages internet-exposed time-service diagnostics to make third-party NTP servers generate disproportionately large replies toward a spoofed target. Which remediation is best suited to it?

  1. Normalize cache keys and rate-limit expensive uncached operations
  2. Set request-body timeouts and minimum transfer rates
  3. Update NTP software and disable unnecessary monitoring commands
  4. Enforce header completion timeouts and concurrency limits
  5. Arrange upstream DDoS diversion and tested failover routes

Explanation

Correct Answer

C:

Patched and restricted control interfaces remove the oversized response path while preserving legitimate network time service. It directly addresses this mechanism: NTP amplification historically abused diagnostic commands that returned disproportionate data to spoofed-source requests; modern implementations restrict these interfaces.

Incorrect Answers

A:

Cache configuration and request controls reduce origin amplification from meaningless parameter variations while preserving valid user queries; this is relevant to a separate cache-busting request flood scenario, rather than the identified exposure; the tested fault instead involves NTP amplification.

B:

Body-read deadlines prevent many idle upload sessions from indefinitely consuming server processing capacity; the tested weakness is NTP amplification, not the slow HTTP POST configuration addressed here.

D:

Short header deadlines and bounded connection slots release resources from clients that never submit a complete request; the proposed improvement would make sense for slowloris header exhaustion but not as the main fix here; the tested fault instead involves NTP amplification.

E:

Filtering before the narrow enterprise link prevents congestion that local appliance policies cannot resolve after bandwidth is exhausted; the specific root cause belongs to NTP amplification, beyond this control's intended scope.

Question 275

The testing team seeks a specific preventive recommendation for this finding: After a configuration update, the affected application still returns the original vulnerable behavior although the deployment dashboard shows the change marked successful. What should be implemented?

  1. Validate the vendor patch backport before closing the finding
  2. Map CVEs to affected versions and verified remediation advisories
  3. Correct hardening drift and retest benchmark controls
  4. Verify the affected asset and original attack condition after the change

Explanation

Correct Answer

D:

A targeted retest confirms both patch applicability and the closure of the particular finding instead of accepting ticket state as technical proof. The technical basis for the recommendation is that remediation status is not equivalent to demonstrated vulnerability removal; deployment failures, missed nodes, or compensating paths can leave exposure.

Incorrect Answers

A:

Distribution advisories and package changelogs can confirm fixed code despite an unchanged upstream version string; blind dismissal would also be unsafe; that change targets false-positive scanner finding, while the confirmed weakness involves remediation retest.

B:

Version matching and vendor guidance establish whether an asset is exposed and which update or workaround addresses that vulnerability; it would improve CVE identifier, not directly correct the reported remediation retest issue.

C:

Turning off unnecessary services and tightening audit policies addresses exposure that patch installation alone cannot remove; the measure addresses a different trust boundary from the remediation retest finding.

Question 276

A control review considers a verified technical issue: A warehouse still relies on an old broadcast hostname lookup protocol that lets any device on its subnet announce a false file-server address. Which mitigation most directly addresses its cause?

  1. Trust only approved DHCP uplinks through switch DHCP snooping
  2. Use DNSSEC validation where supported and restrict resolver recursion
  3. Disable legacy broadcast name resolution where business applications permit
  4. Enable RA Guard and monitor authorized IPv6 routers

Explanation

Correct Answer

C:

Reducing NBNS dependence prevents unauthenticated local responses from steering clients toward an impersonated file or authentication service. It targets the actual failure mode: NetBIOS name-service broadcasts can be answered by untrusted local peers when stronger authenticated name resolution is unavailable.

Incorrect Answers

A:

Filtering server replies on user-facing ports prevents unauthorized devices from assigning gateway and resolver settings to clients; the exposure here is NetBIOS name-service spoofing, which calls for another protective mechanism.

B:

Cryptographic validation rejects forged signed data, while scoped recursion and query protections narrow the attack surface of caching resolvers; the action is aimed at DNS resolver poisoning; it leaves the central NetBIOS name-service spoofing condition unresolved.

D:

Switch filtering for unauthorized advertisements protects host routing decisions while retaining legitimate IPv6 neighbor and router discovery; the tested weakness is NetBIOS name-service spoofing, not the IPv6 router-advertisement spoofing configuration addressed here.

Question 277

A follow-up review must reduce the risk revealed here: A single-page application copies an attacker-controlled URL fragment into a DOM HTML parsing API without routing the value through the backend server. Which defensive measure fits the specific failure mode?

  1. Require unpredictable anti-CSRF tokens for state-changing requests
  2. Validate content and store uploads outside executable web paths
  3. Replace unsafe DOM sinks with text-safe APIs and validate client data
  4. Disable DTD and external entity resolution for untrusted XML

Explanation

Correct Answer

C:

Using textContent or safe templating blocks markup interpretation even when attacker-controlled fragments never pass through the server. This matters for the observed attack path because DOM XSS occurs when client-side JavaScript moves untrusted data into a dangerous DOM sink; the server response may be static.

Incorrect Answers

A:

Per-session tokens and origin checks bind sensitive operations to legitimate application flows beyond the presence of browser cookies; the proposed improvement would make sense for cross-site request forgery but not as the main fix here; the tested fault instead involves DOM-based cross-site scripting.

B:

Re-encoding images, controlled file types, and nonexecutable storage prevent uploaded content from becoming server-executed code; the specific root cause belongs to DOM-based cross-site scripting, beyond this control's intended scope.

D:

Secure parser settings stop attacker-supplied XML from loading external resources while preserving ordinary document parsing; it would improve XML external entity processing, not directly correct the reported DOM-based cross-site scripting issue.

Question 278

The assessor confirmed this exposure: An ISP compares forged-source query traffic with replies from external responders and finds no response-size gain even though the flood is directed at an unrelated third party. Which change most directly closes the underlying security gap?

  1. Set request-body timeouts and minimum transfer rates
  2. Implement anti-spoofing filtering at source networks
  3. Normalize cache keys and rate-limit expensive uncached operations
  4. Rate-limit unnecessary ICMP echo handling while preserving essential ICMP messages

Explanation

Correct Answer

B:

Source-validation filters block forged victim addresses that make reflection possible, regardless of whether the protocol magnifies packet size. This matters for the observed attack path because reflection redirects response traffic to a spoofed victim by exploiting unauthenticated protocols; amplification additionally requires a favorable response-size ratio.

Incorrect Answers

A:

Body-read deadlines prevent many idle upload sessions from indefinitely consuming server processing capacity; the required correction concerns reflection without amplification, so this is not the targeted control.

C:

Cache configuration and request controls reduce origin amplification from meaningless parameter variations while preserving valid user queries; the exposure here is reflection without amplification, which calls for another protective mechanism.

D:

Targeted control-plane policing protects diagnostics capacity without breaking indispensable errors such as path-MTU feedback; the action is aimed at ICMP flood; it leaves the central reflection without amplification condition unresolved.

Question 279

As part of a sanctioned audit, a reviewer observes: A firewall drops new legitimate connections because its session table is full, even though the destination application has available CPU. Which behavior is illustrated?

  1. TCP SYN flood
  2. Slow HTTP POST
  3. State-table exhaustion
  4. Slowloris header exhaustion

Explanation

Correct Answer

C:

State exhaustion targets the intermediary's connection-tracking resources, not necessarily the backend server or its application request queue. On affected systems, it is useful to tune state limits and apply connection-rate controls before the firewall; protection must preserve session-table capacity at the device handling flows; scaling application workers alone leaves this bottleneck intact.

Incorrect Answers

A:

A SYN flood consumes connection-state resources before handshakes complete; spoofed or unresponsive source addresses can aggravate backlog exhaustion; this would classify another type of evidence, whereas the actual finding shows state-table exhaustion.

B:

Slow POST attacks exhaust server resources during body receipt, distinct from attacks that hold connections open through incomplete headers; the relevant mechanism in the observed workflow is state-table exhaustion instead.

D:

Slowloris-style attacks tie up connection slots by slowly transmitting incomplete HTTP request headers, exploiting permissive timeout behavior; the case demonstrates state-table exhaustion rather than the alternate mechanism.

Question 280

The asset owner wants to stop the verified condition recurring: An edge cache stores personalized financial summaries under one shared cache key and sometimes returns the previous account holder's private response to another visitor. What is the most targeted improvement?

  1. Canonicalize paths and enforce a fixed document root before file access
  2. Set a safe default virtual host and validate expected hostnames
  3. Mark sensitive responses private or no-store and review cache keys
  4. Disable obsolete TLS protocols and weak ciphers after compatibility testing

Explanation

Correct Answer

C:

Correct cache behavior prevents personal content from being reused for unrelated clients even when the backend authorization check was sound. This matters for the observed attack path because incorrect HTTP caching directives or cache keys can mix authenticated responses across users when intermediaries ignore session-specific variation.

Incorrect Answers

A:

Resolving canonical paths and checking containment prevents encoding tricks from reaching files outside the approved static content tree; it would improve static-file path traversal, not directly correct the reported sensitive response caching issue.

B:

Explicit host routing prevents arbitrary names from reaching sensitive virtual hosts or generating unsafe absolute links; the measure addresses a different trust boundary from the sensitive response caching finding.

D:

Modern negotiation reduces transport cryptographic exposure while inventorying client requirements prevents avoidable service outages; its security benefit applies principally to legacy TLS configuration, not the defect described; the tested fault instead involves sensitive response caching.

Certified Ethical Hacker v13 (312-50v13) Practice Tests