CompTIA SY0-701 Practice Test 12
Question 110
Employees enter the correct banking hostname, yet their resolver supplies an unfamiliar IP address leading to a fake authentication website. The local cache was poisoned. Which attack is occurring?
- An ARP spoofing event changing only the local default-gateway MAC address without modifying any DNS answer
- A BGP route hijack changing Internet reachability without replacing the cached hostname-to-address record
- A forged web-session cookie changing application authentication state while DNS resolution remains correct
- DNS answer manipulation redirecting a legitimate name to an attacker-controlled address
Explanation
Correct Answer
D:Poisoned DNS cache records can map a familiar, correctly typed domain name to an address chosen by an attacker. The victim reaches a fraudulent site because the resolver returned false address information, not because the user mistyped the hostname. Investigators should examine resolver response sources, relevant cache entries and the HTTPS certificate identity; a matching hostname alone does not authenticate the site.
Incorrect Answers
A:ARP spoofing can substitute a Layer 2 next hop for an IP address on a local broadcast network, potentially enabling interception. The option explicitly does not modify DNS answers. The reported difference is a poisoned hostname-to-IP cache mapping, which points instead to name-resolution tampering even though several attacks can produce related interception symptoms.
B:BGP hijacking can send packets along an unauthorized routing path after normal name resolution has selected an address. It does not itself edit the specific DNS cache record described in the stem. The observation that the resolver supplies an unfamiliar IP for the trusted hostname is therefore more direct evidence of DNS answer manipulation than route advertisement abuse.
C:A forged session cookie can impersonate an authenticated browser session or alter application authorization context. That affects application-layer identity, not the DNS resolver’s address mapping. The scenario explicitly names a poisoned local cache and malicious returned address; cookies do not explain that lower-level redirection mechanism.
Question 111
A managed laptop sees the familiar company SSID, but its 802.1X authentication prompt presents an unexpected EAP authentication-server certificate and offers a “connect anyway” choice. Which action best protects the employee’s authentication material?
- Reject the untrusted certificate and use the managed profile that validates the approved authentication-server identity and issuing CA
- Disable 802.1X authentication and type the company password into an unknown captive-portal page
- Trust the certificate automatically whenever the access point claims an enterprise vendor MAC-address prefix
- Proceed because a matching SSID is sufficient proof that the authentication server belongs to the organization
Explanation
Correct Answer
A:The enterprise Wi-Fi profile should verify the EAP authentication-server certificate chain and the expected server identity before user credentials are submitted. An unexpected certificate may mean a misconfigured legitimate service or an evil-twin network; accepting it blindly could expose credential exchanges. Stop the connection and have IT validate the approved profile and certificate replacement through a trusted channel.
Incorrect Answers
B:A captive portal is not a substitute for enterprise 802.1X authentication and does not establish that the requesting site is the corporate identity service. Turning off EAP validation while entering credentials into a newly displayed page gives a potential impersonator a direct password collection path. A legitimate certificate incident needs managed configuration repair, not a downgrade to an unknown web form.
C:An access point MAC prefix can be copied or changed, and vendor manufacturing identifiers do not authenticate the EAP server on the network. The risk here is a certificate identity mismatch during the authentication exchange, which must be evaluated against trusted certificate authorities and server names. Even a genuine branded access point can be configured to forward to an unapproved authentication system.
D:The SSID is a broadcast network name rather than a cryptographic proof of service ownership. An attacker can advertise the same SSID and present a different EAP server certificate to lure an employee. If the endpoint ignores the certificate mismatch, it may send sensitive authentication material to an untrusted server despite showing the familiar wireless name.
Question 112
A workstation reports a new gateway MAC after an unsolicited ARP reply, and its browser simultaneously warns that the expected HTTPS service certificate changed. Before assuming an on-path attack is confirmed, what evidence should investigators correlate?
- Confirm the gateway IP-to-MAC ownership against switch and trusted gateway data and validate the observed TLS certificate chain and hostname
- Treat the unfamiliar certificate as trustworthy because the IP address of the server is unchanged
- Delete the workstation’s disk encryption recovery key to reset the network ARP cache
- Assume any ARP announcement is malicious without investigating legitimate gateway failover or network reconfiguration
Explanation
Correct Answer
A:A changed ARP mapping may arise from failover, maintenance or spoofing; a TLS certificate warning can separately arise from lawful renewal or an on-path proxy. Verify the gateway IP and MAC against managed switch CAM/ARP information and the authorized gateway, then check the peer certificate issuer, validity and hostname. Concordant unexpected observations would strengthen an on-path hypothesis; either anomaly alone is not proof.
Incorrect Answers
B:Keeping the same remote IP address does not establish trust in a newly presented TLS identity. If the server certificate is untrusted or for the wrong hostname, an on-path device or misconfigured proxy may be presenting another endpoint. The certificate must be validated against the intended name and trust chain before the user treats the HTTPS connection as authentic.
C:Disk encryption recovery keys protect access to data stored on the drive; changing or destroying one does not clear a network interface ARP cache. Such a step could lock the organization out of its own encrypted endpoint without preserving useful evidence. Investigators should inspect the neighboring-device mapping and TLS handshake facts associated with this alert.
D:Unsolicited ARP announcements can be legitimate, for example after a high-availability gateway takes over or an administrator changes interface hardware. Classifying each as hostile would create false incidents and still fail to identify the responsible network device. Check switch-port provenance, expected virtual MAC behavior and the certificate change before declaring a malicious man-in-the-middle.
Question 113
An SSO application accepts a recorded authentication assertion a second time from a different workstation without checking freshness or rejecting reused identifiers. Which TWO statements are true? Choose TWO.
- The assertion must be safe because it was valid when originally issued
- One-time identifiers, freshness windows or nonce validation could help prevent acceptance of old assertions
- Require only a trusted TLS channel for the current SSO exchange, and assume a recorded valid assertion cannot later be reused by the application
- Verify only the identity provider signature on the assertion and assume that signature proves the assertion has never been used before
- The behavior indicates a replay weakness in session or assertion validation
Explanation
Correct Answers
B:A relying party can enforce short validity windows, acceptable clock skew, one-time assertion identifiers or request-bound nonces as appropriate for its protocol. A cache of used identifiers can block a previously accepted assertion from working twice. These checks complement, rather than replace, signature verification and correct audience binding; the observed failure is at the freshness/reuse boundary.
E:Acceptance of a recorded login assertion as if it were a fresh proof is a replay weakness. The second workstation does not need the original user to authenticate again if the relying party fails its reuse checks. Restricting assertion lifetimes and tying responses to intended requests are ways of breaking this reuse path while keeping normal federation functioning.
Incorrect Answers
A:The signature on an assertion may show that the issuer created it and that its contents were not changed, but integrity does not prove it is fresh or unique. If the relying party accepts a previously used assertion from another workstation, an attacker can reuse a valid credential artifact outside its intended transaction. The application must validate audience, time restrictions and replay state.
C:TLS authenticates and protects the transport connection while the assertion is transmitted, but it does not by itself make a copied assertion invalid if an application later accepts it in another transaction. Once the token has been recorded, the relying party needs expiry, recipient, request-binding and replay checks. Transport security complements rather than substitutes for those validations.
D:A valid issuer signature helps establish assertion integrity and provenance, but the same signed bytes can still be presented repeatedly. It does not encode a server-maintained consumed-token state or guarantee freshness by itself. Check the assertion identifier, allowed time, audience and request correlation before accepting a second presentation.
Question 114
A staging application’s search parameter can alter a backend SQL query, and its database service account also has permission to delete every customer table. Which remediation combination addresses both exploit entry and potential blast radius?
- Hide SQL error messages only while continuing to concatenate user-controlled parameters into executable queries
- Use parameterized statements for untrusted values and reduce the database service identity to required permissions
- Move the SQL server to an undisclosed port while keeping the same dynamic query concatenation and administrator credentials
- Encrypt only the database backups and assume live injection and excessive SQL privileges become harmless
Explanation
Correct Answer
B:Prepared or parameterized statements bind untrusted search values as data so those values cannot become new SQL keywords or predicates. Restricting the application database identity to the required tables and actions limits damage even if some flaw survives. Both changes are needed here because the stem identifies an injection entry point and an excessive privilege scope.
Incorrect Answers
A:Suppressing SQL error output can reduce information disclosed to an attacker, but the application would still let a search string change executable SQL syntax. Concealing failures also leaves the database account capable of dropping tables if injection succeeds. Remediation must separate parameter values from query structure and constrain the service account to its needed operations.
C:Moving the listener to a less obvious port changes discoverability but does not make concatenated input safe. Once the app reaches its SQL service, malicious search parameters can still alter query semantics; a database administrator identity magnifies impact. Port changes may be an operational setting, but they do not address either root condition in the question.
D:Encrypting backup copies protects them if backup media leaks, but the live application still executes the vulnerable SQL queries against the online database. A successful attacker could read or delete data using the overly privileged service role. Backups assist recovery after damage; they do not prevent injection or satisfy least-privilege design.
Question 115
A web-server access log contains requests to /download?file=../../etc/passwd. The endpoint resolves paths without constraining them to an approved directory. Which defect is most directly targeted?
- Directory traversal allowing access outside the intended document root
- Broken object-level authorization permitting access to another user’s file within the approved document root
- SQL injection against a file-metadata query rather than a filesystem path
- An open redirect that navigates the browser to an attacker-controlled URL
Explanation
Correct Answer
A:The sequence./ asks the operating system to step into a parent directory. When the download handler concatenates or resolves that input without a containment check, it may reach files outside the intended download root, such as a system password listing. Canonicalize the path and enforce that its resolved location remains under an allowlisted directory.
Incorrect Answers
B:Broken object-level authorization concerns whether an authenticated requester may access a particular object, even if the object sits inside the intended directory. Here the attack string attempts to escape the allowed directory itself by using parent-directory components. File-level permissions still matter, but the direct defect in the stem is path traversal.
C:SQL injection would involve untrusted input influencing a database query’s executable syntax. The example uses filesystem path separators and the parent-directory token./ to reach a local file, with no evidence that the parameter is embedded into SQL. Fix the path resolver and directory boundary rather than treating it as a database query flaw.
D:An open redirect makes the application send a client to an untrusted URL, typically by controlling a redirect target. The displayed payload requests a local filesystem path and is processed by a download handler. The issue is unauthorized file access caused by path resolution, not navigation to another web origin.
Question 116
An ordinary support account calls an administrative API method and succeeds even though its role does not include that permission. No elevated credential was issued. Which security failure occurred?
- An authentication bypass in which a request without any valid user session can call the administrative API
- A broken authorization check enabling privilege escalation or access control bypass
- Session fixation caused by an attacker choosing the initial session ID for the support user
- Cross-site request forgery that tricks a logged-in administrator into submitting the method
Explanation
Correct Answer
B:The API executed a privileged method for an account with insufficient permissions, indicating missing or ineffective server-side authorization. The attacker did not acquire a legitimate elevated role; the system failed to enforce the access rule. Server-side policy checks should gate each sensitive method and object, and tests should verify that lower-privilege roles are denied.
Incorrect Answers
A:Authentication bypass would mean the caller needed no valid user identity to reach the API. The scenario identifies an ordinary support account making the call; the identity was established but was not privileged. The failure is not that the API could not identify its caller, but that it failed to enforce the role restriction on this particular method.
C:A session fixation flaw involves inducing a user to authenticate with a session identifier controlled or predetermined by an attacker. Nothing in the stem mentions session ID assignment, reuse or hijacking. The authenticated user is already identified as support staff; the failure is that the backend allowed an administrative operation despite that role.
D:Cross-site request forgery abuses an authenticated browser to submit a state-changing request without the user’s intent. In this scenario the support account directly invokes the administrative API and the core observation is that its role lacks permission. Even without a forged request or tricked browser, server-side authorization should refuse the call.
Question 117
An authenticated employee opens an attacker-controlled web page. Hidden elements cause the browser to submit an account-email change to the company portal using the employee's existing session. Which THREE statements are correct? Choose THREE.
- The exploit must involve a SQL injection bug in the portal database
- Anti-CSRF tokens and appropriate SameSite-cookie policy are relevant defenses
- The malicious site must possess the employee's plaintext password for this class of attack
- The user's valid session may be misused to authorize an unwanted state-changing request
- This is consistent with cross-site request forgery against an authenticated browser
- Enabling anonymous access for the account-update endpoint is a secure remedy
Explanation
Correct Answers
B:An unpredictable server-validated CSRF token makes it difficult for an unrelated malicious page to forge a state-changing request for a victim session. An appropriate SameSite session-cookie policy can limit when cookies accompany cross-site traffic, though it is defense in depth and has important exceptions. The portal should also validate origin and avoid state-changing GET operations.
D:The employee is already authenticated to the trusted portal, so a malicious external page can cause the browser to send a request carrying their session context. If the portal fails to check that the request originated from an authorized workflow, an email change may be accepted without the employee selecting it. The resulting action can be unauthorized even though the session is valid.
E:Cross-site request forgery is the appropriate category when an attacker induces an authenticated browser to make a state-changing request to another site. The malicious page supplies the unwanted action while the browser supplies its existing portal credentials. The portal must enforce request-origin or token controls to tell such requests from legitimate user actions.
Incorrect Answers
A:SQL injection changes how an application constructs or executes database commands from hostile data. The attacker-controlled page here causes the victim browser to submit an account-update form, and the portal accepts the user’s current session. The described failure is cross-origin request authorization, not a demonstrated ability to change SQL syntax.
C:A CSRF attack can exploit the browser’s automatic inclusion of session cookies; the malicious website does not have to learn the user’s plaintext password. Knowing the password would enable other attacks, but it is not the premise here. The application must verify the legitimacy of the state-changing request rather than equate session presence with user intent.
F:Anonymous access would remove an authentication barrier from the account-update operation and make the situation worse. CSRF protection requires validating intent in the context of an existing authenticated session, not exposing account-management methods to unauthenticated callers. Keep authentication and authorization, and add appropriate anti-forgery checks for the state change.
Question 118
An attacker can freely vary BOTH of two different software packages until their shortened 64-bit integrity hashes match. The packages remain different, but a naive verification workflow compares only those hashes. Which cryptographic technique exploits this weakness?
- A second-preimage search that begins with one immutable, specified valid package and tries to match only that package’s digest
- An offline dictionary attack recovering a user password from a leaked password-verifier database
- A ciphertext bit-flipping attack that forges unauthenticated stream-encrypted data without comparing file digests
- A birthday-bound collision search that takes advantage of the short hash output when both candidate inputs can be varied
Explanation
Correct Answer
D:When an attacker can independently vary both inputs, the birthday effect gives generic collisions after roughly the square root of the digest space, approximately 2^32 trials for an ideal 64-bit output. Colliding files can defeat a system that relies solely on their identical shortened digests. Use an approved collision-resistant full-strength hash and trusted artifact-signing checks rather than treating a short digest as conclusive provenance.
Incorrect Answers
A:Second-preimage resistance concerns finding a different input with the hash of one particular fixed target message. This scenario permits the adversary to choose and vary BOTH packages, so it tests the easier generic collision-search problem. For an ideal n-bit hash, those complexity assumptions differ substantially.
B:Offline password guessing uses candidate secrets and a known verifier to recover a password or another reusable authenticator. The described two-package matching attack need not know any user credential and works against a too-short general file-integrity digest. That is a collision mechanism, not password recovery.
C:A malleability or bit-flipping attack exploits an encryption scheme that fails to authenticate ciphertext changes. Here the attacker searches the space of software package contents until two different files yield the same truncated hash value. Encryption-cipher malleability does not explain the matching integrity digests.
Question 119
Attackers have stolen a service's authentication database, which stores unsalted, fast SHA-256 digests of user passwords. The service now wants to make offline password guessing far more expensive even if a future verifier database leaks. Which change best addresses this vulnerability?
- Use a per-password random salt with a deliberately expensive password-hashing or key-derivation scheme such as Argon2id, with reviewed cost settings
- Replace the hexadecimal representation of each stored SHA-256 digest with Base64 encoding while keeping the same fast calculation
- Move the identical unsalted SHA-256 digests to a different database table without changing the verification algorithm
- Compute SHA-256 twice with no per-user salt or calibrated work factor and assume this alone prevents high-speed offline attacks
Explanation
Correct Answer
A:Argon2id combines intentionally costly computation and memory use with a unique random salt for each stored verifier. The salt prevents identical passwords from having identical precomputed verifier values, while calibrated costs slow guesses against each leaked hash. Choose parameters appropriate for the service and a migration strategy for existing users; a strong but fast general-purpose digest is insufficient.
Incorrect Answers
B:Base64 changes only how the hash bytes are written or transmitted; an attacker can decode them trivially and still calculate the same fast SHA-256 value for each guessed password. It adds no per-account uniqueness or expensive work. Password storage security must be improved in the verification function itself rather than its printable representation.
C:Relocating identical unsalted digests may reduce accidental visibility if access controls change, but a future database breach would still reveal the same easily guessed hash values. Attackers can reuse precomputed guesses across accounts. The stated requirement concerns what happens after a verifier leak, so the salted, memory-costly hashing scheme must change.
D:Double SHA-256 adds only another fast digest calculation and provides no unique salt or configurable memory/work factor comparable to modern password hashing. Commodity hardware can still test large guess dictionaries efficiently. The fix must deliberately raise offline verification cost for each guess rather than assuming two rounds of a fast primitive are enough.
Question 120
Identity logs show an attacker sending thousands of different password guesses against the SAME privileged administrator account in rapid succession. The service triggers a lockout after its configured failed-attempt threshold. What attack method is most directly indicated?
- Credential stuffing from a breach corpus across thousands of different users
- Password spraying with the same few guessed secrets distributed over many identities
- A passive token-collection attack that requires no password guesses at the login service
- An online brute-force password guessing attack focused on one account
Explanation
Correct Answer
D:An online brute-force attempt systematically submits candidate passwords to the service for one account. The rapid stream of different guesses and account-specific lockout are direct evidence of that behavior. Rate limiting, lockout safeguards and MFA can help; review the logs for any successful sign-in and ensure defensive lockout cannot be abused for denial of service.
Incorrect Answers
A:Credential stuffing typically tries username/password combinations taken from previous breaches and is often distributed across many accounts. The observed activity instead targets one privileged identity with thousands of different guesses, without evidence of a breached credential-pair list. The distinction helps select controls such as per-account throttling and investigation of an attacker source.
B:Password spraying tests one or a few commonly guessed passwords across many different user accounts to avoid per-account thresholds. Here the same administrator account receives many different candidates in quick succession. The lockout triggered by concentrated failures is more consistent with brute forcing one identity than with a low-and-slow multi-account spray.
C:Passive token collection might steal a session cookie or bearer token without submitting password guesses at the login endpoint. The scenario explicitly describes thousands of password attempts and the account lockout responding to them. Analysts should correlate source IPs, timestamps and failed-login outcomes rather than infer an unseen token-theft mechanism.