Solved

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

Posted on 2013-01-10
8
580 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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). …

713 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