Extremely simple and quick way to gather a basic inventory of hosts on your network This was created using Centos 7, Apache, MariaDB, and PHP.
- Create a database called "inventory".
- Import the .sql file into that database.
- Set up an Apache server with PHP support.
- In the codebase, there's an includes dir with a database class. Put the database credentials in there.
- Put the codebase into the web root so that apache can serve up the files (thought that one would be obvious)
- Put the bash script on a Linux box that can scan all the target hosts, but can also reach the web server created above. For example, you could put one of these on a jump box for each isolated environment. This script assumes that you have put a public key on each target linux host that will allow the script to log in and gather the information.
- Put the scan range(s) into the script.
- Put the hostname of the server you're going to post all this information to into the script.
- Put the vbscript on a Windows box. This could be a Windows jump box. You'll need to put credentials into the vbscript that are valid on whatever servers you are scanning. If you want to try multiple credentials, the script allows for that. Just add multiple items in the arrUser and arrPassword arrays. It will loop through them. Make sure the credentials match up (i.e. the first username goes with the first password, etc).
- Put the appropriate script on each jump host such that all servers in all environments can be reached.
- Put the scan range into the script.
- Put in the hostname of the server you're going to post all this information to.
- The scripts run on the jump hosts, and scan the target host subnet ranges. They then take the information that they gather and post it back to the web server.