nerdexam
GIAC

GSEC · Question #299

Which of the following utilities can be used to manage the Windows Firewall (WF) from the command line?

The correct answer is C. netsh.exe. The netsh (Network Shell) utility includes the 'advfirewall' context, which allows full command-line management of Windows Firewall rules, profiles, and settings.

Windows and Malware

Question

Which of the following utilities can be used to manage the Windows Firewall (WF) from the command line?

Options

  • Asecedit.exe
  • Bsc.exe
  • Cnetsh.exe
  • Dnet.exe

How the community answered

(26 responses)
  • A
    8% (2)
  • B
    12% (3)
  • C
    77% (20)
  • D
    4% (1)

Why each option

The netsh (Network Shell) utility includes the 'advfirewall' context, which allows full command-line management of Windows Firewall rules, profiles, and settings.

Asecedit.exe

secedit.exe is used to analyze and configure security policies defined in security templates and does not manage Windows Firewall rules.

Bsc.exe

sc.exe is the Service Control utility for starting, stopping, and querying Windows services and has no firewall rule management capability.

Cnetsh.exeCorrect

netsh.exe provides the 'netsh advfirewall' context specifically designed to create, modify, delete, and query Windows Firewall with Advanced Security rules from the command line. It supports configuring inbound and outbound rules, firewall profiles (domain, private, public), and logging settings without requiring the GUI console.

Dnet.exe

net.exe manages network shares, user accounts, and legacy services but cannot create or modify Windows Firewall rules.

Concept tested: Windows Firewall command-line management with netsh

Source: https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-contexts

Topics

#Windows Firewall#netsh#CLI tools#firewall management

Community Discussion

No community discussion yet for this question.

Full GSEC Practice