Solved

what tool for Windows can do an IP scan, OS discover and db discover?

Posted on 2013-01-10
8
575 Views
Last Modified: 2013-01-10
I know that there is Nmap but I need the results to be easy to read in columns that just have stuff like:

IP | Hostname | Vendor | OS type | DB type

So with Nmap I could run something like a nmap -O and it will give me the OS amongst other things and then even do a -p and put in the SQL port to list SQL databases but it would be handy to have a tool that can do it all. If I was running it on Linux I could run a perl script to take just the valuable information, but I don't have access to a Linux box to install nmap. Also, the Windows version does not format things unless I'm not using it properly.

Ideas?
0
Comment
Question by:will1977
  • 5
  • 3
8 Comments
 
LVL 10

Accepted Solution

by:
George Khairallah earned 500 total points
ID: 38763744
This may not be exactly what you're looking for, but could put you on the right track... Perhaps you can use PowerShell to process NMAP XMLs and format them nicely...

Check out this Powershell script:
http://www.sans.org/windows-security/2009/06/11/powershell-script-to-parse-nmap-xml-output

p.s: I'm not really too proficient with PowerShell, but I do always try to find solutions with PowerShell when possible. Hope you find this helpful.
0
 

Author Comment

by:will1977
ID: 38763870
can you use a redirect in Powershell? IE - when I enter the command for ipv4, hostname, etc can I then use:

> output.txt (or even .csv)

to get the output into something like a spreadsheet. I haven't tried the script yet...
0
 

Author Comment

by:will1977
ID: 38763898
okay, I tried it now and it works...sort of. If you output the results to csv it does it in one column so there is no way to separate things. Say it finds the IP 10.0.0.1 and it's a cisco switch and it has a hostname, it puts it all on one line. It doesn't separate the different information into different columns...that's the only problem with it.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 10

Expert Comment

by:George Khairallah
ID: 38764026
Powershell is actually quite powerful, though as I mentioned, I don't consider myself an expert, but  for redirecting to CSV, there is a specific cmdlet export-csv that you can use.

I also found another thread for you that formats the output of the XML in columns like you wanted. I'm sure you will want to make some modifications to match the parameters of your XML output, but it'll put you on the right track. Check it out here:
http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/df781ba9-9533-4d5f-a5c0-735b3de2492d
0
 

Author Comment

by:will1977
ID: 38764582
that gave some awesome errors when I tried that. :)

I put in the path at the top to my xml file but then I'm trying to understand the declarations in Powershell. I'm getting:

Cannot index into a null array.
At C:\Users\whatever\Desktop\scans\test.ps1:13 char:9
+         $data[ <<<< 1] -match "(?s).+OS: (?<OS>.+).+Name: (?<Name>.+)\b.+System" | Out-Null
    + CategoryInfo          : InvalidOperation: (1:Int32) [], RuntimeException
    + FullyQualifiedErrorId : NullArray
 
You cannot call a method on a null-valued expression.
At C:\Users\whatever\Desktop\scans\test.ps1:18 char:27
+             OS   = $matches.OS.Trim <<<< ()
    + CategoryInfo          : InvalidOperation: (Trim:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Any ideas?
0
 

Author Comment

by:will1977
ID: 38764751
forget it...I got it worked out. Thanks.
0
 
LVL 10

Expert Comment

by:George Khairallah
ID: 38764763
Great to hear.
By the way, I was looking some more into the original script I sent you, from Sans.org, there is a YouTube with some specific usage instructions that allows you to specify what fields you want to output, and how to format them:
http://www.youtube.com/watch?v=B6wjM2CIMKs 

In case you're still looking to tweak it.
0
 

Author Comment

by:will1977
ID: 38765784
fantastic. thanks.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Setup ADSL modem with Router 7 88
How to setup PLEX PLUS on 2 computers 2 71
cradle point vpn to sonicwall 5 95
Cisco 2960 unable to add SFP modules to device 9 64
Before I go to far, let's explain HA (High Availability) and why you should consider it.  High availability is the mechanism used to provide redundancy to any service at the same site and appears as a single service to the users of that service.  As…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question