




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































189 QUESTIONS
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
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
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
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
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
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
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,
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
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?
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.
When using Paramiko for network automation, which approach best ensures
secure handling of credentials in a version-controlled 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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.
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?
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.