Docsity

WGU D522 Task 2 Performance Assessment Python Network Remediation, DNS Configuration, Sys, Exams of Computer Science

Toggle sidebar
bg1
Page 1
WGU D522 TASK 2 PERFORMANCE ASSESSMENT PYTHON
NETWORK REMEDIATION, DNS CONFIGURATION, SYSTEM
RECOVERY & VALIDATION COMPLETE 2026 GUIDE
190 QUESTIONS
TABLE OF CONTENTS
Implement Python scripts for automated
network remediation and configuration
Q1 - a Python script using Netmiko
Q2 - forensic investigator must recover a
Q3 - During a DNS migration, you
Q4 - ransomware attack has encrypted critical
Q5 - You are writing a Python
Q6 - a Python-based DNS monitoring system,
Q7 - You are tasked with remediating
Q8 - implementing a system recovery plan,
Q9 - a Python script that uses
Q10 - For a Python script that
Q11 - a Python remediation script, a
Q12 - During DNS configuration validation, a
Q13 - remediation script must recover a
Q14 - a Python validation script, you
Q15 - Python remediation script needs to
Q16 - During a system recovery validation,
Q17 - a Python-based network remediation tool,
Q18 - Python script must validate that
Design and troubleshoot DNS configurations
in enterprise environments
Q19 - a Python remediation script, you
Q20 - Python validation script must check
Q21 - Python remediation script must reconfigure
Q22 - the Python remediation workflow, after
Q23 - Python script is designed to
Q24 - During system recovery, a Python
Q25 - Python network remediation script must
Q26 - a Python-based validation suite for
Q27 - remediating a DNS server that
Q28 - Python remediation script must recover
Q29 - the context of Python network
Q30 - Python validation script must confirm
Q31 - a Python remediation script, a
Q32 - DNS zone file has an
Q33 - During system recovery, a technician
Q34 - Python, a function is designed
Q35 - DNS administrator is implementing DNSSEC
Q36 - Python script uses the `paramiko`
Develop and execute system recovery plans
ensuring data integrity and minimal
Q37 - After a security incident, a
Q38 - a Python network remediation script,
Q39 - system recovery plan requires that
Q40 - a Python validation script, you
Q41 - During a network remediation effort,
Q42 - a Python network remediation script,
Q43 - During DNS configuration, you need
Q44 - You are recovering a Linux
Q45 - a Python validation script, you
Q46 - While analyzing a network breach,
Q47 - You are writing a Python
Q48 - Python script is designed to
Q49 - During system recovery, you need
Q50 - Python validation script must verify
Q51 - a Python-based remediation script, you
Q52 - configuring a split-horizon DNS setup
Q53 - During system recovery after a
Q54 - a Python validation script using
Validate system and network changes using
robust testing and monitoring techniques
Q55 - You must write a Python
Q56 - a Python remediation script, you
Q57 - validating network connectivity after rem...
Q58 - a system recovery plan, which
Q59 - You are writing a Python
Q60 - a Python-based validation framework, which
Q61 - During a Python remediation script,
Q62 - Given a DNS zone file
Q63 - a Python remediation script, you
Q64 - During validation of a network
Q65 - Python script must parse a
Q66 - a DNS configuration, you need
Q67 - Python script is designed to
Q68 - During validation of a DNS
Q69 - Python remediation script must modify
Q70 - Given a Python script that
Q71 - compromised Linux host exhibits ARP
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 2 Performance Assessment Python Network Remediation, DNS Configuration, Sys and more Exams Computer Science in PDF only on Docsity!

WGU D522 TASK 2 PERFORMANCE ASSESSMENT PYTHON

NETWORK REMEDIATION, DNS CONFIGURATION, SYSTEM

RECOVERY & VALIDATION COMPLETE 2026 GUIDE

190 QUESTIONS

TABLE OF CONTENTS

Implement Python scripts for automated

network remediation and configuration

Q1 - a Python script using Netmiko Q2 - forensic investigator must recover a Q3 - During a DNS migration, you Q4 - ransomware attack has encrypted critical Q5 - You are writing a Python Q6 - a Python-based DNS monitoring system, Q7 - You are tasked with remediating Q8 - implementing a system recovery plan, Q9 - a Python script that uses Q10 - For a Python script that Q11 - a Python remediation script, a Q12 - During DNS configuration validation, a Q13 - remediation script must recover a Q14 - a Python validation script, you Q15 - Python remediation script needs to Q16 - During a system recovery validation, Q17 - a Python-based network remediation tool, Q18 - Python script must validate that

Design and troubleshoot DNS configurations

in enterprise environments

Q19 - a Python remediation script, you Q20 - Python validation script must check Q21 - Python remediation script must reconfigure Q22 - the Python remediation workflow, after Q23 - Python script is designed to Q24 - During system recovery, a Python Q25 - Python network remediation script must Q26 - a Python-based validation suite for Q27 - remediating a DNS server that Q28 - Python remediation script must recover Q29 - the context of Python network Q30 - Python validation script must confirm Q31 - a Python remediation script, a Q32 - DNS zone file has an Q33 - During system recovery, a technician Q34 - Python, a function is designed Q35 - DNS administrator is implementing DNSSEC Q36 - Python script uses the paramiko

Develop and execute system recovery plans

ensuring data integrity and minimal

Q37 - After a security incident, a Q38 - a Python network remediation script, Q39 - system recovery plan requires that Q40 - a Python validation script, you Q41 - During a network remediation effort, Q42 - a Python network remediation script, Q43 - During DNS configuration, you need Q44 - You are recovering a Linux Q45 - a Python validation script, you Q46 - While analyzing a network breach, Q47 - You are writing a Python Q48 - Python script is designed to Q49 - During system recovery, you need Q50 - Python validation script must verify Q51 - a Python-based remediation script, you Q52 - configuring a split-horizon DNS setup Q53 - During system recovery after a Q54 - a Python validation script using

Validate system and network changes using

robust testing and monitoring techniques

Q55 - You must write a Python Q56 - a Python remediation script, you Q57 - validating network connectivity after rem... Q58 - a system recovery plan, which Q59 - You are writing a Python Q60 - a Python-based validation framework, which Q61 - During a Python remediation script, Q62 - Given a DNS zone file Q63 - a Python remediation script, you Q64 - During validation of a network Q65 - Python script must parse a Q66 - a DNS configuration, you need Q67 - Python script is designed to Q68 - During validation of a DNS Q69 - Python remediation script must modify Q70 - Given a Python script that Q71 - compromised Linux host exhibits ARP

WGU D522 Task 2 Performance Assessment

Python Network Remediation

Q72 - a Python DNS remediation script, Q73 - After a ransomware event, a Q74 - Python approach best validates that Q75 - a Python network remediation script, Q76 - Python script must remediate a Q77 - You are writing a Python Q78 - a Python recovery script for Q79 - Python-based validation method best confirms Q80 - During a DNS remediation, you Q81 - During a Python remediation script, Q82 - a DNS configuration validation script, Q83 - After a catastrophic system failure, Q84 - a Python validation script for Q85 - Your Python remediation script must Q86 - a system recovery plan, you Q87 - You are writing a Python Q88 - a network remediation script, you

DNS Configuration

Q89 - You are validating a DNS Q90 - Python remediation script must verify Q91 - During a security audit, a Q92 - a Python-based system recovery tool, Q93 - Python validation script must verify Q94 - remediating a network issue with Q95 - Python script must validate that Q96 - a Python remediation script, you Q97 - Python validation script must ensure Q98 - writing a Python script to Q99 - a Python network remediation script, Q100 - Python script is used to Q101 - a Python-based remediation script, you Q102 - Python script is designed to Q103 - During system recovery after a Q104 - a Python validation script for Q105 - Python script is used to

System Recovery & Validation Complete

2026 Guide

Q106 - validating a system recovery plan, Q107 - a Python-based remediation workflow, you Q108 - writing a Python script to Q109 - Python script is used to Q110 - a Python script for DNS Q111 - a Python remediation script using Q112 - During DNS configuration for a Q113 - server fails to boot after Q114 - a Python network remediation script, Q115 - network has experienced a DNS Q116 - You are writing a Python Q117 - a Python remediation script, you Q118 - During system recovery, you need Q119 - Python script must validate that Q120 - a DNS remediation plan, you Q121 - Python remediation script must restore Q122 - During DNS configuration remediation, you

Foundations of Cybersecurity and Systems

Administration

Q123 - system recovery plan requires restoring Q124 - a Python validation script, you Q125 - remediation script must temporarily disable Q126 - validating DNS configuration, you need Q127 - system recovery plan includes verifying Q128 - Python remediation script must handle Q129 - validating network remediation, you must Q130 - Python script is used to Q131 - remediating a network outage in Q132 - During DNS configuration, a new Q133 - system fails to boot after Q134 - a Python validation script for Q135 - automating DNS record changes, which Q136 - After a ransomware attack, which Q137 - a Python-based validation framework for Q138 - DNS record type is most Q139 - During system recovery, you must

Q1 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

In a Python script using Netmiko to remediate a network outage, which approach

best ensures idempotent configuration changes while minimizing service

disruption?

A. Use 'send_config_set' to push the entire running-config from a backup file, overwriting all

current settings.

B. First execute 'send_command' to retrieve current config, then use 'send_config_set' with a

conditional diff to apply only missing or incorrect lines. CORRECT

C. Reload the device to factory defaults and then apply a known-good configuration from an

external server.

D. Use 'send_command' to issue 'copy running-config startup-config' to force a rollback on next

reboot.

RATIONALE: Option B is correct because it uses a read-then-compare approach, ensuring only necessary changes are applied, which is idempotent and minimizes disruption. Option A may cause outages by overwriting unrelated configs; C is overly disruptive; D does not remediate but merely saves current state.

Q2 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

A forensic investigator must recover a critical deleted file from an ext4 filesystem.

Which Python library or method would be most appropriate for low-level analysis

and recovery, given that the filesystem is not mounted?

A. Use the 'os' module to traverse the filesystem and recover files from the trash directory.

B. Use the 'pytsk3' library to open the raw disk image and parse the ext4 structures to extract the

file. CORRECT

C. Use the 'shutil' module to copy the file from the backup server.

D. Use the 'subprocess' module to run 'extundelete' with default parameters on the mounted

filesystem.

RATIONALE: pytsk3 is a Python binding for The Sleuth Kit, which allows direct analysis of disk images without mounting, making it ideal for forensic recovery. The os module cannot access deleted files, shutil requires a backup, and running extundelete on a mounted filesystem risks further damage.

Q3 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

During a DNS migration, you must ensure that all authoritative nameservers for a

zone are synchronized. Which of the following is the most reliable method to

validate that the zone transfer (AXFR) is complete and consistent?

A. Compare the serial numbers in the SOA records of all authoritative servers using dig.

CORRECT

B. Use a Python script to query each server for a random sample of records and compare the

TTLs.

C. Check the zone file timestamps on each server to ensure they are within 5 minutes of each

other.

D. Run 'dig @primary example.com AXFR' and verify the response has no truncated flag.

RATIONALE: The SOA serial number is the definitive indicator of zone version; if all servers report the same serial, the zone transfer is consistent. Sampling records (B) is incomplete, timestamps (C) are not reliable due to clock skew, and a single AXFR (D) does not verify all servers.

Q4 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

A ransomware attack has encrypted critical servers. The recovery team has clean

backups but must restore to a secure environment. Which sequence of actions

best ensures a safe and validated recovery?

A. Restore all servers simultaneously from backup, then reconnect to the network, then run

antivirus scans.

B. Isolate the recovery network, restore one server at a time from verified backups, apply

security patches, then validate services before reconnecting. CORRECT

C. Reimage all servers with the original OS installation media, copy data from backups, and

immediately reconnect to production.

D. Use a Python script to automate the restoration of all servers from backup, then change all

passwords, and go live.

RATIONALE: Option B follows best practices: isolation prevents reinfection, staged restoration allows iterative validation, patching closes vulnerabilities, and validation ensures functionality. Option A risks rapid reinfection, C lacks patching and validation, D skips isolation and validation steps.

Q7 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

You are tasked with remediating a network issue where a misconfigured DHCP

server is handing out incorrect IP addresses. Using Python, which approach

would be most effective to detect and automatically correct the problem?

A. Write a script that periodically pings the DHCP server's IP and restarts the service if it fails.

B. Use Scapy to listen for DHCP offers, compare the offered IPs to the expected subnet, and

block rogue offers via ACL updates on the switch. CORRECT

C. Configure the DHCP server to use a different IP range and reboot all clients.

D. Use a script to manually assign static IP addresses to all clients based on a predefined list.

RATIONALE: Option B uses packet inspection to identify rogue DHCP offers and dynamically remediates by updating ACLs, which is automated and targeted. Option A only checks service availability, not configuration correctness; C is a manual workaround; D is static and not a remediation of the DHCP issue.

Q8 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

When implementing a system recovery plan, which of the following is the most

critical factor to ensure that the recovery is successful and validated?

A. The recovery team has access to the latest backup tapes.

B. The recovery process is fully automated using Python scripts.

C. The recovery plan includes clear rollback procedures and validation checkpoints. CORRECT

D. The recovery environment has the same hardware specifications as the production

environment.

RATIONALE: A recovery plan must include rollback procedures and validation checkpoints to ensure each step is correct before proceeding. Access to backups (A) is necessary but not sufficient; automation (B) can introduce errors without validation; hardware similarity (D) is not always required for logical recovery.

Q9 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

In a Python script that uses the 'dnspython' library to perform a DNS zone transfer,

which of the following is a critical security consideration?

A. Ensure that the zone transfer request is sent over TCP port 53, not UDP.

B. Verify that the server allows zone transfers only to authorized IP addresses. CORRECT

C. Use the 'dns.query.xfr' function with a timeout to avoid hanging.

D. Parse the zone data to ensure that all records have valid TTLs.

RATIONALE: Zone transfers should be restricted to authorized secondary servers; allowing unrestricted AXFR is a common security vulnerability. Option A is a technical detail, not security; C is about reliability; D is about data validation, not security.

Q10 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

For a Python script that performs network remediation, which of the following best

describes the principle of 'least privilege' when applied to the script's execution?

A. The script should run with the highest privileges available to ensure it can make all necessary

changes.

B. The script should use separate credentials for each device, with only the permissions required

for the specific remediation task. CORRECT

C. The script should be executed by a service account that has administrative rights on all

network devices.

D. The script should use the root account to avoid authentication failures during remediation.

RATIONALE: Least privilege means granting only the necessary permissions for a task. Using separate credentials per device with minimal required permissions limits the blast radius if the script is compromised. Option A and C grant excessive privileges, and D is unsafe.

Q13 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

A remediation script must recover a Windows system from a corrupted boot

configuration data (BCD) store. Which sequence of commands executed via

Python's subprocess module is correct?

A. bootrec /fixmbr, bootrec /fixboot, bootrec /rebuildbcd CORRECT

B. bootrec /rebuildbcd, then bcdedit /export, then bcdedit /import

C. bcdedit /deletevalue, then bootrec /fixboot, then sfc /scannow

D. bootsect /nt60 SYS, then bcdboot C:\Windows, then bootrec /fixmbr

RATIONALE: Option A is the standard sequence for BCD repair: fixmbr, fixboot, and rebuildbcd. Option B reverses the order and adds unnecessary export/import. Option C deletes a value that may not exist. Option D uses bootsect and bcdboot, which are for different scenarios like rebuilding the boot sector, not repairing a corrupted BCD.

Q14 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

In a Python validation script, you must verify that all DNS records for a migrated

web server are consistent across multiple authoritative servers. Which approach

ensures the highest confidence?

A. Query each server sequentially and compare the IP addresses returned for the A record.

B. Perform a zone transfer (AXFR) from each server and compare the full zone data.

C. Use dig with the +trace option to follow the delegation chain from the root.

D. Check the SOA serial number on each server and ensure they match. CORRECT

RATIONALE: Option D is correct because a matching SOA serial number indicates that all authoritative servers are serving the same version of the zone, which is the most reliable consistency check. Option A only checks one record type and may miss inconsistencies. Option B is often disabled for security. Option C verifies resolution path but not consistency across servers.

Q15 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

A Python remediation script needs to revert a network adapter to DHCP but must

preserve any existing static DNS server settings. Which PowerShell command

executed by the script accomplishes this?

A. Set-NetIPInterface -InterfaceAlias 'Ethernet' -Dhcp Enabled CORRECT

B. Set-DhcpClient -InterfaceAlias 'Ethernet' -Enabled $true

C. Remove-NetIPAddress -InterfaceAlias 'Ethernet' -Confirm:$false

D. New-NetIPAddress -InterfaceAlias 'Ethernet' -Dhcp Enabled

RATIONALE: Option A is correct because Set-NetIPInterface with -Dhcp Enabled changes the IP configuration to DHCP without affecting DNS settings. Option B is not a valid cmdlet. Option C only removes the IP address but does not enable DHCP. Option D is used to add a static IP, not enable DHCP.

Q16 IMPLEMENT PYTHON SCRIPTS FOR AUTOMATED NETWORK REMEDIATION AND

CONFIGURATION MANAGEMENT

During a system recovery validation, a Python script must ensure that the

Windows Recovery Environment (WinRE) is properly configured. Which command

verifies this?

A. reagentc /info CORRECT

B. bcdedit /enum {current}

C. winre.wim /verify

D. dism /get-wiminfo /wimfile:C:\Windows\System32\Recovery\winre.wim

RATIONALE: Option A is correct because reagentc /info displays the current status and configuration of the Windows Recovery Environment. Option B shows boot configuration but not WinRE status. Option C is not a valid command. Option D lists the contents of the WIM file but does not verify that WinRE is enabled.

Q19 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

In a Python remediation script, you must ensure that a Windows service is set to

'Automatic' and started after a system recovery. Which sequence of commands is

correct?

A. Set-Service -Name 'ServiceName' -StartupType Automatic; Start-Service -Name

'ServiceName'

B. sc.exe config ServiceName start= auto; sc.exe start ServiceName

C. wmic service where name='ServiceName' set StartMode='Auto'; net start ServiceName

D. All of the above are equally correct. CORRECT

RATIONALE: Option D is correct because all three methods are valid ways to set a service to automatic and start it in Windows. Set-Service is PowerShell, sc.exe is a command-line tool, and wmic is a legacy tool, but all achieve the desired result. The question asks for a correct sequence, and all are correct.

Q20 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

A Python validation script must check whether a network adapter's DNS servers

are set to a specific internal DNS server. Which PowerShell command provides the

current DNS server addresses for an interface?

A. Get-DnsClientServerAddress -InterfaceAlias 'Ethernet' CORRECT

B. Get-NetIPConfiguration -InterfaceAlias 'Ethernet' | Select-Object DNSServer

C. ipconfig /all | Select-String 'DNS Servers'

D. Resolve-DnsName -Name 'example.com' -Server '10.0.0.1'

RATIONALE: Option A is correct because Get-DnsClientServerAddress specifically returns the DNS server addresses configured for a network interface. Option B also works but is less direct. Option C is a text-parsing approach that is error-prone. Option D tests connectivity to a DNS server but does not show the current configuration.

Q21 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

A Python remediation script must reconfigure a compromised DNS server. Which

approach ensures the script's changes are validated against the intended state

and can be rolled back if validation fails?

A. Use a declarative configuration check with a rollback snapshot taken before any changes are

applied. CORRECT

B. Apply changes directly and rely on the DNS server's event logs for post-hoc validation.

C. Write a script that overwrites the DNS configuration and restarts the service without capturing

prior state.

D. Use a configuration management tool that applies changes but does not support rollback.

RATIONALE: Declarative checks compare the actual state to the desired state, and a rollback snapshot ensures reversibility. Direct application without a snapshot (B, C) lacks a recovery path, and (D) contradicts the need for rollback. This aligns with infrastructure-as-code best practices.

Q22 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

In the Python remediation workflow, after patching a vulnerability that allowed

DNS cache poisoning, which validation step is essential to confirm the fix without

waiting for a full cache refresh cycle?

A. Flush the DNS resolver cache and query an external authoritative server to confirm the

response is not spoofed. CORRECT

B. Restart the DNS service and verify the service is running using systemctl.

C. Check the DNS server's configuration file for syntax errors using named-checkconf.

D. Monitor the server's network traffic for a period equal to the TTL of cached records.

RATIONALE: Flushing the cache and querying an external authoritative server tests the actual resolution path and verifies that the patched server does not return spoofed data. Restarting (B) only checks service status, (C) checks syntax, and (D) waits for TTL expiration, which is inefficient and does not actively test for spoofing.

Q25 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

A Python network remediation script must reconfigure a router's access control

list (ACL) to block a specific malicious IP. Which approach ensures the change is

applied atomically and does not disrupt existing traffic?

A. Append the new rule to the end of the ACL and apply it immediately.

B. Create a new ACL with the desired rules, apply it to the interface, and then remove the old

ACL. CORRECT

C. Delete the entire ACL and recreate it with the new rule included.

D. Modify the ACL in place by inserting the rule at the top.

RATIONALE: Creating a new ACL and swapping it atomically minimizes the window of misconfiguration. Appending (A) may leave the ACL in an inconsistent state if the rule order matters. Deleting and recreating (C) causes a gap in protection. Inserting at the top (D) may disrupt traffic due to rule order changes.

Q26 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

In a Python-based validation suite for DNS remediation, which test verifies that a

DNS server correctly resolves a domain to a specific IP address while also

confirming that the response is not from a cache?

A. Use dig with the +norec flag to query the authoritative server directly.

B. Use nslookup with the server set to the resolver to check the cached response.

C. Use dig with the +trace option to follow the resolution path from the root servers. CORRECT

D. Use host with the -C option to compare SOA records.

RATIONALE: The +trace option performs a full iterative resolution, bypassing caches and verifying each step. +norec (A) queries only the authoritative server, which is useful but does not test the full path. nslookup (B) may return cached results. host -C (D) checks SOA records, not resolution.

Q27 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

When remediating a DNS server that has been compromised, a Python script must

ensure that the attacker's backdoor is removed. Which action is most critical to

prevent persistence?

A. Change all DNS zone file permissions to read-only.

B. Rotate the DNS server's TSIG keys and update all configuration files. CORRECT

C. Block all incoming traffic on port 53 except from trusted IPs.

D. Disable recursion on the DNS server to prevent cache poisoning.

RATIONALE: Rotating TSIG keys invalidates any attacker-held credentials, preventing them from re-authenticating or updating zones. Changing permissions (A) may not remove existing backdoors. Blocking traffic (C) is a network-level control but does not address the server itself. Disabling recursion (D) mitigates cache poisoning but does not remove backdoors.

Q28 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

A Python remediation script must recover a system from a failed DNS

configuration that prevents name resolution. Which order of operations is correct

for the script to follow?

A. Restore the DNS configuration from backup, restart the DNS service, then flush the resolver

cache. CORRECT

B. Flush the resolver cache, restore the DNS configuration, then restart the DNS service.

C. Restart the DNS service, flush the resolver cache, then restore the DNS configuration.

D. Flush the resolver cache, restart the DNS service, then restore the DNS configuration.

RATIONALE: Restoring the correct configuration first ensures the service starts with valid settings. Restarting the service applies the restored configuration. Flushing the resolver cache clears any poisoned or stale entries. The other orders may leave the system with an invalid configuration or stale cache.

Q31 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

In a Python remediation script, a network engineer uses the subprocess module

to execute ipconfig /flushdns on a Windows host. The script must verify that the

command succeeded before proceeding. Which approach correctly captures and

interprets the command's exit status?

A. Use subprocess.call(['ipconfig', '/flushdns']) and check if the return code equals 0.

B. Use subprocess.Popen with stdout=subprocess.PIPE and parse the output for the string

'Successfully flushed'.

C. Use subprocess.run(['ipconfig', '/flushdns'], check=True) and catch

subprocess.CalledProcessError. CORRECT

D. Use os.system('ipconfig /flushdns') and check if the result is None.

RATIONALE: subprocess.run with check=True raises CalledProcessError on non-zero exit codes, providing robust error handling. subprocess.call returns the exit code but doesn't raise, requiring manual check. Parsing output is fragile. os.system returns the exit code on Unix but not reliably on Windows and doesn't raise.

Q32 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

A DNS zone file has an SOA record with a refresh of 3600, retry of 600, expire of

604800, and a negative caching TTL of 300. If a secondary server fails to reach the

primary at the first refresh, what is the next action per RFC 1034/1035?

A. It immediately retries every 600 seconds until successful.

B. It waits 3600 seconds, then retries every 600 seconds. CORRECT

C. It marks the zone as expired and stops serving it after 604800 seconds.

D. It uses the negative caching TTL to cache the failure for 300 seconds.

RATIONALE: The SOA refresh interval is the primary retry cycle; if a refresh fails, the secondary retries after the retry interval. The expire field determines when the zone is considered stale. Negative caching TTL applies to negative responses, not to server-to-server zone transfers.

Q33 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

During system recovery, a technician must restore a Linux server's root filesystem

from a backup taken with tar. Which command sequence ensures proper

restoration of permissions, ownership, and extended attributes while avoiding

overwriting critical runtime files?

A. tar -xvpzf /backup/root.tar.gz -C /

B. tar -xzpzf /backup/root.tar.gz --numeric-owner --xattrs -C /mnt/recovery and then `mount

--bind` CORRECT

C. tar -xzpzf /backup/root.tar.gz -C / --same-owner --preserve-permissions

D. tar -xzpzf /backup/root.tar.gz -C / --no-overwrite-dir

RATIONALE: Restoring to a separate mount point (/mnt/recovery) avoids overwriting the live system and allows validation. --numeric-owner and --xattrs preserve IDs and extended attributes. Option A and C restore directly to / risking overwriting running processes. Option D only prevents overwriting directories but still writes to live root.

Q34 DESIGN AND TROUBLESHOOT DNS CONFIGURATIONS IN ENTERPRISE

ENVIRONMENTS

In Python, a function is designed to validate network configurations by comparing

expected and actual DNS records. The function returns True if all records match.

Which code snippet correctly implements this validation using all() with a

generator expression?

A. return all(record in actual for record in expected)

B. return [record in actual for record in expected].count(True) == len(expected)

C. return all(actual[record] == expected[record] for record in expected) CORRECT

D. return any(record not in actual for record in expected) == False

RATIONALE: Option C compares values for each key, which is needed for exact record matching. Option A only checks presence, not equality. Option B is inefficient and still only checks presence. Option D is logically equivalent to all() but less readable and uses any incorrectly.