312-50V10 · Question #275
A pentester gains access to a Windows application server and needs to determine the settings of the built- in Windows firewall. Which command would be used?
The correct answer is A. Netsh firewall show config. The netsh command-line utility is the correct Windows tool for querying and configuring the built-in Windows Firewall from the command prompt.
Question
A pentester gains access to a Windows application server and needs to determine the settings of the built- in Windows firewall. Which command would be used?
Options
- ANetsh firewall show config
- BWMIC firewall show config
- CNet firewall show config
- DIpconfig firewall show config
How the community answered
(22 responses)- A86% (19)
- B9% (2)
- D5% (1)
Why each option
The netsh command-line utility is the correct Windows tool for querying and configuring the built-in Windows Firewall from the command prompt.
The 'netsh firewall show config' command (or its modern equivalent 'netsh advfirewall show allprofiles') is the built-in Windows utility for displaying firewall configuration, including enabled rules, exceptions, and profiles. It is part of the Network Shell (netsh) toolset included in all modern Windows versions and provides detailed firewall state information accessible from any command prompt.
WMIC (Windows Management Instrumentation Command-line) does not have a 'firewall' verb or subcommand for querying Windows Firewall settings.
The 'net' command is used for network share and service management and has no 'firewall' subcommand.
'Ipconfig' is used to display and manage IP address configuration for network interfaces and has no firewall querying capability.
Concept tested: Windows netsh command for firewall enumeration
Source: https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-advfirewall-firewall
Topics
Community Discussion
No community discussion yet for this question.