Solved

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

Posted on 2013-01-10
8
569 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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Generating groups 1 39
Windows Server 2012 Data Center Edition 11 62
New modem? 4 60
3Com 5500G-EI 3CR17254-91 dual-purposed ports 2 55
Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
When posting a question about a Cisco ASA, Cisco Router or Cisco Switch, it can aid diagnosis if a suitably sanitised copy of the config is provided. It is much better to leave as much of the configuration as original as possible, as it could be tha…
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…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now