Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: VBScript to audit shares and share permissions |
|---|---|
| Date: | Tue, 21 Sep 2004 11:04:19 -0500 |
You can use this scripts: Enumerate Published Shares (http://www.microsoft.com/technet/community/scriptcenter/filefolder/scrff34.mspx) Const ADS_SCOPE_SUBTREE = 2 Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" Set objCOmmand.ActiveConnection = objConnection objCommand.CommandText = "Select Name, unCName, ManagedBy from " _ & "'LDAP://DC=Fabrikam,DC=com' where objectClass='volume'" objCommand.Properties("Timeout") = 30 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE objCommand.Properties("Cache Results") = False Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst Do Until objRecordSet.EOF Wscript.Echo "Share Name: " & objRecordSet.Fields("Name").Value Wscript.Echo "UNC Name: " & objRecordSet.Fields("uNCName").Value Wscript.Echo "Managed By: " & objRecordSet.Fields("ManagedBy").Value objRecordSet.MoveNext Loop Enumerate File Attributes (http://www.microsoft.com/technet/community/scriptcenter/filefolder/scrff34.mspx) Const ADS_SCOPE_SUBTREE = 2 Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" Set objCOmmand.ActiveConnection = objConnection objCommand.CommandText = "Select Name, unCName, ManagedBy from " _ & "'LDAP://DC=Fabrikam,DC=com' where objectClass='volume'" objCommand.Properties("Timeout") = 30 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE objCommand.Properties("Cache Results") = False Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst Do Until objRecordSet.EOF Wscript.Echo "Share Name: " & objRecordSet.Fields("Name").Value Wscript.Echo "UNC Name: " & objRecordSet.Fields("uNCName").Value Wscript.Echo "Managed By: " & objRecordSet.Fields("ManagedBy").Value objRecordSet.MoveNext Loop Rgds. On Thu, 16 Sep 2004 14:56:56 -0400, Klenke, Brian <brian.klenke@53.com> wrote:
I am looking for a VBScript that will return a list of shares of a given computer, along with each share's share permissions and NTFS permissions... Brian Klenke, CISSP CCNA This e-mail transmission contains information that is confidential and may be privileged. It is intended only for the addressee(s) named above. If you receive this e-mail in error, please do not read, copy or disseminate it in any manner. If you are not the intended recipient, any disclosure, copying, distribution or use of the contents of this information is prohibited. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please erase it from your computer system. Your assistance in correcting this error is appreciated. --------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- __________________________________ Lucas A. Gomez --------------------------------------------------------------------------- ---------------------------------------------------------------------------
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Restrict Clinet IP address on Terminal Service, Mike Arduo |
|---|---|
| Next by Date: | RE: How to Enforce Complex Password Policy for Selected Users Only, Laura A. Robinson |
| Previous by Thread: | RE: VBScript to audit shares and share permissions, wnorth |
| Next by Thread: | Re: VBScript to audit shares and share permissions, H Carvey |
| Indexes: | [Date] [Thread] [Top] [All Lists] |