TFNation 2017 ►

◄ Project Zebra: blood and iron and penguins

2017-09-09 📌 A few audit testing scripts

Tags 🏷 All 🏷 Tech 🏷 Audit

Some work-related scripts in case anyone finds them useful or I want them whilst I'm visiting somewhere. I'll probably update this when I have more in a fit state to add, and would also recommend checking out scripts at -- so far I haven't explored PowerShell a great deal and prefer to follow the principle of "living off the land" rather than looking to other software, so most will be batch or VBScript snippets.

But before those, here's a handy one for SQL Server 2005 onwards (cache) which produces three reports showing permissions at server, database and object level. Although it's best run with the sysadmin or serveradmin server level permission, depending on server configuration it might give you useful output for the first two reports even without --

First, this is a fairly specific one I find helpful for checking folders set up to receive files for import into a system, where it's often the case there's a share that contains subfolders for each input. Again, it's intended to be run with suitable permissions, and was written under Windows 7. Every bit of whitespace is relevant to the parsing.

For more general testing it's important to be able to tell what's exposed to an ordinary user on a network. Since NetBIOS has been deprecated you probably want to ask Active Directory what servers are on a domain, and this is essentially the same query you can make via the "My Network Places" GUI.

Once you know what servers you're looking at, you probably want to see what shared folders each has and whether the contents are accessible.

💬 Comments are off, but you can use the mail form to contact or see the about page for social media links.