Curated

Reconnaissance and Enumeration 2 (2.3–2.4)

0 votes

Questions62

  1. Question 1

    Reconnaissance and Enumeration

    A Bash script runs dig A against example.com. The tester also wants the hosts that handle the domain's email. Which record type should the script query?

    Show the answer

    Correct answerD. MX

    AWhy not this: NS records list authoritative name servers, not mail handlers.

    BWhy not this: CNAME records alias one name to another and do not identify mail servers.

    CWhy not this: PTR records map an IP address back to a hostname for reverse lookups.

    DWhy this is right: MX records name the servers that accept mail for the domain.

    MX records list the mail exchangers for a domain, so querying MX adds mail hosts to the gathered data. NS records only name the authoritative DNS servers, which is a different set of hosts.

    Open this question
  2. Question 2

    Reconnaissance and Enumeration

    A tester has an Nmap greppable output file, scan.gnmap, whose lines begin "Host: 10.0.0.5 ()". The tester needs a list of only the IP addresses with port 445 open. Which command does this?

    Show the answer

    Correct answerC. grep "445/open" scan.gnmap | awk '{print $2}'

    AWhy not this: The -v flag inverts the match, listing hosts that do not have 445 open.

    BWhy not this: Field one is the literal text "Host:", so the output has no IP addresses.

    CWhy this is right: It filters for open 445 lines and prints field two, the IP address.

    DWhy not this: It filters for closed port 445, so the IPs listed are the wrong hosts.

    grep keeps only lines showing 445/open, and awk prints the second whitespace-separated field, which is the IP address. Printing the first field returns only the literal word "Host:" on every line.

    Open this question
  3. Question 3

    Reconnaissance and Enumeration

    A Python script uses socket.connect_ex() to flag TCP ports 21 and 25 as open on each in-scope host. The tester also needs the service banner each port sends on connect. What should be added to the script?

    Show the answer

    Correct answerA. Call s.recv(1024) after connecting and print the decoded bytes

    AWhy this is right: recv() reads the greeting the service sends on connect, which is banner grabbing.

    BWhy not this: Shutting down the read side would stop the socket from receiving the banner at all.

    CWhy not this: listen() puts a socket into server mode for incoming connections; it cannot read a remote banner.

    DWhy not this: bind() attaches the socket to a local address, so it cannot be pointed at the target to read data.

    FTP and SMTP services send a greeting banner as soon as the TCP session opens, so reading from the connected socket with recv() captures it. listen() is a server-side call and does not read data from a remote service.

    Open this question
  4. Question 4

    Reconnaissance and Enumeration

    During a scan of a web server, a tester wants Nmap to run only scripts in the vuln category against ports found open. Which option does this?

    Show the answer

    Correct answerB. nmap -sV --script vuln 10.0.0.5

    AWhy not this: -sC runs the default script set, and --script-trace only shows script traffic; neither selects the vuln category.

    BWhy this is right: --script with a category name runs all NSE scripts in that category against the target's open ports.

    CWhy not this: --script-help displays script descriptions only; it does not execute any scripts against the host.

    DWhy not this: --script-updatedb rebuilds the script database index and takes no category argument to run scripts.

    The --script option accepts a category name, such as vuln, and runs every NSE script in that category against matching services. --script-help only prints documentation for the scripts and runs nothing against the target.

    Open this question
  5. Question 5

    Reconnaissance and Enumeration

    A tester has already found SMB open on a Windows host and wants Nmap to list its shares without launching intrusive exploits. Which command is BEST?

    Show the answer

    Correct answerB. nmap -p445 --script smb-enum-shares 10.0.0.8

    AWhy not this: smb-brute guesses credentials, which is intrusive and not share enumeration.

    BWhy this is right: smb-enum-shares is the NSE script that lists SMB shares on the target.

    CWhy not this: Version detection with --version-all identifies the service version but does not enumerate shares.

    DWhy not this: smb-vuln-ms17-010 tests for one specific vulnerability and returns no share listing.

    The smb-enum-shares NSE script enumerates the shares a host exposes over SMB, which matches the goal. smb-vuln-ms17-010 only checks whether the host is vulnerable to that flaw and does not list shares.

    Open this question
  6. Question 6

    Reconnaissance and Enumeration

    A tester's Python port checker reports every port as open: `if s.connect_ex((host, port)): print(port)`. What is the cause?

    Show the answer

    Correct answerC. connect_ex returns 0 on success, so any nonzero error code is evaluated as true

    AWhy not this: connect() raises exceptions; connect_ex deliberately returns an error code instead.

    BWhy not this: -eq is PowerShell syntax and is not valid in Python; == is the comparison operator.

    CWhy this is right: 0 means success, so a bare if is true for failures; test connect_ex(...) == 0.

    DWhy not this: SOCK_DGRAM creates UDP sockets; the default SOCK_STREAM is the correct type for TCP checks.

    socket.connect_ex returns an error number instead of raising, with 0 meaning success. A bare if treats the nonzero failure codes as true, so closed ports print; compare the result with == 0. Raising an exception is connect() behavior.

    Open this question
  7. Question 7

    Reconnaissance and Enumeration

    A tester has Nmap grepable output in scan.gnmap and needs a unique list of IP addresses with TCP 445 open for the next script. Which Bash pipeline produces it?

    Show the answer

    Correct answerD. grep '445/open' scan.gnmap | awk '{print $2}' | sort -u

    AWhy not this: This selects hosts where 445 is closed, the opposite of what is needed.

    BWhy not this: The -v flag inverts the match and returns hosts that do not have 445 open.

    CWhy not this: Field 1 on these lines is the literal word 'Host:', so every output line would be the same.

    DWhy this is right: grep keeps lines with 445 open, awk field 2 is the IP, and sort -u removes duplicates.

    In grepable output each line starts 'Host: <IP>', so awk field 2 is the address; grep selects lines with 445 open and sort -u removes duplicates. Printing field 1 returns only the word 'Host:'.

    Open this question
  8. Question 8

    Reconnaissance and Enumeration

    A tester's Bash sweep prints nothing although hosts are up: `for i in $(seq 1 254); do ping -c 1 -W 1 10.10.5.i &>/dev/null && echo 10.10.5.$i; done`. Which change fixes it?

    Show the answer

    Correct answerD. Change 10.10.5.i to 10.10.5.$i in the ping command

    AWhy not this: -n 1 is Windows ping syntax; on Linux -c sets the count and -n means numeric output.

    BWhy not this: Using ; would echo every address whether or not ping succeeded, losing the live-host filter.

    CWhy not this: 1..254 is PowerShell range syntax; Bash does not expand it, and seq already works here.

    DWhy this is right: Bash needs $i to expand the loop variable; a bare i is literal text and the ping fails.

    Without the $ prefix, Bash treats 'i' as literal text, so ping targets an invalid address and always fails. Using $i expands the loop variable. The 1..254 range is PowerShell syntax; Bash needs seq or {1..254}.

    Open this question
  9. Question 9

    Reconnaissance and Enumeration

    A tester needs Bash to run the same nmap command against every address listed in targets.txt, one at a time. Which construct does this?

    Show the answer

    Correct answerA. while read ip; do nmap -sV $ip; done < targets.txt

    AWhy this is right: The loop repeats its body for every line of the file, so each address is scanned in turn.

    BWhy not this: The && operator combines two tests and runs the command at most once; it never repeats.

    CWhy not this: Arithmetic increments a number once and runs nmap once; it does not read the file.

    DWhy not this: An if statement checks a condition once; it does not iterate over the file's lines.

    A while read loop repeats its body once for each line in the file, putting each address into the variable. The if test and the && chain evaluate a condition once and run the command at most once, so they do not repeat.

    Open this question
  10. Question 10

    Reconnaissance and Enumeration

    A Python script has Boolean variables p80 and p443 that are True when the port is open. Web enumeration should start when at least one of the two ports is open. Which condition does this?

    Show the answer

    Correct answerC. if p80 or p443:

    AWhy not this: and requires both ports open, so hosts with only one open web port would be missed.

    BWhy not this: Equality is True when both are open or both are closed, so it fires on hosts with no web ports.

    CWhy this is right: or is True when either port is open, so enumeration starts if at least one is open.

    DWhy not this: not (p80 or p443) is True only when both ports are closed, the opposite of the goal.

    The or operator is True when either operand is True, which matches "at least one port open." The and operator needs both ports open, so a host with only one open web port would be skipped.

    Open this question
  11. Question 11

    Reconnaissance and Enumeration

    A Python enumeration script must request HTTPS when port 443 is open, request HTTP only when 443 is closed and port 80 is open, and do nothing otherwise. Which structure ensures at most one request is made?

    Show the answer

    Correct answerD. if https_open: ... elif http_open: ...

    AWhy not this: Each separate if is evaluated independently, so both requests run when both ports are open.

    BWhy not this: A while loop repeats while a condition holds, so it could keep sending requests instead of choosing one.

    CWhy not this: An unconditional loop requests both ports regardless of their state; no decision is made.

    DWhy this is right: The elif is evaluated only when the first test fails, so the branches cannot both run.

    An if/elif chain makes the branches mutually exclusive: the elif test runs only if the first test was false, so at most one request occurs. Two separate if statements are tested independently, so both requests run when both ports are open.

    Open this question
  12. Question 12

    Reconnaissance and Enumeration

    A recon script should print "host up" only when a ping to the target succeeds. Which construct makes that decision?

    Show the answer

    Correct answerD. if statement

    AWhy not this: A for loop repeats a block for each item; it does not test whether the ping succeeded.

    BWhy not this: Concatenation joins strings together; it makes no decision about running code.

    CWhy not this: Incrementing changes a number's value; it does not test a result.

    DWhy this is right: It executes its block only when the tested condition, the ping result, is true.

    An if statement runs its block only when its test evaluates true, such as a successful ping exit code. A for loop repeats code over a sequence and does not decide whether code runs based on a result.

    Open this question
  13. Question 13

    Reconnaissance and Enumeration

    A Python script must probe TCP ports 20 through 25 inclusive on every host in a list, and stop probing a host once any port answers. Which loop design meets all three requirements?

    Show the answer

    Correct answerA. Outer for over hosts; inner for p in range(20, 26), with break on the first open port

    AWhy this is right: range(20, 26) includes port 25, and break exits only the inner port loop, so the next host is still probed.

    BWhy not this: range(20, 25) stops at port 24 because the upper bound is excluded, so port 25 is never tested.

    CWhy not this: Ports in the outer loop means break exits the host loop, skipping remaining hosts for that port instead of stopping per host.

    DWhy not this: continue jumps to the next port instead of ending the loop, so probing of that host would not stop.

    range() excludes its upper bound, so range(20, 26) covers ports 20-25. A break in the inner loop ends probing of that host only, and the outer loop moves on to the next host. Using continue merely skips to the next port, so probing would not stop.

    Open this question
  14. Question 14

    Reconnaissance and Enumeration

    A tester right-clicks a domain entity in Maltego and runs a transform. What does the transform do?

    Show the answer

    Correct answerB. Queries a data source and returns related entities

    AWhy not this: Packet capture and decoding is the job of Wireshark or tcpdump, not a Maltego transform.

    BWhy this is right: A transform takes a selected entity, queries a source and adds the related entities to the graph.

    CWhy not this: Hash cracking is a password attack task and is not what transforms do.

    DWhy not this: Archiving dated page snapshots is the Wayback Machine's function.

    A Maltego transform queries a data source for the selected entity and adds the related entities, such as hosts, emails or people, to the graph. It does not capture traffic; that is what Wireshark and tcpdump do.

    Open this question
  15. Question 15

    Reconnaissance and Enumeration

    A tester has found one employee email address. The tester must choose each pivot by hand to related domains, people and profiles, then show the links as a graph in the report. Which tool fits BEST?

    Show the answer

    Correct answerD. Maltego

    AWhy not this: SpiderFoot automates scans across many modules; it is not driven by hand-picked pivots on a selected entity.

    BWhy not this: theHarvester collects emails, hosts and names into lists; it does not offer interactive pivoting or graphs.

    CWhy not this: Recon-ng is a command-line module framework that stores results in a database, not a graph of relationships.

    DWhy this is right: It runs chosen transforms on an entity and draws the related entities as a link graph.

    Maltego is built for analyst-driven link analysis: transforms run on a selected entity and the results appear as a relationship graph. SpiderFoot runs automated scans across its modules rather than letting the analyst choose each pivot.

    Open this question
  16. Question 16

    Reconnaissance and Enumeration

    A client has since removed the Disallow entries from its robots.txt file. A tester wants to read the earlier version without sending any traffic to the client. Which resource is BEST?

    Show the answer

    Correct answerB. Wayback Machine

    AWhy not this: Amass maps current subdomains and networks; it does not retrieve historical file contents.

    BWhy this is right: It stores dated copies of pages and files, so the old robots.txt can be read without touching the client.

    CWhy not this: Shodan indexes banners of currently exposed services, not archived copies of a site's files.

    DWhy not this: dig queries live DNS records and returns nothing about a web file's earlier contents.

    The Wayback Machine keeps dated snapshots of web content, including files such as robots.txt, and is queried passively. Amass enumerates current subdomains from public sources but cannot return an earlier file's contents.

    Open this question
  17. Question 17

    Reconnaissance and Enumeration

    A tester wants to see how a client's public website looked several years ago. Which resource provides this?

    Show the answer

    Correct answerA. Wayback Machine

    AWhy this is right: It archives dated snapshots of web pages, so past versions of the site can be viewed.

    BWhy not this: WHOIS returns registrant and registration data for a domain, not past page content.

    CWhy not this: Hunter.io finds email addresses and formats for a domain, not earlier page versions.

    DWhy not this: Wireshark analyzes captured network traffic and has no archive of public websites.

    The Wayback Machine archives snapshots of websites over time, so earlier versions of pages can be viewed. WHOIS returns domain registration details, not page content.

    Open this question
  18. Question 18

    Reconnaissance and Enumeration

    A Python script must send an HTTP GET to each in-scope web host and read the Server response header. Which call does this?

    Show the answer

    Correct answerD. requests.get(url).headers["Server"]

    AWhy not this: Ping sends ICMP echo requests, which carry no HTTP headers.

    BWhy not this: json.loads parses a JSON string, not a URL, and makes no network request.

    CWhy not this: It only resolves a hostname to an IP address and sends no HTTP request, so no headers are returned.

    DWhy this is right: requests.get sends the HTTP GET and .headers holds the response headers, including Server.

    The requests library sends the HTTP GET and exposes response headers as a dictionary, so the Server header is read directly. gethostbyname only resolves a name to an IP address and sends no HTTP request.

    Open this question
  19. Question 19

    Reconnaissance and Enumeration

    A tester merges hostname lists from several tools into hosts.txt and needs each hostname listed only once. Which command does this?

    Show the answer

    Correct answerD. sort -u hosts.txt

    AWhy not this: It extracts the first dot-delimited field of every line, which trims names and leaves duplicates in place.

    BWhy not this: It only counts the lines in the file and neither removes duplicates nor outputs a hostname list.

    CWhy not this: It prints only the first line of the file, discarding the rest of the list rather than deduplicating it.

    DWhy this is right: It sorts the lines and keeps one copy of each, which deduplicates the merged list.

    sort -u sorts the lines and drops duplicates, leaving one entry per hostname. wc -l only counts lines, so duplicates would remain and the output would be a number rather than a list.

    Open this question
  20. Question 20

    Reconnaissance and Enumeration

    A scope entry reads 10.10.4.17/22, with host bits set. A Python script must loop over only the usable host addresses of that network. Which call supplies them?

    Show the answer

    Correct answerA. ipaddress.ip_network(entry, strict=False).hosts()

    AWhy this is right: strict=False accepts the host bits and hosts() yields only usable addresses, as required.

    BWhy not this: ip_interface returns the single address 10.10.4.17, not every host in the network.

    CWhy not this: strict=False avoids the error, but iterating the network directly also yields the network and broadcast addresses.

    DWhy not this: With host bits set, ip_network raises ValueError under the default strict=True, so no addresses are produced.

    strict=False lets ip_network accept an entry with host bits set, and hosts() yields only usable addresses, excluding network and broadcast. Without strict=False, ip_network raises ValueError on 10.10.4.17/22.

    Open this question
  21. Question 21

    Reconnaissance and Enumeration

    A tester wants a script that imports the requests library to query a web API and parse the JSON reply. Which scripting language is this?

    Show the answer

    Correct answerA. Python

    AWhy this is right: Python has the requests library and json module, which are built for API calls and JSON handling.

    BWhy not this: Bash can run curl, but it has no requests library or native JSON parsing.

    CWhy not this: Batch files are basic Windows command scripts with no HTTP library or JSON support.

    DWhy not this: PowerShell parses JSON with its own cmdlets, but it does not use the Python requests library.

    Python provides the requests library and a json module, so it suits querying web APIs and parsing JSON during enumeration. Bash can call curl but has no requests library or built-in JSON parser.

    Open this question
  22. Question 22

    Reconnaissance and Enumeration

    A tester's script `Get-Content ips.txt | ForEach-Object { Test-Connection $ip -Count 1 }` errors because the target is empty. Which change fixes it?

    Show the answer

    Correct answerD. Replace $ip with $_, the current pipeline object

    AWhy not this: Where-Object filters items by a condition and would not pass each address to the command.

    BWhy not this: $1 is a Bash positional parameter; in PowerShell it is another undefined variable.

    CWhy not this: -Quiet only changes the output to True or False and does not supply a target.

    DWhy this is right: $_ is the automatic variable for the current pipeline object, so each address from the file becomes the target.

    $ip is never assigned, so the target is null. Inside ForEach-Object, $_ holds the current line from the pipeline. A Bash-style $1 is also just an undefined PowerShell variable.

    Open this question
  23. Question 23

    Reconnaissance and Enumeration

    A tester has a shell on a Windows host with only default tooling and must test TCP 445 on every address in hosts.txt. Which command fits?

    Show the answer

    Correct answerB. Get-Content hosts.txt | ForEach-Object { Test-NetConnection $_ -Port 445 }

    AWhy not this: The /dev/tcp path is a Bash feature and does not exist in Windows.

    BWhy this is right: Test-NetConnection -Port is built into Windows PowerShell and tests each address from the file.

    CWhy not this: This needs a Python interpreter and a script, neither present on a default Windows host.

    DWhy not this: This is a Bash loop that needs a shell and netcat, which a default Windows host lacks.

    PowerShell ships with Windows, and Test-NetConnection with -Port checks a TCP port, so piping Get-Content into ForEach-Object tests each address. The Bash and Python options rely on tools a default Windows host does not provide.

    Open this question
  24. Question 24

    Reconnaissance and Enumeration

    A Bash script keeps a counter in the variable count and must add 1 to it each time an open port is found. Which line does this?

    Show the answer

    Correct answerA. count=$((count + 1))

    AWhy this is right: $(( )) evaluates integer arithmetic, so the new numeric value is assigned back to count.

    BWhy not this: Without arithmetic expansion, Bash stores the literal text 'count+1' instead of a number.

    CWhy not this: $count++ expands the variable first and then tries to run its value as a command.

    DWhy not this: $( ) is command substitution, so Bash tries to run a command named count and fails.

    Arithmetic expansion with $(( )) evaluates the expression as integer math and assigns the result. Plain count=count+1 only stores the literal text 'count+1', because Bash treats it as a string.

    Open this question
  25. Question 25

    Reconnaissance and Enumeration

    A Python script stores a service banner with banner = 'SSH-2.0-OpenSSH_8.9'. Which three expressions evaluate to True? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. 'SSH' + '-2.0' in bannerD. 'OpenSSH' in bannerE. 'SSH-' * 2 == 'SSH-SSH-'

    AWhy this is right: + binds tighter than in, so 'SSH-2.0' is built first and is found at the start of the banner.

    BWhy not this: * binds tighter than in, so 'SSHSSH' is built first; the banner does not contain it, so the result is False.

    CWhy not this: in is case-sensitive, so the lowercase 'openssh' is not found and the result is False.

    DWhy this is right: in tests for a substring, and 'OpenSSH' appears in the banner with matching case.

    EWhy this is right: The * operator repeats a string, so 'SSH-' * 2 builds 'SSH-SSH-', which equals the right side.

    The in operator tests for a substring, * repeats a string, and + joins strings before in is evaluated, so 'SSH-2.0' is searched for. The lowercase 'openssh' is False because in is case-sensitive. 'SSH' * 2 builds 'SSHSSH', which the banner does not contain, so that expression is False too.

    Open this question
  26. Question 26

    Reconnaissance and Enumeration

    A Bash script reads each service banner into $banner and must skip entries where the banner is empty. Which test is true when $banner has zero length?

    Show the answer

    Correct answerD. [ -z "$banner" ]

    AWhy not this: -e tests whether a file path exists, not whether a string is empty.

    BWhy not this: -eq is a numeric comparison and fails with an error when the banner holds text.

    CWhy not this: -n is true when the string is non-empty, which is the reverse of the needed test.

    DWhy this is right: -z is true when the string is zero length, so it matches an empty banner.

    The -z string test is true when a string has zero length, which is what an empty banner is. The -n test is the opposite: it is true when the string is non-empty, so it would skip good banners.

    Open this question
  27. Question 27

    Reconnaissance and Enumeration

    A Python script sets ssh_open and web_open to True when the matching ports are open. A host should be flagged only when SSH is open and no web port is open. Which condition does this?

    Show the answer

    Correct answerD. ssh_open and not web_open

    AWhy not this: This is true when at least one of the two ports is closed, so it also flags hosts with SSH closed.

    BWhy not this: or is true whenever either side is true, so a host with SSH closed and web closed is wrongly flagged.

    CWhy not this: This inverts the requirement: it matches hosts with SSH closed and web open.

    DWhy this is right: and needs both tests true, and not turns a closed web port into True, so only SSH-open, web-closed hosts match.

    Both tests must hold, so and joins them, and not inverts the web test so that a closed web port counts. The or version is also true when SSH is closed but web is closed, so it flags hosts that have no open SSH.

    Open this question
  28. Question 28

    Reconnaissance and Enumeration

    A Python script has total = 1000 ports and size = 300 ports per batch. It must find how many ports are in the final, partial batch. Which expression gives that?

    Show the answer

    Correct answerB. total % size

    AWhy not this: // returns the whole number of full batches, which is 3, not the leftover ports.

    BWhy this is right: % returns the remainder of the division, which is 100 ports left over after three full batches.

    CWhy not this: / returns the float 3.33, which does not give a count of leftover ports.

    DWhy not this: Subtraction gives 700, the ports remaining after one batch, not the final partial batch.

    The modulo operator returns the remainder of a division, here 100, which is the size of the last partial batch. Floor division returns 3, the number of full batches, not the leftover ports.

    Open this question
  29. Question 29

    Reconnaissance and Enumeration

    A tester wants a terminal-based framework with a Metasploit-style interface, where loaded modules query sources and write hosts and contacts to a workspace database. Which tool fits?

    Show the answer

    Correct answerD. Recon-ng

    AWhy not this: It is a graphical tool built on transforms and graphs, not a terminal module framework.

    BWhy not this: It runs as one command that gathers emails and subdomains; it has no module shell or workspace database.

    CWhy not this: It automates scans and is usually used through a web interface, not a Metasploit-style console.

    DWhy this is right: It loads modules in a Metasploit-style console and stores results in per-workspace databases.

    Recon-ng is a modular reconnaissance framework with a Metasploit-like console, installable modules and workspace databases. theHarvester is a single-run command-line collector without modules or workspaces.

    Open this question
  30. Question 30

    Reconnaissance and Enumeration

    A tester needs open ports and service banners for a client's 203.0.113.0/24 range. The rules of engagement forbid sending any packets to that range. Which tool is BEST?

    Show the answer

    Correct answerB. Shodan

    AWhy not this: It enumerates subdomains and DNS data; it does not return stored service banners for an IP range.

    BWhy this is right: Its crawlers already collected banners and open ports, so queries send nothing to the range.

    CWhy not this: It shows DNS records and host mappings for a domain, not banners or open-port data.

    DWhy not this: It finds email addresses and address patterns for a domain, not ports or banners.

    Shodan crawls the internet and stores banners, so a tester can query the range's ports and services without touching it. DNSdumpster maps DNS records and hosts but does not provide service banners.

    Open this question
  31. Question 31

    Reconnaissance and Enumeration

    A Recon-ng module returns an error saying it needs a third-party API credential. Which command stores the credential for the module to use?

    Show the answer

    Correct answerB. keys add

    AWhy not this: It sets module parameters such as the SOURCE target, not stored API credentials.

    BWhy this is right: It saves a named API key in Recon-ng so modules calling that service can authenticate.

    CWhy not this: It creates a new workspace for storing results; it does not store credentials.

    DWhy not this: It downloads modules from the marketplace; the module is already installed and only lacks a credential.

    The keys add command saves API credentials in Recon-ng so modules that call external services can authenticate. The options set command only sets module parameters such as SOURCE, not stored API credentials.

    Open this question
  32. Question 32

    Reconnaissance and Enumeration

    Which two kinds of information does Shodan provide about an internet-facing host? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersC. Hosting organization and country of the IP addressE. Open ports and service banners

    AWhy not this: Email addresses are the focus of Hunter.io, not Shodan's device index.

    BWhy not this: Packet captures come from tools such as Wireshark or tcpdump on a network the tester can see.

    CWhy this is right: Shodan results list the owning organization and geolocation of each IP address.

    DWhy not this: Mapped SSIDs are the data set of WiGLE.net, not Shodan.

    EWhy this is right: Shodan indexes what exposed services return, including open ports and banners.

    FWhy not this: Archived page snapshots come from the Wayback Machine, not Shodan.

    Shodan indexes exposed services, so results show open ports, banners, and details such as the organization and location of the IP. Email addresses come from Hunter.io, and archived pages from the Wayback Machine.

    Open this question
  33. Question 33

    Reconnaissance and Enumeration

    A tester enters one domain and wants an OSINT tool to launch its data-source modules automatically and correlate the findings in a web interface, with no manual pivoting. Which tool fits?

    Show the answer

    Correct answerA. SpiderFoot

    AWhy this is right: It runs many modules against one target on its own and correlates results in a web interface.

    BWhy not this: The tester picks each transform and pivot by hand, so collection is not automatic.

    CWhy not this: It only shows archived versions of web pages and runs no collection modules.

    DWhy not this: It is a single-purpose lookup for email addresses tied to a domain, not a multi-module scanner.

    SpiderFoot automates OSINT collection: given a target, it runs many modules and correlates the results, usually through a web interface. Maltego needs the tester to choose each transform by hand.

    Open this question
  34. Question 34

    Reconnaissance and Enumeration

    A tester needs to know which registrar holds a client's domain and when the registration expires. Which tool provides this?

    Show the answer

    Correct answerA. WHOIS

    AWhy this is right: Domain WHOIS records list the registrar, creation and expiry dates, and name servers.

    BWhy not this: Indexes internet-facing hosts and certificates, not domain registration data.

    CWhy not this: Archives past versions of web pages and holds no registration data.

    DWhy not this: Finds email addresses associated with a domain, not registrar or expiry details.

    A WHOIS lookup of a domain returns registration data such as the registrar, creation and expiry dates, and name servers. Censys.io is tempting but indexes internet-facing hosts and certificates, not registration records.

    Open this question
  35. Question 35

    Reconnaissance and Enumeration

    A tester will run SpiderFoot against a client domain. The rules of engagement forbid sending any traffic to client-owned systems. Which scan use case should be selected?

    Show the answer

    Correct answerB. Passive

    AWhy not this: Maps the target's exposure and includes modules that crawl the client's own web servers.

    BWhy this is right: Runs only modules that use third-party data sources, so no traffic reaches the client's systems.

    CWhy not this: Enables every module, including those that send traffic to the client's systems.

    DWhy not this: Aimed at suspected malicious targets and uses modules that interact with the target.

    SpiderFoot's Passive use case runs only modules that query third-party sources, so the target is never contacted. Footprint is tempting but includes modules that crawl and probe the target's own web presence.

    Open this question
  36. Question 36

    Reconnaissance and Enumeration

    A tester wants to list the mail servers for client.example from the command line. Which command does this?

    Show the answer

    Correct answerC. dig client.example MX

    AWhy not this: Requests A records, which give IP addresses, not mail exchangers.

    BWhy not this: Returns registration data such as the registrar, not DNS mail records.

    CWhy this is right: Queries DNS for the MX records, which name the domain's mail servers.

    DWhy not this: Captures DNS packets on the interface but does not send a query itself.

    The dig command with the MX record type queries DNS for the domain's mail exchangers. An A-record query is tempting but returns only IP addresses for the hostname, not its mail servers.

    Open this question
  37. Question 37

    Reconnaissance and Enumeration

    A WHOIS lookup of client.example shows only redacted privacy-service registrant details. The tester must find which IP ranges the client owns. What is the BEST next step?

    Show the answer

    Correct answerB. Resolve the site's IP address, then query WHOIS on it for the netblock owner and range

    AWhy not this: Privacy services do not disclose registrants on request, and this still gives no IP ranges.

    BWhy this is right: IP WHOIS reads the registry allocation record, which shows the netblock range and the owning organisation.

    CWhy not this: Hunter.io finds email addresses tied to a domain, not IP allocations.

    DWhy not this: Name servers are often hosted by a third party, so their netblock rarely belongs to the client.

    Domain records say nothing about IP allocations. Resolving the hostname and running WHOIS on the address queries the regional registry, which lists the netblock, its CIDR range and the owning organisation. Name server records are tempting, but they often belong to a third-party DNS host.

    Open this question
  38. Question 38

    Reconnaissance and Enumeration

    A tester wants to check whether a client's authoritative name server hands out every record in its zone to any requester. Which command tests this?

    Show the answer

    Correct answerD. dig axfr client.example @ns1.client.example

    AWhy not this: ANY sent to a public resolver returns a limited set of cached records, not the full zone.

    BWhy not this: A reverse lookup returns only the PTR name for one IP address.

    CWhy not this: Returns only the mail exchanger records, not the whole zone.

    DWhy this is right: AXFR sent to the authoritative server requests the complete zone and shows if transfers are allowed.

    An AXFR request sent to the authoritative server asks for a full zone transfer, which succeeds only if the server is misconfigured to allow it. An ANY query to a public resolver is tempting but returns only some cached records, not the whole zone.

    Open this question
  39. Question 39

    Reconnaissance and Enumeration

    A tester wants a passive, web-based map of client.example showing subdomains, IP addresses, hosting and mail servers as a graph, with nothing installed. Which fits BEST?

    Show the answer

    Correct answerD. DNSdumpster

    AWhy not this: nslookup queries one record at a time and produces no map or subdomain discovery.

    BWhy not this: Hunter.io finds email addresses and does not map DNS hosts.

    CWhy not this: Amass enumerates subdomains well but is an installed command-line tool, which the stem rules out.

    DWhy this is right: DNSdumpster is a web page that returns subdomains, IPs, hosting and MX data with a graph, with no install.

    DNSdumpster is a web service that returns a domain's hosts and DNS records with a visual map, with no installation. Amass also enumerates subdomains but is a command-line tool that must be installed.

    Open this question
  40. Question 40

    Reconnaissance and Enumeration

    What does Censys.io primarily give a penetration tester during reconnaissance?

    Show the answer

    Correct answerD. Internet-wide scan data on hosts, services and certificates

    AWhy not this: Email addresses and patterns come from Hunter.io; Censys does not collect them.

    BWhy not this: Geolocated wireless network records are in WiGLE.net; Censys covers internet-facing hosts.

    CWhy not this: Archived page snapshots are the Wayback Machine's job; Censys indexes live scan results, not page history.

    DWhy this is right: Censys indexes the results of its own internet-wide scans, covering hosts, services and certificates.

    Censys continuously scans the internet and indexes hosts, open services and TLS certificates, so a tester can query it without touching the target. Archived page snapshots come from the Wayback Machine, not Censys.

    Open this question
  41. Question 41

    Reconnaissance and Enumeration

    Which capabilities does Hunter.io offer for a target domain? (Choose four.)

    Choose 4 answers

    Show the answer

    Correct answersA. Filtering of results by departmentB. Verification of whether an address is deliverableC. Email addresses found for the domain, each with its public sourceF. A confidence score for each address returned

    AWhy this is right: Domain search results can be filtered by department, such as IT or finance.

    BWhy this is right: Hunter.io's verifier checks whether an address is deliverable without sending to the client's staff.

    CWhy this is right: Hunter.io lists addresses it found for the domain and links the public pages where each appeared.

    DWhy not this: Archived page copies are provided by the Wayback Machine, not Hunter.io.

    EWhy not this: Ports and banners come from internet-wide scan data such as Censys.io, not from Hunter.io.

    FWhy this is right: Each address returned carries a confidence score showing how reliable it is.

    Hunter.io lists addresses found in public sources, scores confidence, verifies deliverability and filters by department. Ports and banners belong to scan-data tools like Censys.io, and archived pages to the Wayback Machine.

    Open this question
  42. Question 42

    Reconnaissance and Enumeration

    A tester holds 40 employee names for client.example but no addresses. Rules forbid contacting the client, and addresses must be based on public evidence, not guesses. Which action BEST yields likely addresses?

    Show the answer

    Correct answerD. Look up the domain's address pattern on Hunter.io, then apply it to the names

    AWhy not this: Amass enumerates subdomains and DNS data; it does not reveal how employee addresses are formatted.

    BWhy not this: A WHOIS registrant contact is often a generic or redacted mailbox and does not show staff naming format.

    CWhy not this: Censys certificates describe hosts and rarely contain staff addresses or any naming pattern.

    DWhy this is right: Hunter.io reports the domain's address pattern from public sources, so names can be turned into evidence-based addresses.

    Hunter.io shows the address pattern the domain uses (such as first.last), backed by publicly found addresses, so the names can be converted into likely addresses with evidence. Amass enumerates subdomains and does not reveal an email format.

    Open this question
  43. Question 43

    Reconnaissance and Enumeration

    A tester has the SHA-256 fingerprint of the TLS certificate on a client's web server. The tester must find every internet-facing host presenting that same certificate, including forgotten IP addresses. Which tool fits BEST?

    Show the answer

    Correct answerD. Censys.io

    AWhy not this: Hunter.io finds email addresses for a domain and holds no certificate data.

    BWhy not this: DNSdumpster maps DNS records by domain; it cannot search hosts by certificate fingerprint.

    CWhy not this: WHOIS returns registration records for domains and IP ranges, not hosts that present a certificate.

    DWhy this is right: Censys lets a tester search scan data by certificate fingerprint and returns every host presenting it.

    Censys indexes certificates from internet-wide scans and lets a tester search by fingerprint to list every host presenting the certificate. DNSdumpster maps DNS records for a domain, so it cannot find hosts that have no DNS entry.

    Open this question
  44. Question 44

    Reconnaissance and Enumeration

    A tester has only client.example. In one command-line run, the tester needs employee email addresses and subdomains gathered from search engines and public sources. Which tool fits?

    Show the answer

    Correct answerD. theHarvester

    AWhy not this: nslookup resolves DNS records for names given to it and cannot find email addresses.

    BWhy not this: InSSIDer analyses Wi-Fi signals and has no role in gathering domain emails.

    CWhy not this: Maltego is a graphical tool built around manual transforms and pivoting, not a single command-line run.

    DWhy this is right: It queries public sources and search engines for a domain's emails, subdomains and hosts from the command line.

    theHarvester is a command-line OSINT tool that queries search engines and other public sources for a domain's emails, subdomains and hosts. nslookup only queries DNS records and finds no emails.

    Open this question
  45. Question 45

    Reconnaissance and Enumeration

    A tester knows the client's ASN but none of its domains. The tester wants to discover root domains tied to that ASN's address space. Which command does this?

    Show the answer

    Correct answerC. amass intel -asn 64500

    AWhy not this: An AXFR query attempts a zone transfer for a known zone and needs a domain name.

    BWhy not this: The enum subcommand finds subdomains of a domain already known; the tester has no domain yet.

    CWhy this is right: The intel subcommand with -asn discovers root domains associated with an ASN's address space.

    DWhy not this: theHarvester needs a domain as its starting input, which the tester does not have.

    The Amass intel subcommand collects intelligence such as root domains from an ASN, so it fits a tester who starts from an ASN. The enum subcommand needs a known domain to enumerate subdomains.

    Open this question
  46. Question 46

    Reconnaissance and Enumeration

    The rules of engagement allow only passive collection and forbid DNS brute forcing. A tester wants emails and hosts for client.example from DuckDuckGo and crt.sh, capped at 200 results and saved to client_out. Which command?

    Show the answer

    Correct answerD. theHarvester -d client.example -b duckduckgo,crtsh -l 200 -f client_out

    AWhy not this: The -b and -d values are swapped, so the domain is treated as a source.

    BWhy not this: The -f and -l values are swapped, so the limit and filename are wrong.

    CWhy not this: The -c flag performs DNS brute forcing, which the rules of engagement forbid.

    DWhy this is right: Correct flags: -d domain, -b sources, -l limit, -f file, and no -c, so collection stays passive.

    -d sets the domain, -b the sources, -l the result limit and -f the output file; leaving out -c avoids DNS brute forcing. The command with -c would send brute-force queries, breaking the passive-only rule.

    Open this question
  47. Question 47

    Reconnaissance and Enumeration

    A tester wants a command-line tool for in-depth DNS enumeration and attack surface mapping of a domain. Which tool fits?

    Show the answer

    Correct answerB. Amass

    AWhy not this: Aircrack-ng audits wireless network security, such as cracking keys, not DNS names.

    BWhy this is right: Amass is an OWASP tool for DNS enumeration and external attack surface mapping.

    CWhy not this: InSSIDer analyses nearby Wi-Fi networks and has no DNS enumeration role.

    DWhy not this: Wireshark inspects captured network traffic and does not enumerate a domain's DNS names.

    Amass is an OWASP project that performs DNS enumeration and maps a target's external attack surface. Wireshark captures and analyses packets rather than enumerating DNS names.

    Open this question
  48. Question 48

    Reconnaissance and Enumeration

    A tester has only a client's domain name. The tester wants a passive, browser-based map of its subdomains, DNS records and hosting IP addresses. Which resource is BEST?

    Show the answer

    Correct answerA. DNSdumpster

    AWhy this is right: It lists subdomains, DNS records and hosting IPs for a domain and maps them, all from a browser.

    BWhy not this: Hunter.io finds email addresses and address patterns for a domain, not DNS hosts.

    CWhy not this: The Wayback Machine shows archived copies of web pages, not current DNS records.

    DWhy not this: WHOIS gives registrant, registrar and name server data, not a list of subdomains or hosts.

    DNSdumpster is a web service that collects DNS records and subdomains for a domain and presents hosts and IPs as a map, without the tester querying the client. WHOIS returns registration data, not a list of hosts.

    Open this question
  49. Question 49

    Reconnaissance and Enumeration

    A tester is unsure which free sources exist for researching usernames, domains and public records. Which resource lists them by category and links out to each?

    Show the answer

    Correct answerA. OSINTframework.com

    AWhy this is right: OSINTframework.com is a categorized directory of links to free OSINT tools and sources.

    BWhy not this: theHarvester gathers emails, subdomains and hosts for a domain; it does not catalog other tools.

    CWhy not this: Censys.io is a search engine for internet hosts and certificates, not a directory of OSINT resources.

    DWhy not this: Maltego runs transforms on a target entity and graphs the results; it is not a directory of sources.

    OSINTframework.com is a web directory of OSINT tools and resources arranged by category, linking to each one. Maltego collects and graphs data about a target, but it does not catalog other sources for browsing.

    Open this question
  50. Question 50

    Reconnaissance and Enumeration

    Which four items does InSSIDer show for each nearby Wi-Fi network it detects? (Choose four.)

    Choose 4 answers

    Show the answer

    Correct answersA. ChannelC. SSIDE. Security typeF. Signal strength

    AWhy this is right: The channel each network uses is listed and shown against others.

    BWhy not this: The WPA2 passphrase is never displayed; InSSIDer does not capture handshakes or crack keys.

    CWhy this is right: The network name is shown for every detected network.

    DWhy not this: InSSIDer reads access point beacons; listing the clients associated to each AP is a job for airodump-ng.

    EWhy this is right: The security type, such as WPA2 or open, is shown for each network.

    FWhy this is right: Signal strength is shown and graphed for each access point.

    InSSIDer lists the SSID, signal strength, channel and security type of each network in range. It only listens for network advertisements and never reveals or recovers a passphrase; Aircrack-ng handles key cracking. Listing associated clients is airodump-ng's job.

    Open this question