Solved

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

Posted on 2013-01-10
8
572 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mini-GBIC port on HP switch 2 50
How to get maximum transfer speed over LAN 4 83
Can't remote with RDC through ASUS RT-N66W Router 3 66
NAS with google authentication 6 100
Hello All, I have been training on Multicast for a while now and whenever I start the topic , I find out that my friends /  Colleagues mention that they do not know how to test Multicast Joins. As most of the multicast would be video traffic and …
Hi there, This article summarizes what you need if you are going to set up your home or small business Network Attached Storage (NAS) to be accessible from the internet. Of course there are configuration differences based on your NAS or router ma…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

778 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