找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2707|回复: 0

CMD下查看遠程桌面端口

[复制链接]
发表于 2013-10-18 07:59:15 | 显示全部楼层 |阅读模式
很多朋友不知道怎樣在cmd下查看3389被 修改成了什麽。有時候注冊表讀其來不是太方便。、

REG query HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\WinStations\RDP-Tcp /v PortNumber 这条命令是查看远程桌面连接所开的端口是多少 一般默认显示是0xd3d   也就是3389 。

其實兩個 常見的cmd命令就可以搞定下來·
先用
tasklist /svc

图像名                       PID 服务
========================= ====== =============================================
System Idle Process            0 暂缺
System                         4 暂缺
smss.exe                     704 暂缺
csrss.exe                    772 暂缺
winlogon.exe                 796 暂缺
services.exe                 840 Eventlog, PlugPlay
lsass.exe                    852 PolicyAgent, ProtectedStorage, SamSs
svchost.exe                 1028 DcomLaunch, TermService                              、//這裡TermService就是對應的3389服務,記下進程的PID:1028
svchost.exe                 1092 RpcSs
svchost.exe                 1180 AudioSrv, Browser, CryptSvc, Dhcp, dmserver,
                                 EventSystem, FastUserSwitchingCompatibility,
                                 LanmanServer, lanmanworkstation, Netman,
                                 Nla, RasMan, seclogon, SENS, SharedAccess,
                                 ShellHWDetection, TapiSrv, Themes, TrkWks,
                                 W32Time, winmgmt, wscsvc, wuauserv, WZCSVC
svchost.exe                 1260 Dnscache
svchost.exe                 1336 LmHosts, SSDPSRV, WebClient
spoolsv.exe                 1416 Spooler
Explorer.EXE                1788 暂缺
vsnpstd3.exe                1948 暂缺
egui.exe                    1968 暂缺
ctfmon.exe                  2044 暂缺
ekrn.exe                     484 ekrn
svchost.exe                  604 stisvc
wdfmgr.exe                   620 UMWdf
alg.exe                      324 ALG
iexplore.exe                2552 暂缺
cmd.exe                     2236 暂缺
conime.exe                   124 暂缺
wmiprvse.exe                 292 暂缺
mstsc.exe                   3580 暂缺
tasklist.exe                 188 暂缺
====================================================================================================
然後使用netstat命令查看對應的端口號:
netstat /ano

Active Connections
Proto Local Address          Foreign Address        State           PID
TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1092
TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
TCP    0.0.0.0:5389           0.0.0.0:0              LISTENING       1028      //這裡的對應的上面的進程PID號1028,即是遠程桌面對應的端口5389.
TCP    60.xxx.xxx.xxx:1349     220.xxx.xxx.xxx:8081     TIME_WAIT       0
TCP    60..xxx.xxx.xxx::1360     121.xxx.xxx.xxx:8449       TIME_WAIT       0
TCP    60..xxx.xxx.xxx::1525     121.xxx.xxx.xxx:80       TIME_WAIT       0
TCP    127.0.0.1:1030         0.0.0.0:0              LISTENING       324
TCP    127.0.0.1:1522         127.0.0.1:30606        TIME_WAIT       0
TCP    127.0.0.1:30606        0.0.0.0:0              LISTENING       484
TCP    127.0.0.1:30606        127.0.0.1:1520         TIME_WAIT       0
TCP    192.168.1.12:139       0.0.0.0:0              LISTENING       4
UDP    0.0.0.0:445            *:*                                    4
UDP    0.0.0.0:500            *:*                                    852
UDP    0.0.0.0:4500           *:*                                    852
UDP    60.xxx.xxx.xxx::123      *:*                                    1180
UDP    60.xxx.xxx.xxx::1900     *:*                                    1336
UDP    127.0.0.1:123          *:*                                    1180
UDP    127.0.0.1:1047         *:*                                    2552
UDP    127.0.0.1:1900         *:*                                    1336
UDP    192.168.1.12:123       *:*                                    1180
UDP    192.168.1.12:137       *:*                                    4
UDP    192.168.1.12:138       *:*                                    4
UDP    192.168.1.12:1900      *:*                                    1336
C:\>

#入侵提权
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表