nerdexam
GIAC

GCIH · Question #632

Which of the following 'net' commands will show the file shares available on a Windows system?

The correct answer is C. net view \\hostname. The 'net view \\hostname' command enumerates shared resources available on a remote Windows system.

Reconnaissance, Scanning, and Enumeration

Question

Which of the following 'net' commands will show the file shares available on a Windows system?

Options

  • Anet use \hostname
  • Bnet share \hostname_
  • Cnet view \hostname
  • Dnet show \hostname

How the community answered

(20 responses)
  • C
    95% (19)
  • D
    5% (1)

Why each option

The 'net view \\hostname' command enumerates shared resources available on a remote Windows system.

Anet use \\hostname

'net use \\hostname' is used to connect to or disconnect from a shared resource, not to list what shares are available on a host.

Bnet share \\hostname_

'net share' manages and displays shares on the local machine only - it does not accept a remote hostname argument to enumerate shares on another system.

Cnet view \\hostnameCorrect

The 'net view \\hostname' command queries the specified remote computer and displays a list of its shared resources, including file shares and print shares. This makes it the correct tool for enumerating available shares on a target host during reconnaissance or administrative tasks.

Dnet show \\hostname

'net show' is not a valid Windows built-in net subcommand and will return an error if executed.

Concept tested: Windows net commands for share enumeration

Source: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh875576(v=ws.11)

Topics

#net commands#Windows enumeration#file shares#SMB

Community Discussion

No community discussion yet for this question.

Full GCIH Practice