Curated

Attacks and Exploits 2 (4.4–4.5)

0 votes

Questions99

  1. Question 1

    Attacks and Exploits

    A tester has cloned a client's private Git repository and suspects developers committed API keys that were later deleted. Which tool should the tester use to search the full commit history for them?

    Show the answer

    Correct answerA. TruffleHog

    AWhy this is right: TruffleHog searches every commit in a Git history for secrets such as API keys, even ones later removed.

    BWhy not this: WPScan enumerates WordPress plugins, themes and users; it does not search code repositories.

    CWhy not this: Gobuster brute-forces directories, files and DNS names on a target; it does not inspect repository contents.

    DWhy not this: sqlmap automates SQL injection against web parameters; it does not look for committed credentials.

    TruffleHog scans Git repositories, including past commits and branches, for high-entropy strings and known secret patterns, so deleted keys still turn up. Gobuster only brute-forces web paths and DNS names and does not read repository history.

    Open this question
  2. Question 2

    Attacks and Exploits

    A tester has captured a request in Burp Suite's proxy and needs to send it 200 times automatically, placing a different value in the discount-code parameter each time. Which Burp Suite tool should be used?

    Show the answer

    Correct answerB. Intruder

    AWhy not this: Repeater resends a captured request, but the tester edits and sends each variation manually.

    BWhy this is right: Intruder inserts payload lists into marked positions and sends the requests automatically.

    CWhy not this: Decoder only converts data between encodings such as Base64, URL and hex; it sends no requests.

    DWhy not this: Sequencer measures the randomness of session tokens; it does not iterate parameter values.

    Intruder automates sending a request many times with payloads substituted into marked positions. Repeater resends a request, but each modification and send is done by hand, so it does not suit 200 automated variations.

    Open this question
  3. Question 3

    Attacks and Exploits

    A tester has been given an OpenAPI definition for a client's REST API and must test it manually. Which capabilities of Postman support this work? (Choose four.)

    Choose 4 answers

    Show the answer

    Correct answersA. Import the OpenAPI definition to generate a collection of requestsB. Replay requests with another user's token to test authorizationD. Store the base URL and tokens as reusable environment variablesF. Send request traffic through an intercepting proxy such as Burp Suite

    AWhy this is right: Postman can import OpenAPI definitions and build a ready-made collection of the API's endpoints.

    BWhy this is right: Swapping tokens or headers between requests lets the tester check whether access controls hold.

    CWhy not this: Searching Git history for secrets is TruffleHog's job; Postman does not read repositories.

    DWhy this is right: Environment variables hold hosts and tokens so they can be reused and switched across requests.

    EWhy not this: Enumerating WordPress plugins and users is what WPScan does; Postman has no such function.

    FWhy this is right: Postman's proxy settings let tester traffic pass through Burp Suite or ZAP for inspection.

    Postman is an API client: it imports API definitions into collections, lets you change tokens and headers to test access control, keeps values in environments, and can send traffic through a proxy. Secret scanning and WordPress enumeration belong to TruffleHog and WPScan.

    Open this question
  4. Question 4

    Attacks and Exploits

    A tester needs an open-source intercepting proxy that includes an automated active scanner and can run headless in daemon mode. Which tool fits best?

    Show the answer

    Correct answerB. ZAP

    AWhy not this: Wfuzz fuzzes web parameters and paths from the command line; it is not an intercepting proxy scanner.

    BWhy this is right: ZAP is open source, intercepts traffic, includes spidering and active scanning, and supports daemon mode.

    CWhy not this: Burp Suite Community Edition is proprietary and lacks the automated active scanner found in the paid edition.

    DWhy not this: Postman is an API client for building and sending requests; it is not an intercepting proxy with an active scanner.

    ZAP is a free, open-source intercepting proxy with a spider and active scanner, and it can run as a daemon controlled through its API. Burp Suite Community Edition is not open source and has no automated active scanner.

    Open this question
  5. Question 5

    Attacks and Exploits

    A tester produces two different documents that yield the identical SHA-1 digest. Which hash function property has the tester shown to be broken?

    Show the answer

    Correct answerA. Collision resistance

    AWhy this is right: Finding two different inputs with the same digest defeats collision resistance.

    BWhy not this: Key stretching slows password guessing and is unrelated to two inputs sharing a digest.

    CWhy not this: Salting is a password storage measure that does not define whether two inputs can share a digest.

    DWhy not this: Preimage resistance covers finding an input for a given hash, not producing two matching inputs.

    Collision resistance means it should be infeasible to find two different inputs with the same hash. Preimage resistance concerns recovering an input from a given hash, which the tester did not do.

    Open this question
  6. Question 6

    Attacks and Exploits

    A portal serves an installer only if its MD5 hash matches an entry approved by a reviewer. The tester can submit files for review but cannot edit the hash list. Which approach BEST gets a malicious installer served?

    Show the answer

    Correct answerC. Craft a benign and a malicious file sharing one MD5 hash, get the benign one approved, then swap

    AWhy not this: Hashes cannot be reversed into file contents, and cracking a file hash does not help.

    BWhy not this: Matching a fixed hash of someone else's file is a second preimage, which is not practical against MD5.

    CWhy this is right: The tester controls both files, so a practical MD5 collision lets the approved hash validate the swapped-in file.

    DWhy not this: Session ID guessing is a different attack and does not exploit the MD5 weakness that the check relies on.

    MD5 collisions can be generated practically when the attacker controls both inputs, so two files with the same hash let the approved benign file be replaced. Matching an existing third-party hash is a second-preimage attack, which is infeasible for MD5.

    Open this question
  7. Question 7

    Attacks and Exploits

    A download endpoint strips the string "../" once from the file parameter, then reads the file from a folder below the web root. Which value BEST retrieves /etc/passwd?

    Show the answer

    Correct answerC. ....//....//....//....//etc/passwd

    AWhy not this: This is a SQL injection string, and the endpoint reads files rather than querying a database.

    BWhy not this: This is command injection syntax, but the endpoint opens a path and does not pass input to a shell.

    CWhy this is right: After the single-pass filter removes the inner "../", each "....//" becomes "../", which is a traversal bypass.

    DWhy not this: A remote URL is a remote file inclusion payload and does not read a local system file.

    A non-recursive filter removes the inner "../" and leaves a valid "../", so nested sequences still climb out of the folder. A remote URL is a file inclusion payload and does not read a local file.

    Open this question
  8. Question 8

    Attacks and Exploits

    A tester knows the valid username "admin" for a web login form that has no lockout or rate limiting. No session tokens or user traffic have been captured. Which action is BEST for gaining access?

    Show the answer

    Correct answerC. Run an automated attack that submits wordlist entries in the password parameter

    AWhy not this: Session hijacking requires a valid token, and none has been captured here.

    BWhy not this: A forged cross-site request depends on a victim's logged-in browser, which is not available.

    CWhy this is right: Automated guessing of passwords against a known username with no lockout is a brute-force attack.

    DWhy not this: Changing object IDs is an insecure direct object reference, which needs an authenticated session.

    With a known username and no lockout, repeatedly guessing passwords from a wordlist (for example with Burp Intruder or Hydra) is a brute-force attack. Session replay needs a captured token, which the tester does not have.

    Open this question
  9. Question 9

    Attacks and Exploits

    A tester alters a serialized Java object in a cookie so the server runs attacker-chosen code when it rebuilds the object. Which attack is this?

    Show the answer

    Correct answerB. Insecure deserialization

    AWhy not this: Local file inclusion makes the app load a file from its own filesystem; no file path is involved.

    BWhy this is right: Tampering with a serialized object that the server reconstructs is the defining pattern of this attack.

    CWhy not this: JWT manipulation alters signed token claims or algorithms; a serialized Java object is not a JWT.

    DWhy not this: Template injection abuses template syntax rendered by the engine, not a serialized object in a cookie.

    Insecure deserialization occurs when an application rebuilds untrusted serialized data into objects, letting the attacker control the resulting data or code path. Template injection targets template engines, not serialized object streams.

    Open this question
  10. Question 10

    Attacks and Exploits

    A tester plans a forged-request page that changes the email address on an account-settings form. Which three conditions must hold for the attack to work? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. The victim is logged in when the attacker's page loads in their browserC. The app identifies the user only by a cookie the browser sends automaticallyD. The request carries no unpredictable token that the attacker cannot know

    AWhy this is right: The forged request only carries credentials if the victim's session is active when the page loads.

    BWhy not this: CSRF works without ever seeing the cookie; reading it would be session hijacking or XSS, not a requirement here.

    CWhy this is right: Automatic cookie attachment is what lets a forged cross-site request be treated as authenticated.

    DWhy this is right: Without a validated anti-CSRF token, the attacker can build a complete valid request in advance.

    EWhy not this: CSRF is cross-site by design; the forged page can be served from any domain the attacker controls.

    CSRF abuses the browser's automatic cookie sending: the victim must have an active session, and the app must not require a secret per-request token. The attacker never needs to read the cookie; that is session hijacking. The forged page can sit on any domain, since the browser sends the cookie regardless.

    Open this question
  11. Question 11

    Attacks and Exploits

    A search parameter is injectable, but the app returns an identical page for true and false conditions, suppresses database errors and displays no query output. Which technique BEST extracts data?

    Show the answer

    Correct answerA. Inject a conditional delay function and time the response for each guess

    AWhy this is right: A conditional sleep creates a measurable timing difference even when the page content never changes.

    BWhy not this: Error-based extraction needs database error messages, which the app suppresses.

    CWhy not this: UNION-based extraction needs query results to be displayed, and this page shows no query output.

    DWhy not this: Boolean-based inference needs different responses for true and false, but the page is identical in both cases.

    With identical pages and no errors or output, the only observable channel is timing, so time-based blind injection with a conditional delay infers data bit by bit. UNION, error-based and boolean techniques all need visible output, errors or a page difference.

    Open this question
  12. Question 12

    Attacks and Exploits

    A web app's link-preview feature fetches any URL passed in a url parameter and returns the response. The tester wants cloud instance credentials from the hosting provider's internal metadata service. Which action is BEST?

    Show the answer

    Correct answerB. Submit the metadata service's link-local address as the url value

    AWhy not this: A script tag tests XSS, which runs in a victim's browser and never makes the server call the metadata service.

    BWhy this is right: The server sends the request from inside the network, so it can reach the metadata address and return the response to the tester.

    CWhy not this: Directory traversal targets local file paths; it does not make the server request an internal HTTP service.

    DWhy not this: Hosting a remote shell is an RFI idea; the feature only fetches and returns content, and the goal is internal credentials.

    The feature makes server-side requests to any URL, so pointing it at the internal metadata address makes the server fetch and return credentials that outside clients cannot reach. Traversal reads local files and does not make the server issue internal HTTP requests.

    Open this question
  13. Question 13

    Attacks and Exploits

    A tester abuses a memory-handling flaw in a web service so that it runs the tester's own instructions with the service's privileges. No input reached an OS shell call and no file was included. Which attack category BEST describes the result?

    Show the answer

    Correct answerA. Arbitrary code execution

    AWhy this is right: The attacker's own instructions run on the server with the service's privileges, whatever flaw delivered them.

    BWhy not this: Local file inclusion makes the app load a file already on the server; the stem says no file was included.

    CWhy not this: Directory traversal reads files outside the intended folder; it does not make the service run attacker instructions.

    DWhy not this: Command injection needs attacker input passed to an OS shell or command call, which the stem says did not happen.

    Arbitrary code execution means the attacker makes the target run code of their choosing, and the vector here is a memory flaw rather than a shell call. Command injection requires input passed to an OS command interpreter, which the stem rules out.

    Open this question
  14. Question 14

    Attacks and Exploits

    A tester on a shared network captures an authenticated user's traffic and finds the session cookie sent over HTTP without the Secure flag. Which action BEST gains access to that user's account without knowing the password?

    Show the answer

    Correct answerD. Replay the captured session cookie in the tester's own browser

    AWhy not this: A forged request depends on the victim's browser sending their own cookie; it does not give the tester a session.

    BWhy not this: Password guessing targets the login form, but a valid session token is already in hand, so this is slower and unnecessary.

    CWhy not this: Editing and re-signing claims is JWT manipulation; the stem gives no sign the cookie is a JWT, and re-signing needs the key.

    DWhy this is right: Presenting the stolen session identifier makes the server treat the tester as the logged-in user, with no password needed.

    Session hijacking takes over an authenticated session by presenting the victim's valid session identifier, so the server treats the tester as that user. Brute-forcing the login form is a credential attack and ignores the token that was already captured.

    Open this question
  15. Question 15

    Attacks and Exploits

    A PHP page runs include($_GET['page']) and allow_url_include is enabled. Which value for the page parameter BEST makes the server run a script the tester hosts?

    Show the answer

    Correct answerD. http://tester.example/cmd.txt

    AWhy not this: An internal metadata URL is an SSRF target; as an include it would only pull metadata text, not tester code.

    BWhy not this: A traversal path loads a file already on the server, which is local file inclusion and runs no tester-written code.

    CWhy not this: This SQL injection string is not a file path or URL, so include() has nothing to load from it.

    DWhy this is right: With remote includes enabled, the server fetches this URL and executes the PHP in it.

    Remote file inclusion points the include call at an attacker-hosted URL, so PHP fetches the file and executes its code. A traversal path such as ../../../../etc/passwd only loads a local file, which is local file inclusion territory and gives no tester code.

    Open this question
  16. Question 16

    Attacks and Exploits

    A tester reviews findings against a PHP application whose process runs as the web server user. Which four findings could each be used to achieve arbitrary code execution on the server? (Choose four.)

    Choose 4 answers

    Show the answer

    Correct answersA. Unsafe deserialization of an attacker-controlled session cookieC. Remote file inclusion with allow_url_include enabledD. Server-side template injection in a greeting fieldE. Command injection in a network ping feature

    AWhy this is right: A crafted serialized object can trigger attacker-chosen code when the server rebuilds it, such as through a gadget chain.

    BWhy not this: Reflected XSS runs script in the victim's browser, not on the server, so it gives no server code execution.

    CWhy this is right: With allow_url_include enabled, an included remote script is executed by the server as PHP code.

    DWhy this is right: Template engines evaluate expressions on the server, so injected template syntax can run code or commands.

    EWhy this is right: Unsanitized input passed to an OS command runs attacker-chosen commands as the web server user.

    FWhy not this: Read-only traversal discloses file contents but executes nothing, so it does not give code execution by itself.

    Deserialization, server-side template injection, command injection and remote file inclusion each let attacker input be executed as code on the server. Directory traversal in a read-only download endpoint only discloses files and runs nothing on its own. Reflected XSS runs script in the victim's browser, not on the server.

    Open this question
  17. Question 17

    Attacks and Exploits

    A diagnostic page builds the OS command "ping -c 4" followed by the host value and returns only the word "Done". Which host value BEST confirms the tester can run extra commands?

    Show the answer

    Correct answerC. 127.0.0.1; sleep 10

    AWhy not this: This is a traversal sequence that only affects file paths and does not make the shell run another command.

    BWhy not this: This is a SQL time-based payload; the page builds an OS command, not a database query, so no delay occurs.

    CWhy this is right: The semicolon ends the ping command and sleep runs in the shell; a 10-second delay confirms execution without output.

    DWhy not this: This is a template expression; a shell treats it as plain text and it proves nothing about command execution.

    A shell separator followed by sleep 10 makes the server pause if the input reaches the shell, so the delay confirms command injection even with no output. The SQL SLEEP payload targets a database query, which this page does not build.

    Open this question
  18. Question 18

    Attacks and Exploits

    A product review field is saved by the server and shown unencoded to every visitor of the page. Which input BEST demonstrates stored cross-site scripting?

    Show the answer

    Correct answerA. <script>alert(document.domain)</script>

    AWhy this is right: Stored unencoded, the script runs in each visitor's browser in the site's origin, which shows stored XSS.

    BWhy not this: This is a command injection payload; it needs a shell on the server and does not run in browsers.

    CWhy not this: This is a template injection probe; it is evaluated by a server-side template engine, not by the browser.

    DWhy not this: This is a SQL injection payload; it targets a database query and does not execute in a visitor's browser.

    The script tag is stored and then runs in each visitor's browser because the output is not encoded, which is stored XSS. The UNION payload attacks a database query, not the browser rendering the page.

    Open this question
  19. Question 19

    Attacks and Exploits

    A tester changes invoice_id=1001 to invoice_id=1002 in a URL and sees another customer's invoice. Which weakness does this show?

    Show the answer

    Correct answerB. Insecure direct object reference

    AWhy not this: Traversal uses ../ sequences to reach files outside a folder; this changed a record identifier.

    BWhy this is right: Changing the identifier reaches another user's object because the app skips an ownership check.

    CWhy not this: SSRF makes the server fetch attacker-chosen URLs; no server-side request is involved here.

    DWhy not this: CSRF tricks a victim's browser into sending an unwanted request; the tester here sent the request directly.

    The app uses a user-controlled identifier to reach an object without checking that the user owns it, which is an insecure direct object reference. Directory traversal changes file paths, not record identifiers.

    Open this question
  20. Question 20

    Attacks and Exploits

    A tester submits {{7*7}} in a name parameter and the page responds "Hello 49". What does this result indicate?

    Show the answer

    Correct answerA. Server-side template injection

    AWhy this is right: The server computed 49, so the input was evaluated by a server-side template engine.

    BWhy not this: No database query is shown to be altered; arithmetic in a greeting is not SQL behaviour.

    CWhy not this: Nothing shows a shell ran an OS command; the expression was evaluated by a template engine.

    DWhy not this: Reflected XSS echoes input back for the browser to run; here the server changed the value before it was sent.

    The server evaluated the expression and returned its result, so the input reached a template engine, which is server-side template injection. Reflected XSS would return the text {{7*7}} unchanged, with any script running in the browser.

    Open this question
  21. Question 21

    Attacks and Exploits

    During a WordPress assessment, a tester wants WPScan to report only the installed plugins that have known vulnerabilities. Which option should be used?

    Show the answer

    Correct answerB. --enumerate vp

    AWhy not this: The u value enumerates WordPress usernames, not plugins.

    BWhy this is right: The vp value limits enumeration to plugins with known vulnerabilities in WPScan's data.

    CWhy not this: The ap value lists all installed plugins whether or not they are vulnerable.

    DWhy not this: The --passwords option supplies a wordlist for password guessing and does not list plugins.

    The vp value of --enumerate lists vulnerable plugins, drawing on WPScan's vulnerability data (an API token is needed for full results). The ap value is tempting but lists all plugins, vulnerable or not.

    Open this question
  22. Question 22

    Attacks and Exploits

    A tester must try every pairing of a username list and a password list in the POST body of a custom, non-WordPress login form, hiding failures by response size. Which tool fits?

    Show the answer

    Correct answerD. Wfuzz

    AWhy not this: Gobuster dir mode appends one wordlist's entries to the URL path and cannot fill two POST fields.

    BWhy not this: WPScan can guess passwords only against WordPress logins, and this form is not WordPress.

    CWhy not this: sqlmap tests parameters for SQL injection; it does not iterate credential lists against a form.

    DWhy this is right: Places FUZZ and FUZ2Z markers in the POST body with two wordlists and hides failures by response size.

    Wfuzz accepts FUZZ and FUZ2Z markers in the POST body, each tied to its own wordlist, and filters such as --hh hide failed responses by size. Gobuster dir mode only appends a single wordlist's entries to a URL path.

    Open this question
  23. Question 23

    Attacks and Exploits

    A tester is given an OpenAPI definition for a REST API and must manually send a crafted request to each documented endpoint, swapping in a different user's bearer token each time. Which tool is BEST suited?

    Show the answer

    Correct answerD. Postman

    AWhy not this: WPScan only assesses WordPress installations and cannot import an API definition to build requests.

    BWhy not this: Wfuzz replaces FUZZ markers with wordlist entries; it does not import API definitions or organize per-endpoint requests.

    CWhy not this: Gobuster brute-forces directories, files, DNS names or virtual hosts; it does not build requests from an API definition.

    DWhy this is right: Imports the OpenAPI definition into a collection and lets the tester send each request with a swapped token variable.

    Postman imports an OpenAPI definition into a collection and lets the tester edit each request and swap tokens through variables. Wfuzz is tempting for API testing, but it substitutes wordlist entries into markers and does not build requests from a definition.

    Open this question
  24. Question 24

    Attacks and Exploits

    A web server answers every missing path with HTTP 200 and an identical 1,532-byte error page. A tester wants Gobuster to find only real .php and .bak files. What should the tester do?

    Show the answer

    Correct answerC. Run dir mode with extensions php and bak and exclude responses of 1,532 bytes

    AWhy not this: Missing paths return 200 here, so a 404 filter would show nothing useful and hide real files.

    BWhy not this: Vhost mode looks for virtual hosts, and reporting every 200 would include all the soft 404 pages.

    CWhy this is right: Dir mode finds files by extension, and excluding the error page's length removes the false 200 hits.

    DWhy not this: Dns mode brute-forces subdomain names, not file paths on a web server.

    Dir mode with the -x extensions finds files, and excluding the fixed error-page length removes the false positives produced by the server's soft 404 responses. Keeping only 404 codes would list the missing paths, not the existing files.

    Open this question
  25. Question 25

    Attacks and Exploits

    A tester confirms that the id parameter is injectable and wants to dump the database tables automatically. Which tool should be used?

    Show the answer

    Correct answerD. sqlmap

    AWhy not this: Gobuster brute-forces directories, files, DNS names or virtual hosts; it does not exploit injection flaws.

    BWhy not this: WPScan enumerates WordPress plugins, themes and users; it does not exploit SQL injection in arbitrary parameters.

    CWhy not this: TruffleHog searches repositories for leaked secrets; it does not interact with a live web parameter.

    DWhy this is right: Automates SQL injection exploitation and can enumerate databases and dump tables from an injectable parameter.

    sqlmap automates detecting and exploiting SQL injection, including enumerating databases and dumping tables. Gobuster is tempting because it also targets web servers, but it only brute-forces paths, DNS names or virtual hosts and cannot exploit injection.

    Open this question
  26. Question 26

    Attacks and Exploits

    A JWT is signed with RS256, and the server publishes its public key at /jwks.json. The tester needs a token carrying an admin role claim. Which approach BEST achieves this?

    Show the answer

    Correct answerD. Switch alg to HS256 and sign with the published public key

    AWhy not this: RS256 uses an asymmetric key pair, so there is no shared secret for a wordlist to recover.

    BWhy not this: Replaying the token only reuses the existing user's role and does not create an admin claim.

    CWhy not this: Altering the payload invalidates the original signature, so a correct verifier rejects the token.

    DWhy this is right: The server may verify an HS256 token using the public key as the HMAC secret, which the tester can also use to sign.

    If the server trusts the alg header, switching to HS256 makes it verify the signature as an HMAC using the public key as the secret, which the tester knows, so a forged admin token validates. Editing the claim without re-signing fails because the original signature no longer matches.

    Open this question
  27. Question 27

    Attacks and Exploits

    A tester uploads a script that runs operating system commands sent to it in HTTP requests. What is this script called?

    Show the answer

    Correct answerD. Web shell

    AWhy not this: Remote file inclusion is a flaw that loads an external file, not the uploaded script itself.

    BWhy not this: A deserialization gadget is a code chain triggered by rebuilding objects, not an uploaded script.

    CWhy not this: A stored XSS payload runs in visitors' browsers, not as OS commands on the server.

    DWhy this is right: A web shell is a server-side script that takes commands through HTTP requests and executes them.

    A web shell is a script placed on a web server that accepts commands over HTTP and runs them on the host. Remote file inclusion is a different flaw: it makes the application load an externally hosted file rather than relying on an uploaded script.

    Open this question
  28. Question 28

    Attacks and Exploits

    A PHP page runs include($_GET['page']) with allow_url_include disabled. The tester can upload avatar images and set any User-Agent header. Which two actions BEST lead to code execution? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. Include the access log after sending PHP code in the User-Agent headerC. Include an uploaded image that carries PHP code in its metadata

    AWhy not this: A remote URL needs allow_url_include, which is disabled, so the server will not fetch it.

    BWhy this is right: The injected PHP is stored in the log, and include runs it when the log is loaded.

    CWhy this is right: include runs PHP found in any file it loads, including an uploaded image's metadata.

    DWhy not this: The php://filter wrapper discloses source code but does not execute attacker code.

    EWhy not this: The data:// wrapper also depends on allow_url_include, so it fails while that setting is off.

    FWhy not this: Reading /etc/passwd through traversal only discloses a file; no PHP is run.

    include executes PHP in any local file it loads, so a log poisoned through the User-Agent header or an uploaded image with embedded PHP runs as code. Remote URLs and data:// URIs need allow_url_include, which is disabled, while php://filter and traversal only read files.

    Open this question
  29. Question 29

    Attacks and Exploits

    A tester adds "role":"admin" to the JSON body of a PUT /api/users/me request that normally sends only name and email. The account becomes an administrator. Which weakness does this show?

    Show the answer

    Correct answerA. Mass assignment

    AWhy this is right: The API accepts extra fields in the body and writes them to the user record, including role.

    BWhy not this: No template expression was submitted or evaluated; the extra JSON field was simply accepted.

    CWhy not this: No token claim or signature was altered; the change was made in the request body.

    DWhy not this: No identifier was changed to reach another user's record, so this is not an object reference flaw.

    Mass assignment occurs when an API binds every field in the request body to the object, so a client can set properties such as role that it should not control. Insecure direct object reference would require changing an identifier to reach another user's data, which did not happen here.

    Open this question
  30. Question 30

    Attacks and Exploits

    A tester must enumerate directories on a site that only responds to logged-in users. Which approach lets Gobuster dir mode reach those pages?

    Show the answer

    Correct answerC. Pass the session value with the cookie option (-c)

    AWhy not this: The -a option sets the User-Agent header, which the application does not use to identify sessions.

    BWhy not this: The -p option sets a proxy address, so a session value there would only break the connection.

    CWhy this is right: The -c option adds the session cookie to each request, so the server treats it as authenticated.

    DWhy not this: The -P option is the password for HTTP basic authentication, not for cookie-based sessions.

    The -c option sends a Cookie header with every request, so the server treats Gobuster as the logged-in user. Using -P would send HTTP basic credentials, which a cookie-based session does not read.

    Open this question
  31. Question 31

    Attacks and Exploits

    An internal host at 10.10.5.20 serves several sites chosen by the Host header, and their names exist in no DNS zone. Which Gobuster mode should the tester use to find them?

    Show the answer

    Correct answerB. vhost mode

    AWhy not this: S3 mode enumerates Amazon S3 bucket names, which is unrelated to internal virtual hosts.

    BWhy this is right: Vhost mode varies the Host header against the IP, revealing virtual hosts without DNS records.

    CWhy not this: Dns mode resolves subdomains through DNS, so names absent from any zone are never found.

    DWhy not this: Dir mode brute-forces paths on one site and does not change the Host header.

    Vhost mode sends requests to the IP with each wordlist entry as the Host header and flags responses that differ, so it finds sites with no DNS records. Dns mode queries resolvers, which return nothing for names that are not in DNS.

    Open this question
  32. Question 32

    Attacks and Exploits

    A tester must try each word in words.txt as the value of the role field in the Cookie header of http://app.example/admin, hiding 403 responses. Which command does this?

    Show the answer

    Correct answerD. wfuzz -w words.txt -H "Cookie: role=FUZZ" --hc 403 http://app.example/admin

    AWhy not this: Putting FUZZ in the URL path tests paths under /admin, not cookie values.

    BWhy not this: Putting FUZZ in the -d body sends the words as POST data, not in the Cookie header.

    CWhy not this: The --sc option shows only 403 responses, the reverse of hiding them.

    DWhy this is right: FUZZ in the Cookie header sends each word as the role value, and --hc 403 hides the 403 responses.

    Wfuzz replaces FUZZ wherever it appears, so placing it in the Cookie header sends each word as the role value, and --hc hides responses with code 403. The --sc option does the opposite and shows only 403 responses.

    Open this question
  33. Question 33

    Attacks and Exploits

    A tester saved a raw HTTP request from Burp Suite to req.txt and wants sqlmap to test it for SQL injection. Which option loads the file?

    Show the answer

    Correct answerB. -r req.txt

    AWhy not this: The --cookie option sets the Cookie header value only, not the whole request.

    BWhy this is right: The -r option loads a saved raw HTTP request, with its headers and body, from a file.

    CWhy not this: The -u option takes a target URL, so a file name would be treated as an invalid address.

    DWhy not this: The --data option supplies POST body parameters as a string, not a file of the full request.

    The -r option makes sqlmap read a full raw HTTP request from a file, including its method, headers and body. The -u option expects a target URL, not a file path.

    Open this question
  34. Question 34

    Attacks and Exploits

    A tester needs valid login names from a WordPress site before starting a password attack. Which WPScan option collects them?

    Show the answer

    Correct answerD. --enumerate u

    AWhy not this: The vp value lists plugins with known vulnerabilities, not user accounts.

    BWhy not this: The t value lists installed themes, not user accounts.

    CWhy not this: The --passwords option names a password list for guessing and does not find any usernames.

    DWhy this is right: The u value enumerates WordPress usernames, giving valid targets for password guessing.

    The --enumerate u option lists WordPress usernames, for example from author archives or the REST API, which gives the password attack valid targets. The --passwords option only supplies guesses and does not discover accounts.

    Open this question
  35. Question 35

    Attacks and Exploits

    A tester cracks the local Administrator hash on one workstation, and it works on 40 others built from the same image. Which misconfiguration should the report list as the root cause?

    Show the answer

    Correct answerA. Reused local administrator password across the image

    AWhy this is right: The same local administrator password on every imaged workstation lets one cracked hash work on all of them.

    BWhy not this: An unquoted service path escalates privileges on a single host and does not make one password work everywhere.

    CWhy not this: Log tampering conceals activity and does not cause a credential to be shared between hosts.

    DWhy not this: Library injection is an attack technique, not a configuration flaw that makes a hash valid on many hosts.

    One local administrator password baked into a shared image is a misconfigured endpoint, so a single cracked hash opens every workstation. An unquoted service path enables local privilege escalation on one host and does not explain a credential that works across many.

    Open this question
  36. Question 36

    Attacks and Exploits

    Which technique is used when a tester with local admin rights extracts stored password hashes from a Windows host's memory?

    Show the answer

    Correct answerD. Credential dumping

    AWhy not this: Log tampering alters or deletes logs to hide activity and does not collect credentials.

    BWhy not this: Process hollowing hides malicious code inside a legitimate process, not harvesting hashes.

    CWhy not this: Kiosk escape breaks out of a locked-down kiosk interface and is unrelated to memory contents.

    DWhy this is right: Pulling stored hashes or passwords from memory or credential stores is credential dumping.

    Credential dumping is the extraction of stored credentials, such as hashes from LSASS memory or the SAM, from a compromised host. Process hollowing replaces a legitimate process's code to hide execution and does not retrieve credentials.

    Open this question
  37. Question 37

    Attacks and Exploits

    During an authorized test, a tester with a low-privileged shell on a Linux server finds that the root-owned find binary has the SUID bit set. What is the best next step to gain root?

    Show the answer

    Correct answerA. Run the SUID binary to spawn a shell that keeps root

    AWhy this is right: A SUID binary runs as its owner, so abusing it can yield a shell with root privileges.

    BWhy not this: Opening a root-owned process for hollowing needs privileges the low-privileged account does not have.

    CWhy not this: The tester already has a shell, and escaping a restricted shell does not raise privileges.

    DWhy not this: The SAM database is a Windows store, so it does not exist on a Linux server.

    A SUID binary owned by root runs with root's privileges, so abusing it to start a shell is a classic Linux privilege escalation path. Process hollowing needs existing privileges to open a root process, so it cannot be the first step from a low-privileged shell.

    Open this question
  38. Question 38

    Attacks and Exploits

    An authorized test host uses application allowlisting that permits only signed Microsoft binaries, and the tester's custom tool is blocked. Which approach best circumvents the control?

    Show the answer

    Correct answerA. Run code via a signed built-in OS binary

    AWhy this is right: Signed built-in binaries are permitted by the allowlist, so code can run through them.

    BWhy not this: Clearing logs hides traces afterward, but the allowlist still blocks the tool from running.

    CWhy not this: An unquoted service path is a privilege escalation flaw and does not bypass allowlisting.

    DWhy not this: Dumping hashes harvests credentials and does nothing to let a blocked tool run.

    Using trusted, signed built-in binaries to run or proxy code (living off the land) fits what the allowlist permits, so it circumvents the control. Clearing logs only hides activity afterward and does not stop the allowlist from blocking the tool.

    Open this question
  39. Question 39

    Attacks and Exploits

    A tester with a low-privileged shell wants to review the host's AppLocker policy, PowerShell logging and UAC settings for escalation leads, without dumping credentials or moving laterally. Which tool fits?

    Show the answer

    Correct answerA. Seatbelt

    AWhy this is right: Seatbelt performs host survey checks on AppLocker, PowerShell logging and UAC with no credential dumping.

    BWhy not this: Mimikatz extracts credentials, which the tester explicitly wants to avoid, and it does not survey settings.

    CWhy not this: Evil-WinRM gives a remote shell over WinRM; it is not a host configuration survey tool.

    DWhy not this: PsExec executes commands on remote systems, which is lateral movement, not local enumeration.

    Seatbelt runs security-focused checks that enumerate local host configuration, such as AppLocker, logging and UAC, and does not extract credentials or move laterally. Mimikatz is the tempting choice for post-exploitation, but it dumps credentials rather than surveying settings.

    Open this question
  40. Question 40

    Attacks and Exploits

    A tester has local administrator rights on a workstation where a domain admin is logged on. The tester needs that account's NTLM hash from LSASS memory for pass-the-hash. Which tool fits?

    Show the answer

    Correct answerC. Mimikatz

    AWhy not this: Certify finds and abuses AD CS misconfigurations; it does not read LSASS.

    BWhy not this: Rubeus works with Kerberos tickets, not with extracting NTLM hashes from LSASS memory.

    CWhy this is right: Mimikatz pulls NTLM hashes and other secrets from LSASS memory when run with sufficient privileges.

    DWhy not this: Seatbelt only enumerates host security settings; it does not extract credentials.

    Mimikatz reads LSASS memory and extracts credential material such as NTLM hashes, which pass-the-hash needs. Rubeus is tempting because it works with logged-on sessions, but it handles Kerberos tickets and does not extract NTLM hashes.

    Open this question
  41. Question 41

    Attacks and Exploits

    Which tool is used to abuse Kerberos, such as requesting tickets and performing Kerberoasting, from a compromised Windows host?

    Show the answer

    Correct answerC. Rubeus

    AWhy not this: Certify targets AD CS certificate templates and enrollment, not Kerberos ticket operations.

    BWhy not this: Seatbelt enumerates host security configuration and does not attack Kerberos.

    CWhy this is right: Rubeus is built for Kerberos attacks, including ticket requests and Kerberoasting.

    DWhy not this: PsExec runs commands on remote hosts; it does not manipulate Kerberos tickets.

    Rubeus is a toolset for Kerberos interaction and abuse, covering ticket requests, renewal, Kerberoasting and pass-the-ticket. Certify is the closest confusion, but it targets Active Directory Certificate Services, not Kerberos tickets.

    Open this question
  42. Question 42

    Attacks and Exploits

    A tester with a standard domain user account suspects Active Directory Certificate Services is misconfigured. Which tool enumerates certificate authorities and vulnerable certificate templates?

    Show the answer

    Correct answerD. Certify

    AWhy not this: Mimikatz extracts credentials and keys; it is not the tool for finding vulnerable templates.

    BWhy not this: Rubeus can use a certificate to request a ticket but does not enumerate vulnerable templates.

    CWhy not this: Seatbelt surveys local host settings, not AD CS templates or authorities.

    DWhy this is right: Certify is made to find AD CS misconfigurations and request certificates from them.

    Certify enumerates AD CS certificate authorities and templates and can request certificates from vulnerable ones. Rubeus is tempting because a certificate can later be used to get a Kerberos ticket, but Rubeus does not find vulnerable templates.

    Open this question
  43. Question 43

    Attacks and Exploits

    An EDR product flags every unknown executable written to disk. The tester must fetch a file from the tester's own server using only what is already on the Windows host. Which is BEST?

    Show the answer

    Correct answerB. certutil.exe

    AWhy not this: It is an external tool that would have to be written to disk first, and it does not download files.

    BWhy this is right: It is a native Windows binary with a file-download capability, so no new executable is introduced.

    CWhy not this: It is a third-party tool that must be dropped on disk, which the EDR flags, and it does not download files.

    DWhy not this: It is an external compiled tool that must be dropped on disk and is built for enumeration.

    certutil.exe ships with Windows and can download files from a URL, so it is a LOLBin that adds no new executable. Rubeus and the other options are third-party tools that would themselves have to be dropped on disk first.

    Open this question
  44. Question 44

    Attacks and Exploits

    A tester has an interactive desktop session on a compromised Windows workstation. Using only built-in software, the tester wants to write and debug a multi-line script with syntax highlighting and breakpoints. What should the tester use?

    Show the answer

    Correct answerB. PowerShell ISE

    AWhy not this: It is a compiled enumeration tool that has to be brought to the host and does not edit scripts.

    BWhy this is right: It is installed with Windows and offers a script editor, syntax highlighting and breakpoint debugging.

    CWhy not this: It launches processes on remote systems and offers no editing or debugging features.

    DWhy not this: It is a remote WinRM shell run from an attack host, not an editor or debugger on the workstation.

    PowerShell ISE is the built-in graphical host with a script editor, syntax colouring and a debugger with breakpoints. Evil-WinRM gives a remote shell from an attack host, but it has no editor or debugger and is not installed on the target.

    Open this question
  45. Question 45

    Attacks and Exploits

    Which tool opens an interactive shell on a remote Windows host over WinRM, typically run from a Linux attack machine?

    Show the answer

    Correct answerA. Evil-WinRM

    AWhy this is right: It is a WinRM client that gives an interactive remote shell and is commonly run from Kali Linux.

    BWhy not this: It enumerates AD CS templates and does not provide a shell.

    CWhy not this: It uses SMB rather than WinRM and is normally run from a Windows system.

    DWhy not this: It is a local host enumeration tool and does not open remote shells.

    Evil-WinRM is a Ruby-based shell that uses the WinRM protocol and accepts passwords or NTLM hashes. PsExec is the tempting alternative, but it uses SMB and is normally run from Windows.

    Open this question
  46. Question 46

    Attacks and Exploits

    On a compromised Windows server, a tester must list installed security products, Defender exclusion paths and recent RDP connections. The rules of engagement forbid touching LSASS memory. Which tool BEST fits?

    Show the answer

    Correct answerC. Seatbelt

    AWhy not this: It pulls credentials from LSASS memory, which is forbidden, and it does not survey security products or RDP history.

    BWhy not this: It enumerates AD CS certificate templates and authorities, not local host security settings.

    CWhy this is right: It runs read-only host checks covering AV products, Defender exclusions and RDP connections without touching LSASS.

    DWhy not this: It works with Kerberos tickets and does not enumerate security products, exclusions or RDP history.

    Seatbelt runs read-only host checks, including antivirus products, Defender exclusions and RDP sessions, and never reads LSASS. Mimikatz also works on the host, but it extracts credentials from LSASS memory, which the rules forbid.

    Open this question
  47. Question 47

    Attacks and Exploits

    A tester holds valid local administrator credentials for a remote file server. The firewall allows only SMB (TCP 445) to it. Which tool BEST provides a remote command shell?

    Show the answer

    Correct answerB. PsExec

    AWhy not this: It depends on WinRM listener ports, which the firewall does not allow, so it cannot connect.

    BWhy this is right: It uses SMB and administrator rights to run a remote service and return a command shell.

    CWhy not this: It targets AD CS certificate templates and gives no remote shell.

    DWhy not this: It abuses Kerberos tickets and does not give a remote command shell.

    PsExec connects over SMB, copies a service to the ADMIN$ share and runs commands remotely, so it works when only TCP 445 is open. Evil-WinRM needs the WinRM listener ports, which the firewall does not allow.

    Open this question
  48. Question 48

    Attacks and Exploits

    After a tester's authorized post-exploitation activity, which Windows event ID shows that the Security log was cleared?

    Show the answer

    Correct answerD. 1102

    AWhy not this: 4688 records creation of a new process, not any change to the log.

    BWhy not this: 4720 records creation of a user account, which relates to persistence, not log clearing.

    CWhy not this: 4624 records a successful logon, which is normal activity and not a log change.

    DWhy this is right: 1102 means the Security audit log was cleared.

    Event ID 1102 is written when the Security audit log is cleared, so clearing logs is itself visible to defenders. Event 4624 only records a successful logon and says nothing about log changes.

    Open this question
  49. Question 49

    Attacks and Exploits

    A SYSTEM service has the unquoted path C:\Program Files\Vendor Tools\Agent Service\svc.exe. The tester can write only to C:\Program Files\Vendor Tools. Which file name placed there runs first when the service restarts?

    Show the answer

    Correct answerD. Agent.exe

    AWhy not this: Program.exe is only tried at the root of C:\, which is outside the writable folder.

    BWhy not this: Vendor.exe is only tried inside C:\Program Files, which the tester cannot write to.

    CWhy not this: svc.exe is the legitimate binary in a deeper folder and is tried last.

    DWhy this is right: the prefix up to the space before Service resolves to Agent.exe in the writable folder.

    Windows tries each space-delimited prefix of the path in order. Agent.exe in the Vendor Tools folder matches the prefix C:\Program Files\Vendor Tools\Agent and is tried before svc.exe. Vendor.exe would have to be in C:\Program Files, which is not writable.

    Open this question
  50. Question 50

    Attacks and Exploits

    An authorized tester wants a payload to run under a signed system binary's name and path. The original binary's code must never execute, and no DLL may be loaded into an existing process. Which technique fits best?

    Show the answer

    Correct answerC. Process hollowing

    AWhy not this: Packing only disguises the payload's content; it still runs under its own name and path.

    BWhy not this: This loads a DLL into a process, which the stem rules out.

    CWhy this is right: a suspended signed process has its image replaced by the payload, then resumes.

    DWhy not this: The original program keeps running in that process, which breaks the never-execute constraint.

    Process hollowing starts the signed binary suspended, replaces its in-memory code with the payload and resumes it, so the process looks legitimate but the original code never runs. Remote thread injection leaves the original program running alongside the injected code.

    Open this question