Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enumerating network shares

Is there a part of the .net framework that enumerates the file shares on a host? I've found some things that use the WMI, but I'd prefer not to go that route.

like image 519
WedTM Avatar asked Jan 19 '10 04:01

WedTM


People also ask

What tool can you use to enumerate SMB shares?

SMBMap allows users to enumerate samba share drives across an entire domain. List share drives, drive permissions, share contents, upload/download functionality, file name auto-download pattern matching, and even execute remote commands.

What is enumerating SMB?

Enumeration in SMB: What was formerly known as Common Internet File System has been updated as SMB or Server Message Block. As an application layer network protocol, it functions. It is made to function as a file-sharing protocol.

What is RPC enumeration?

RPC enumeration is the process of discovering what services are running on what port numbers.

How do I connect to Samba share?

Connect to a SMB ShareIn the Server Address field, enter smb:// to define the network protocol for SMB, and then enter either the IP address or the hostname of the server. To add the server to your Favorite Servers list, click the '+' button. Click Connect to connect to the share.


1 Answers

You can use NetShareEnum win32 api. http://www.pinvoke.net/default.aspx/netapi32/netshareenum.html

Or look at the following project which is .NET Wrapper over it. http://www.codeproject.com/KB/IP/networkshares.aspx

like image 133
Muhammad Hasan Khan Avatar answered Oct 19 '22 02:10

Muhammad Hasan Khan