Get *hostname* of a RDP client computer

2

This question: Get hostname of a RDP client computer, asked how an RDP server can identify a client (i.e., the host that is being used to login remotely), and got this answer:

netstat -na | find "3389" | find "ESTABLISHED" >> C:\path_to_rdplog.txt
date /T >> C:\path_to_rdplog.txt
time /T >> C:\path_to_rdplog.txt
echo. >> C:\path_to_rdplog.txt
echo ----------- >> C:\path_to_rdplog.txt
echo. >> C:\path_to_rdplog.txt

The above captures and logs the IP address of the client host. I want to capture the hostname also; how can that be done?

Mark

Posted 2015-07-08T05:22:54.660

Reputation: 21

Hi sorry first time to post, I thought this post was directly go to the user that im referring, anyway here's the link of the post.. http://superuser.com/questions/393203/get-hostname-of-a-rdp-client-computer

– Mark – 2015-07-08T06:02:49.503

Answers

1

ping -a can also resolve the given IP address to hostname.

user373230

Posted 2015-07-08T05:22:54.660

Reputation:

0

You can use nmap

nmap -A 10.49.52.31

you should get something in output like this:

Computer name: computer.name
NetBIOS computer name: netbios.domain.com
Domain name: domain.com
Forest name: domain.com
FQDN: fully.quality.domain.com

Man Page - Linux

Documentation - Windows/Linux

Here is the Download Page to get the software, but for windows it haves a GUI and it's called Zen-nmap.

WARNING: Some Firewall recognize this software like "sniffer" and because they are indeed, be sure your host haves the right rules to run it without problems or be blocked by your own firewall

Francisco Tapia

Posted 2015-07-08T05:22:54.660

Reputation: 2 383