nmap scans the server port of remote desktop port

  • 2020-05-07 20:45:39
  • OfStack

I often use it to detect the ip address of a remote Windows server, because it is not a fixed ip address, the ip address of the server will change frequently, but there is a rule that changes in only one network segment, which brings convenience to the determination of ip address.
1. If nmap is not installed, install it
  yum install -y nmap
2. Scan the remote desktop connection port of the specified network segment
nmap -sT -p3389 218.206.112.0/24
3. If you think the output is too much, you can filter it with the grep command
nmap -sT -p3389 218.206.112.0/24 | grep -B2 open
 

Below is the message log of the operation for future reference.


[root@node18 opt]# nmap
-bash: nmap: command not found
[root@node18 opt]# yum install -y nmap
...
[root@node18 opt]# nmap -sT -p3389 218.206.112.0/24

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2012-10-26 15:36 CST
Interesting ports on 218.206.112.1:
PORT     STATE  SERVICE
3389/tcp closed ms-term-serv
Interesting ports on 218.206.112.11:
PORT     STATE    SERVICE
3389/tcp filtered ms-term-serv
...
[root@node18 opt]# nmap -sT -p3389 218.206.112.0/24 | grep -B2 open

Interesting ports on 218.206.112.100:
PORT     STATE SERVICE
3389/tcp open  ms-term-serv
--
Interesting ports on 218.206.112.132:
PORT     STATE SERVICE
3389/tcp open  ms-term-serv
[root@node18 opt]# 


Related articles: