Docsity

WGU D522 Task 1 Performance Assessment Python Network Automation, Device Inventory, Conne, Exams of Computer Science

Toggle sidebar
bg1
Page 1
WGU D522 TASK 1 PERFORMANCE ASSESSMENT PYTHON
NETWORK AUTOMATION, DEVICE INVENTORY, CONNECTIVITY &
DNS COMPROMISE AUDIT COMPLETE 2026 GUIDE.
189 QUESTIONS
TABLE OF CONTENTS
Design and implement Python scripts for
automated network device discovery and
Q1 - an automated device inventory script
Q2 - using Paramiko for network automation,
Q3 - During a DNS compromise audit,
Q4 - You are writing a Python
Q5 - a Python network automation script
Q6 - building a network inventory report,
Q7 - You are auditing DNS records
Q8 - a Python script for device
Q9 - During a DNS compromise audit,
Q10 - of the following Python code
Q11 - a Python network automation script
Q12 - During a DNS compromise audit,
Q13 - a Python script that inventories
Q14 - You are writing a Python
Q15 - a Python script using Paramiko
Q16 - auditing DNS records for a
Analyze network connectivity using Python
libraries and interpret results for
Q17 - a Python network automation script,
Q18 - During a DNS compromise audit,
Q19 - a Python script that connects
Q20 - You are writing a Python
Q21 - a Python network automation script
Q22 - During a DNS compromise audit,
Q23 - a Python script using Napalm
Q24 - Python script uses the 'dnspython'
Q25 - building a Python script to
Q26 - a Python-based connectivity audit, you
Q27 - Python script using the 'scapy'
Q28 - writing a Python script to
Q29 - a Python network automation script
Q30 - Python script is designed to
Q31 - During a D522 audit, an
Q32 - Python script uses the `nmap`
Conduct DNS compromise audits,
identifying attack vectors and
Q33 - a D522 audit, a Python
Q34 - D522 script uses Python's `socket`
Q35 - During a DNS compromise audit,
Q36 - D522 script uses `scapy` to
Q37 - a D522 network inventory script,
Q38 - D522 audit script uses `paramiko`
Q39 - writing a Python script to
Q40 - a D522 DNS compromise audit,
Q41 - a Python network automation script
Q42 - During a DNS compromise audit,
Q43 - a Python script that uses
Q44 - using Scapy to audit DNS
Q45 - a Python script that uses
Q46 - During a connectivity audit, you
Q47 - a Python-based device inventory system,
Q48 - analyzing a PCAP file for
Evaluate security and automation trade-offs
in network management
Q49 - a Python script that uses
Q50 - During a DNS security audit,
Q51 - a multi-vendor network, a Python
Q52 - You are writing a Python
Q53 - Python script uses Nornir to
Q54 - During a DNS compromise audit,
Q55 - Python audit script must verify
Q56 - You are writing a Python
Q57 - generating a compliance audit report
Q58 - Python script uses the 'netmiko'
Q59 - a Python connectivity audit, you
Q60 - You are writing a Python
Q61 - a Python-based network automation audit,
Q62 - Given a Python script using
Q63 - During a DNS compromise audit,
Q64 - the context of the D522
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download WGU D522 Task 1 Performance Assessment Python Network Automation, Device Inventory, Conne and more Exams Computer Science in PDF only on Docsity!

WGU D522 TASK 1 PERFORMANCE ASSESSMENT PYTHON

NETWORK AUTOMATION, DEVICE INVENTORY, CONNECTIVITY &

DNS COMPROMISE AUDIT COMPLETE 2026 GUIDE.

189 QUESTIONS

TABLE OF CONTENTS

Design and implement Python scripts for

automated network device discovery and

Q1 - an automated device inventory script Q2 - using Paramiko for network automation, Q3 - During a DNS compromise audit, Q4 - You are writing a Python Q5 - a Python network automation script Q6 - building a network inventory report, Q7 - You are auditing DNS records Q8 - a Python script for device Q9 - During a DNS compromise audit, Q10 - of the following Python code Q11 - a Python network automation script Q12 - During a DNS compromise audit, Q13 - a Python script that inventories Q14 - You are writing a Python Q15 - a Python script using Paramiko Q16 - auditing DNS records for a

Analyze network connectivity using Python

libraries and interpret results for

Q17 - a Python network automation script, Q18 - During a DNS compromise audit, Q19 - a Python script that connects Q20 - You are writing a Python Q21 - a Python network automation script Q22 - During a DNS compromise audit, Q23 - a Python script using Napalm Q24 - Python script uses the 'dnspython' Q25 - building a Python script to Q26 - a Python-based connectivity audit, you Q27 - Python script using the 'scapy' Q28 - writing a Python script to Q29 - a Python network automation script Q30 - Python script is designed to Q31 - During a D522 audit, an Q32 - Python script uses the nmap

Conduct DNS compromise audits,

identifying attack vectors and

Q33 - a D522 audit, a Python Q34 - D522 script uses Python's socket Q35 - During a DNS compromise audit, Q36 - D522 script uses scapy to Q37 - a D522 network inventory script, Q38 - D522 audit script uses paramiko Q39 - writing a Python script to Q40 - a D522 DNS compromise audit, Q41 - a Python network automation script Q42 - During a DNS compromise audit, Q43 - a Python script that uses Q44 - using Scapy to audit DNS Q45 - a Python script that uses Q46 - During a connectivity audit, you Q47 - a Python-based device inventory system, Q48 - analyzing a PCAP file for

Evaluate security and automation trade-offs

in network management

Q49 - a Python script that uses Q50 - During a DNS security audit, Q51 - a multi-vendor network, a Python Q52 - You are writing a Python Q53 - Python script uses Nornir to Q54 - During a DNS compromise audit, Q55 - Python audit script must verify Q56 - You are writing a Python Q57 - generating a compliance audit report Q58 - Python script uses the 'netmiko' Q59 - a Python connectivity audit, you Q60 - You are writing a Python Q61 - a Python-based network automation audit, Q62 - Given a Python script using Q63 - During a DNS compromise audit, Q64 - the context of the D

Synthesize network data to produce

actionable audit reports

Q65 - network engineer is writing a Q66 - a Python script that parses Q67 - During a DNS compromise audit, Q68 - the 'Connectivity' section of the Q69 - Python script is used to Q70 - the context of the D Q71 - a Python network automation script Q72 - During a DNS compromise audit, Q73 - writing a Python script to Q74 - a Python script that inventories Q75 - Review the exhibit. Which Python Q76 - a Python network automation audit, Q77 - auditing DNS records with Python's Q78 - a Python script that generates Q79 - For a Python script that Q80 - the context of DNS compromise

WGU D522 Task 1 Performance Assessment

Python Network Automation

Q81 - a Python network automation script Q82 - During a DNS compromise audit, Q83 - Given a YAML inventory file Q84 - a Python script using Paramiko, Q85 - Python script for device inventory Q86 - an audit script that parses Q87 - Python script using the 'concurrent.futures' Q88 - a DNS compromise audit, you Q89 - Python script for device inventory Q90 - writing a Python script to Q91 - During an automated inventory audit, Q92 - Python script that pings all Q93 - a DNS compromise audit, you Q94 - writing a Python script to Q95 - Python-based connectivity audit uses a Q96 - an audit of a Python

Device Inventory

Q97 - Python script for device inventory Q98 - auditing DNS for signs of Q99 - Python script that uses Scapy Q100 - a Python automation framework, which Q101 - a Python script using Netmiko Q102 - building a Python script to Q103 - a Python network automation script Q104 - You are writing a Python Q105 - a Python script using the Q106 - developing a Python script for Q107 - a Python script for DNS Q108 - You are writing a Python Q109 - a Python script for device Q110 - auditing DNS for compromise, you Q111 - a Python network automation script Q112 - During a DNS compromise audit,

Connectivity & DNS Compromise Audit

Complete 2026 Guide.

Q113 - Python audit script uses NAPALM Q114 - a Python script for device Q115 - network automation script uses Paramiko Q116 - a DNS compromise audit, you Q117 - Python script is designed to Q118 - During a DNS compromise audit, Q119 - Python script uses Netmiko to Q120 - a Python network automation audit, Q121 - a Python network automation script Q122 - network engineer is using Scapy Q123 - While analyzing a pcap file Q124 - a Python inventory script using Q125 - You are writing a Python Q126 - a Python script using the Q127 - You are analyzing a pcap Q128 - a Python script using the

Q1 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

In an automated device inventory script using Netmiko, you must handle devices

that occasionally fail authentication. Which exception-handling strategy best

preserves the integrity of the inventory data while maximizing automation

efficiency?

A. Catch all exceptions globally, log the failure, and continue to the next device without recording

partial data.

B. Use a try-except block per device, record the device with a status field indicating 'auth_failed',

and continue the loop. CORRECT

C. Retry authentication up to three times with exponential backoff before marking the device as

failed.

D. Terminate the entire script on the first authentication failure to avoid inconsistent inventory

states.

RATIONALE: Option B is correct because it isolates failures per device, records the failure status, and continues-preserving inventory completeness and auditability. Option A loses partial data and hides failure details. Option C is valid but not about exception handling; it's a retry strategy. Option D stops automation, which is inefficient and unnecessary.

Q2 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

When using Paramiko for network automation, which approach best ensures

secure handling of credentials in a version-controlled script?

A. Hardcode credentials in the script for simplicity and reliability.

B. Store credentials in plain text environment variables and reference them in the script.

C. Use an external secrets manager API to fetch credentials at runtime, with no credentials in

the script. CORRECT

D. Encrypt credentials with a hardcoded key in the script.

RATIONALE: Option C is correct because it removes credentials from code and centralizes security. Option A is a severe security risk. Option B is better than A but still exposes secrets in environment variables. Option D is flawed because the hardcoded key is as vulnerable as the password itself.

Q3 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

During a DNS compromise audit, you find that an internal DNS server is

configured to forward queries to an external resolver that is not controlled by your

organization. Which of the following is the most critical immediate risk?

A. Increased query latency due to external forwarding.

B. Potential for DNS spoofing and cache poisoning by the external resolver. CORRECT

C. Loss of internal DNS zone information during forwarding.

D. Inability to resolve internal hostnames.

RATIONALE: Option B is correct because an untrusted external resolver can be malicious, leading to spoofed responses and cache poisoning. Option A is a performance issue, not a security compromise. Option C is not typical; internal zones are not forwarded. Option D is unlikely if forwarding works; the risk is integrity, not availability.

Q4 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

You are writing a Python script to audit connectivity to a list of network devices.

Which method provides the most accurate and efficient verification of TCP port

443 connectivity across a large subnet?

A. Use a synchronous loop with socket.connect_ex() for each IP, with a 5-second timeout.

B. Use concurrent.futures.ThreadPoolExecutor with a max of 50 workers and

socket.connect_ex() with a 2-second timeout. CORRECT

C. Use ping (ICMP) to verify host reachability, assuming if the host responds, port 443 is open.

D. Use a single socket connection to a broadcast address to check all hosts simultaneously.

RATIONALE: Option B is correct because it provides parallelism and a reasonable timeout, balancing speed and accuracy. Option A is too slow for large subnets. Option C checks ICMP, not TCP port 443, so it's inaccurate. Option D is invalid because you cannot connect to a broadcast address for TCP.

Q7 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

You are auditing DNS records for a domain and find a TXT record with a value that

looks like a randomly generated string. What is the most likely purpose of this

record?

A. It is a DNS-based authentication for email (SPF).

B. It is a domain ownership verification token. CORRECT

C. It is a DNSSEC signature.

D. It is a record used for DNS tunneling.

RATIONALE: Option B is correct because random strings are commonly used for domain verification by services like Google or Let's Encrypt. Option A (SPF) has a specific format with 'v=spf1'. Option C (DNSSEC) uses RRSIG records, not TXT. Option D is possible but less likely; DNS tunneling often uses subdomains, not TXT records.

Q8 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

In a Python script for device inventory, you are using the 'get_facts()' method from

NAPALM. Which of the following is NOT a standard key returned by this method?

A. hostname

B. model

C. os_version

D. ip_address CORRECT

RATIONALE: Option D is correct because 'ip_address' is not a standard key in NAPALM's get_facts(); it typically returns vendor, model, hostname, fqdn, os_version, serial_number, and interface_list. The other options are standard keys.

Q9 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

During a DNS compromise audit, you discover that a recursive resolver is

answering queries for a domain that is not in its cache and for which it is not

authoritative. What is the most likely explanation?

A. The resolver is configured with a forwarder to an upstream server.

B. The resolver is a victim of cache poisoning. CORRECT

C. The resolver is performing iterative queries and the response is legitimate.

D. The resolver is configured with a root hint that is incorrect.

RATIONALE: Option B is correct because a resolver should not have an answer for a non-cached, non-authoritative domain unless it queries an authoritative server; if it responds without query, it suggests a poisoned cache. Option A is normal behavior, but the response would still come from the forwarder, not from the resolver's cache. Option C is normal recursion, but the resolver would have to query; the question implies it answers without querying. Option D is unlikely to cause a direct answer for a specific domain.

Q11 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

In a Python network automation script using Netmiko, a network engineer needs to

reliably detect when a device prompt is reached after sending a command. Which

approach is most robust against inconsistent terminal width settings and banner

variations?

A. Using the default '#' prompt with a short delay

B. Using the 'expect_string' parameter with a regex that matches the hostname and '#'

CORRECT

C. Setting 'global_delay_factor' to 2 and using the default prompt

D. Disabling paging and using a fixed 5-second sleep

RATIONALE: Netmiko's expect_string allows a regex to match the actual device prompt, which is robust to banner and width variations. The default '#' prompt can fail if the prompt includes a hostname or other characters. Delays and sleep are unreliable and inefficient.

Q12 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

During a DNS compromise audit, you discover that an internal DNS server is

responding with a 10.0.0.53 answer for a domain that should resolve to a public IP.

Which Python libraries would be most appropriate to automate verification across

multiple resolvers and detect this discrepancy?

A. socket and requests

B. dnspython and ipaddress CORRECT

C. subprocess and os

D. scapy and netaddr

RATIONALE: dnspython allows querying specific DNS servers and comparing responses, while ipaddress helps validate and categorize IP addresses. socket and requests are limited to system resolver and HTTP, not direct DNS queries. Scapy is overkill and lower-level.

Q13 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

In a Python script that inventories network devices via SNMPv3, you need to

ensure that authentication and privacy credentials are not exposed in the code

repository. Which approach is most secure while maintaining script portability?

A. Hardcoding credentials in a separate module that is gitignored

B. Using environment variables with a fallback to a local encrypted file CORRECT

C. Storing credentials in a plain text JSON file in the same directory

D. Prompting the user for credentials at runtime only

RATIONALE: Environment variables are a standard, portable way to keep secrets out of code, and a fallback to an encrypted file (e.g., using keyring or cryptography) provides flexibility. Hardcoding or plain text files risk exposure. Prompting at runtime is secure but not portable for automation.

Q14 DESIGN AND IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK DEVICE

DISCOVERY AND INVENTORY

You are writing a Python script to generate a device inventory report from a CSV

export of a network management system. The CSV has inconsistent column

headers and some rows have missing data. Which approach is most robust for

parsing and validating the data?

A. Use csv.DictReader and manually check for required keys, skipping rows with missing critical

fields CORRECT

B. Use pandas.read_csv with error_bad_lines=False and fillna('')

C. Use csv.reader and rely on index positions assuming a fixed schema

D. Use json.load after converting the CSV to JSON via an external tool

RATIONALE: DictReader allows header-based access, and explicit validation of required keys handles inconsistent headers and missing data gracefully. pandas may mask errors and requires additional dependencies. Index-based parsing breaks with schema changes. JSON conversion adds unnecessary steps.

Q17 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

In a Python network automation script, you need to execute a command on a

device and parse the output to extract interface status. The output format may vary

between IOS and IOS-XE. Which strategy is most maintainable for handling these

variations?

A. Write separate parsing functions for each OS and select based on device model

B. Use a single regex that matches both formats based on common patterns

C. Use textfsm templates for each OS and load the appropriate one CORRECT

D. Use a generic split() and index-based extraction

RATIONALE: TextFSM templates are designed for exactly this purpose-parsing semi-structured device output with variations. Separate functions lead to duplication, regex can be brittle, and index-based parsing is fragile.

Q18 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

During a DNS compromise audit, you need to detect DNS tunneling by analyzing

query logs. Which Python technique is most effective for identifying long

subdomains with high entropy?

A. Calculating Shannon entropy for each subdomain label and flagging those above a threshold

CORRECT

B. Counting the number of subdomain labels per query

C. Checking for queries to known malicious domains using a blocklist

D. Measuring the time between queries to detect unusual patterns

RATIONALE: DNS tunneling often uses high-entropy subdomains to encode data. Shannon entropy is a standard measure to detect such randomness. Label count and timing are less specific, and blocklists miss new domains.

Q19 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

In a Python script that connects to network devices via SSH, you need to ensure

that the script does not hang indefinitely if a device is unresponsive. Which

approach is most effective?

A. Setting a global socket timeout using socket.setdefaulttimeout()

B. Using the 'timeout' parameter in Paramiko's connect() method CORRECT

C. Implementing a signal-based alarm to interrupt the connection attempt

D. Relying on the underlying TCP stack's default timeout

RATIONALE: Paramiko's connect() timeout controls the TCP connection handshake, preventing hangs during connection. Socket.setdefaulttimeout is global and may affect other operations. Signal alarms are complex and not portable. TCP default timeouts are too long.

Q20 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

You are writing a Python script to audit DNS records for a domain using

dnspython. You need to ensure that the script can handle DNSSEC validation.

Which method is most appropriate?

A. Use dns.resolver.resolve() with the default settings, which automatically validates DNSSEC

B. Use dns.dnssec.validate() on the RRSIG records retrieved from the resolver

C. Use dns.resolver.resolve() with the 'dnssec' flag set to True

D. Use dns.query.query() with the 'want_dnssec' parameter to request DNSSEC records

CORRECT

RATIONALE: To retrieve DNSSEC records (RRSIG, DNSKEY), you must set the DO bit using want_dnssec=True in dns.query. dns.resolver.resolve() does not automatically validate or retrieve DNSSEC records by default. dns.dnssec.validate is for validating after retrieval.

Q23 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

In a Python script using Napalm to retrieve device facts from multiple vendors,

you must normalize the 'model' field across Cisco IOS, Juniper Junos, and Arista

EOS. Which strategy ensures consistent output for downstream inventory

analysis?

A. Use the raw 'model' field from each vendor's get_facts output

B. Apply a vendor-specific mapping dictionary to standardize model names CORRECT

C. Concatenate vendor and model to avoid collisions

D. Convert all models to uppercase and strip whitespace only

RATIONALE: Vendor-specific mapping normalizes disparate naming conventions (e.g., 'WS-C2960' vs 'EX4300' vs 'DCS-7050S') into a unified taxonomy. Raw fields are inconsistent, concatenation doesn't normalize, and case/whitespace fixes are insufficient.

Q24 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

A Python script uses the 'dnspython' library to perform DNS queries as part of a

compromise audit. Which approach correctly detects a DNS rebinding attack

where an attacker-controlled domain alternates between malicious and benign IP

addresses?

A. Perform a single DNS query and compare the IP to a blocklist

B. Perform multiple queries over time and analyze IP address changes CORRECT

C. Check the TTL value of the DNS response

D. Use TCP instead of UDP for DNS queries

RATIONALE: DNS rebinding involves time-based IP changes, so multiple queries over time are necessary to detect the pattern. A single query misses the alternation, TTL alone isn't indicative, and TCP doesn't prevent rebinding.

Q25 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

When building a Python script to inventory network devices, you must handle

SNMP v3 authentication. Which approach correctly implements USM with SHA and

AES while ensuring backward compatibility with devices that only support older

protocols?

A. Use only SNMPv3 with SHA and AES for all devices

B. Attempt SNMPv3 first, then fall back to SNMPv2c for devices that fail CORRECT

C. Use SNMPv1 for all devices to maximize compatibility

D. Use SNMPv2c with community strings for all devices

RATIONALE: A fallback mechanism allows secure SNMPv3 where supported while maintaining compatibility with older devices. Using only SNMPv3 excludes legacy devices, while SNMPv1/v2c lack security and are not suitable for a compromise audit.

Q26 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

In a Python-based connectivity audit, you must verify reachability to a list of IP

addresses. Which method provides the most accurate and efficient assessment of

TCP port connectivity, especially when ICMP is blocked?

A. Ping each IP address using the 'ping' command

B. Use the 'socket' module to attempt TCP connections to specific ports CORRECT

C. Use ARP requests to determine if hosts are online

D. Use traceroute to identify network path and infer reachability

RATIONALE: TCP connection attempts to relevant ports (e.g., 443, 22) confirm service-level connectivity even when ICMP is filtered. Ping relies on ICMP, ARP only works within a subnet, and traceroute infers path but not port availability.

Q29 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

In a Python network automation script using 'paramiko', you must execute

multiple commands on a network device and capture the output. Which method

ensures that each command completes before the next is sent, avoiding command

truncation?

A. Send all commands at once and read the combined output

B. Use 'exec_command' for each command sequentially

C. Send a command, wait for a prompt using 'recv_ready', then send the next CORRECT

D. Use a single shell channel and rely on the device's command queue

RATIONALE: Waiting for a prompt ensures the device is ready for the next command, preventing truncation. Sending all at once mixes outputs, 'exec_command' opens a new channel each time (less efficient), and relying on a command queue is unreliable.

Q30 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

A Python script is designed to audit DNS records for signs of compromise. Which

technique best detects a 'DNS cache poisoning' attack where an attacker injects

malicious records into a recursive resolver's cache?

A. Compare DNS responses from multiple independent resolvers CORRECT

B. Check the TTL values of DNS records

C. Monitor for high query rates to a specific domain

D. Use DNSSEC validation on all DNS queries

RATIONALE: Cross-referencing responses from independent resolvers can reveal discrepancies caused by cache poisoning. TTL values are not indicative, high query rates may be normal, and DNSSEC only protects if the domain is signed and validated.

Q31 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

During a D522 audit, an engineer uses Python's netmiko library to connect to a

legacy network device that only supports Telnet. The script successfully

authenticates but fails to execute commands reliably. Which combination of

Netmiko settings is MOST likely to resolve the issue?

A. Set device_type='cisco_ios_telnet' and increase global_delay_factor to 2. CORRECT

B. Set device_type='cisco_ios' and enable fast_cli=True.

C. Set device_type='cisco_ios_telnet' and set timeout=60.

D. Set device_type='terminal_server' and use session_log for debugging.

RATIONALE: Netmiko uses the device_type to select the correct terminal handling; for Telnet, cisco_ios_telnet is required. The global_delay_factor increases the delay between commands, compensating for slower Telnet connections. Option B uses the wrong device type and enables fast_cli, which can worsen reliability. Option C only adjusts the connection timeout, not command pacing. Option D is for terminal servers, not direct device access.

Q32 ANALYZE NETWORK CONNECTIVITY USING PYTHON LIBRARIES AND INTERPRET

RESULTS FOR TROUBLESHOOTING

A Python script uses the nmap library to scan a /24 subnet for open TCP/

ports. The script runs as a non-root user on a Linux host. Which scan technique

will be silently dropped or altered, and what is the best alternative?

A. TCP connect scan (-sT) will work; use it instead of SYN scan.

B. SYN scan (-sS) will work only if the user has CAP_NET_RAW; otherwise use -sT.

CORRECT

C. UDP scan (-sU) will work; use it to infer SSH availability.

D. Ping sweep (-sn) will fail due to lack of privileges; use -PS22 instead.

RATIONALE: SYN scan requires raw socket privileges, which non-root users typically lack. The nmap library may fall back to TCP connect scan or error. Using -sT (TCP connect) is the standard alternative for unprivileged users. Option A is partially correct but doesn't explain the privilege issue. Option C is irrelevant for SSH. Option D is incorrect because ping sweep often works with unprivileged ICMP echo; -PS22 is a TCP ping that also may need privileges.