vcr icon indicating copy to clipboard operation
vcr copied to clipboard

Change IP to hostname/FQDN reports by host?

Open Nexxic opened this issue 8 years ago • 7 comments

I was just wondering if it is possible to change the showed IP under reports by host on the dashboard to show the username or FQDN instead? I've tried to make it so myself by changing the variable, but my Powershell skills aren't very high..

Nexxic avatar Apr 10 '17 12:04 Nexxic

Are referring to the colored heat map on the main page that shows the master table of IPs? You want to see hostnames instead? Just making sure I'm understanding you properly.

curi0usJack avatar Apr 10 '17 16:04 curi0usJack

Yes exactly, In the table below 'Reports by host'. http://i.imgur.com/c6OLGpa.png Sorry, i was kind of in a rush when i wrote that post ;)

I saw that the hostname was output in the individual host report ("Vulnerability Report Findings for Host: ") So i tried to use that variable ($targethost.hostname) in the href instead of $ipaddress but never got it to work, like i said, my powershell skills aren't that advanced ;) Does that sound like it would work? Which variable would be correct to use if so? $html = "<td class=""$cssclass""><a href="".\reportsbyhost$linkpath.html"">$ipaddress"

Nexxic avatar Apr 10 '17 16:04 Nexxic

Hi,

Fantastic script and HTML output, great work.

Was just wondering if this has been resolved for getting the heat map to display the FQDN rather than the IP address?.

I notice that when you click on the IP address of the host it will display the FQDN on the Vulnerabilities page.

disco1986 avatar May 04 '17 08:05 disco1986

Is there any update on getting hostname instead of IP? If short-lease DHCP makes the findings kinda hard to triage.

jasonkalwa avatar Sep 27 '17 08:09 jasonkalwa

curi0usJack , Fantastic tool, thanks for making it available. I too am trying to get the heatmap to display hostnames/FQDN instead of ip addresses. I have tried hacking and slashing at your script, but my power shell skills are lacking.

If there is any way you could find the time to edit this, perhaps make a toggle, or even just provide the specific code we would need to replace in order to see this info, that would be amazing.

I would be showing a report like this to non-technical individuals, and hostnames are far easier to identify than the associated ip.

Thanks very much!

kelmarsec avatar May 04 '18 18:05 kelmarsec

I should add, suggested code wasn't tested on CIS output. Looks like there's code in there for that already tho...

lansalot avatar May 11 '18 13:05 lansalot

Added a -DisplayHostnameName parameter (not flag.. doh!)

There's a problem with what you're suggesting as wraparound IP addresses vs hostnames; IP addresses are of a finite maximum length, while hostnames are not.

So I'd need to count through all hostnames first, work out the largest length, and calculate how many to fit based on that.

Short answer tho is... I hacked around it thus at line 392: $rowmax = 6 if ($DisplayHostName) { $rowmax = 4 }

YMMV, so tweak accordingly. And again, still not tested with CIS.

lansalot avatar May 11 '18 14:05 lansalot