早些时候,我写了一篇关于如何检测网络(how to detect WiFi leechers)上的 WiFi leechers 的文章,并提到了一些可以用来扫描家庭网络的(home network)智能手机应用程序(smartphone apps)。这些应用程序在自动扫描您的网络并为您提供每台设备的一些详细信息方面做得很好。
我没有详细介绍该帖子中的应用程序,因为它专注于在您的网络上捕获未经授权的用户。在本文中,我将更详细地讨论这两个可以在Apple 或 Android 设备(Apple or Android devices)上使用的应用程序,我还将提到可以在Windows 和 Mac OS X上运行的(Windows and Mac OS X)桌面应用程序(mention desktop apps)。
这些网络扫描(network scanning)工具不仅可以让您查看网络上的所有设备及其 IP 地址,还可以查看文件夹共享、打开的TCP/UDP端口、硬件MAC地址等。那么你为什么要关心这些信息呢?
虽然它有点技术性,但这些信息可以帮助您使您的网络更加安全。例如,您可能会偶然发现网络上正在共享的文件夹。通过电缆或无线(cable or wireless)连接到您的网络的任何人都可以轻松搜索共享文件夹并将该数据复制到他们的计算机。
查看计算机或设备(computer or device)的开放端口时,您可以轻松查看远程桌面是否已启用、FTP 或 HTTP 服务器(FTP or HTTP server)是否正在运行以及文件共享(file sharing)是否已启用。如果您从不远程连接到您的计算机,那么启用远程桌面只是一个安全风险。
Windows 网络扫描仪
让我们从一个名为SoftPerfect Network Scanner的免费Windows PC(Windows PCs)工具开始。我喜欢这个工具,因为它经常更新,在Windows 10上运行,并且有 32 位和 64 位版本。该程序也不需要任何安装,这意味着您可以将其放在U 盘(USB stick)上或保存到Dropbox并在您想要的任何计算机上使用。
当您为您的Windows版本运行可执行文件时(确定您是 32 位还是 64 位 Windows),您可能会看到一条消息,指出Windows 防火墙(Windows Firewall)已阻止该程序。确保(Make)选中Private networks,然后单击Allow access。
程序加载后,您需要输入网络起始和结束IP 地址(IP address)范围。如果您不知道这一点,请不要担心。只需点击(Just click)选项(Options)、IP 地址( IP Address),然后点击自动检测本地 IP 范围(Auto Detect Local IP Range)。
您将看到一个弹出窗口(popup window),其中包含在您已安装的任何网卡(network card)(包括虚拟网卡)上检测到的IPv4 和 IPv6(IPv4 and IPv6) IP 地址。对于大多数家庭用户,您只会看到IPv4 和 IPv6(IPv4 and IPv6)下列出的一项。除非您有IPv6 设置(IPv6 setup),否则您应该单击IPv4下列出的网卡(network card)。
现在您将再次进入主界面,但现在将填写IP 地址(IP address)范围。您将在右侧看到“开始扫描(Start Scanning)”按钮,您可以单击该按钮开始扫描。
但是,您应该在执行扫描之前先设置扫描选项。单击(Click)选项(Options),然后单击程序选项(Program Options)。在General选项卡上,您可能要检查的唯一选项是Always analyze device。默认情况下,扫描程序只会向您显示响应某些请求的设备,因此最终列表可能不会显示实际在您的网络上的所有设备,因为某些设备根本不响应。
扫描确实需要更长的时间(几分钟而不是几秒钟),但如果您真的想查看网络上的每台设备,这是值得的。“附加(Additional)”和“工作站(Workstation)”选项卡实际上只对在同一网络上拥有多台计算机并且想要获取有关每台计算机的信息的企业环境有用。端口(Ports)选项卡是我们接下来可以去的地方。
检查检查打开的 TCP 端口(Check for open TCP ports)框,然后单击文本框(text box)最右侧的小纸图标(paper icon)。这将打开另一个窗口,其中列出了一些TCP 端口(TCP port)组。您要单击HTTP 和代理(HTTP and Proxy),然后按SHIFT键并单击数据库服务器( Database servers)以选择所有三个项目。
返回主屏幕,您应该会看到文本框中(text box)列出的所有端口号。继续并检查所有框以打开 UDP 端口(open UDP ports)。此时,单击“确定”返回主程序屏幕(program screen)。现在单击开始扫描(Start Scanning),您应该会看到慢慢添加到列表中的结果。
在我的测试中,程序在网上检查网络上有16个设备,而在未选中,只需11项即可始终分析设备选项。(Always analyze device)IP 地址(IP address)左侧带有加号的任何项目都表示它具有共享文件夹。您可以单击+ sign查看共享文件夹。
主机(Host Name)名列应该为您提供一个易于理解的设备名称。在右侧,您将看到一个名为TCP Ports的列,其中将列出该设备的所有打开端口。显然,除非您知道它们的含义,否则这些数字没有多大意义,因此请查看详细描述每个端口号的此(port number)Wikipedia 页面(Wikipedia page)。
如果有任何东西列出了端口80 ( HTTP ),这通常意味着它具有某种 Web 界面,您可以尝试通过浏览器连接到它,只需输入IP 地址即可(IP address)。端口443用于安全HTTP ( HTTPS ),这意味着您也可以安全地连接到它。
Mac 网络扫描仪
在Mac上,您有几个选择。LanScan是Mac Store上的一款免费应用程序,它进行非常简单的扫描并显示IP 地址(IP address)、MAC 地址(MAC address)、主机名和供应商(Hostname and Vendor)。免费版将仅完整列出前四个主机名,其余仅显示前三个字符。有点烦人,但在大多数家庭网络上可能不是什么大问题。
您还会注意到它只找到 12 个项目,这是因为它没有任何选项来扫描每个IP 地址(IP address),无论它是否响应。一个更好的Mac网络扫描仪(network scanner)是Angry IP Scanner,如下所示。它是开源的,适用于Windows、Mac 和 Linux(Mac and Linux)。
默认情况下,该程序还会扫描打开的端口,而LanScan不会这样做。该程序的唯一问题是您必须安装Java才能运行该程序。Java是一个很大的安全风险,默认情况下在大多数(security risk)Mac(Macs)上被禁用,因此您必须手动启用它。
智能手机应用
我使用了两个应用程序,它们都是免费的,一个可以在Apple设备或Android设备上下载。这两个应用程序都非常出色,并且几乎可以为您提供相同的信息,但每个应用程序都有其优点和缺点。
Fing是一款免费应用程序,可在Google Play 商店(Google Play store)和iTunes 商店下载(iTunes store) ,界面美观。您不必担心使用这些应用程序输入任何IP 地址(IP address)范围,因为它们会自行计算。使用Fing开始扫描后,您将获得一个漂亮的设备列表,其中包含一些基本信息,例如主机名、MAC 地址(MAC address)、IP 地址(IP address)等。
如果您点击一个设备,您将看到另一个屏幕,您可以在其中给设备一个自定义名称(custom name)(我非常喜欢的一个功能),输入一个位置,甚至添加额外的注释。如果向下滚动,您会看到一个名为Services的选项,它可以让您查看扫描设备以查找打开的端口。
我看到这个应用程序的唯一缺点是它没有列出网络上的所有设备。在Windows 程序(Windows program)发现的 16 个设备中,它只捕获了我网络上的大约 12 个设备。
我喜欢使用的第二个应用程序是Net Analyzer,可从App Store免费下载。您可以通过点击右上角的“扫描”按钮运行扫描,然后您将在几秒钟内获得所有设备的列表。
使用这个应用程序,我得到了 15 台设备,这与网络上的设备总数非常接近。使用 Net Analyzer,您还会在启用了某些服务的设备上看到一些彩色字母。绿色P表示可 ping 通,棕色B表示Bonjour服务可用(Apple设备),红色G表示它是网关设备(gateway device)(路由器等),蓝色U表示UPNP 和 DLNA 服务(UPNP and DLNA services)可用。
您可以点击设备以获取更多信息并在设备上执行查询(information and perform queries)。点击特定设备后,点击下方显示的“使用工具查询”选项。(Tools option)
在下一个屏幕上,您将看到几个选项,包括Ping、 Route、Ports、Whois和DNS。点击端口,选择通用(Common)或全部(All),然后点击顶部的开始。
随着扫描的进行,您将看到打开且处于活动状态的端口以及哪些端口被阻止。该应用程序还具有其他工具,可用于扫描网络上的特定设备以获取更多信息。
希望这些工具能让您全面了解网络上的设备以及打开的服务和端口。如果您有任何问题,请随时发表评论。享受!
How to Scan Your Network for Devices and Open Ports
Earlier I had wrіtten a post on how to detect WiFi leechers on your network and mentioned a couple of smartphone apps you could use to scan your home network. The apps do a pretty good job of scanning your network automatically and giving you some details on each device.
I didn’t go into much detail about the apps in that post since it was focused on catching unauthorized users on your network. In this article, I’ll talk in more detail about these two apps that can be used on Apple or Android devices and I’ll also mention desktop apps that you can run on Windows and Mac OS X.
These network scanning tools allow you to not only see all the devices on your network and their IP addresses, but also view folders shares, open TCP/UDP ports, hardware MAC addresses and more. So why would you care about this information?
Though it’s a bit technical, the information can help you make your network more secure. For example, you may find folders that are being shared on your network by accident. Anyone who connects to your network via cable or wireless could then easily search for shared folders and copy that data to their computer.
When looking at open ports for a computer or device, you can easily see whether remote desktop is enabled, whether an FTP or HTTP server is running and whether file sharing is enabled or not. If you never connect to your computer remotely, then having remote desktop enabled is just a security risk.
Windows Network Scanner
Let’s start off with a free tool for Windows PCs called SoftPerfect Network Scanner. I like this tool because it’s updated often, runs on Windows 10 and has a 32-bit and 64-bit version. The program also doesn’t require any installation, which means you can carry it on a USB stick or save it to Dropbox and use it on any computer you want.
When you run the executable file for your version of Windows (determine if you have 32-bit or 64-bit Windows), you might see a message saying that Windows Firewall has blocked the program. Make sure Private networks is checked and then click on Allow access.
Once the program loads, you’ll need to enter your network starting and ending IP address range. If you don’t know this, don’t worry. Just click on Options, IP Address and then click on Auto Detect Local IP Range.
You’ll get a popup window with the detected IP addresses for IPv4 and IPv6 on any network cards you have installed, including virtual ones. For most home users, you’re only going to see one item listed under both IPv4 and IPv6. Unless you have IPv6 setup, you should click on the network card listed under IPv4.
Now you’ll be brought to the main interface again, but now the IP address range will be filled in. You’ll see the Start Scanning button at the right, which you can click to start a scan.
However, you should first set the scanning options before performing a scan. Click on Options and then Program Options. On the General tab, the only option you may want to check is Always analyze device. By default, the scanning program will only show you devices that respond to certain requests, so the final list may not show all the devices that are actually on your network because some devices simply do not respond.
The scan does take quite a bit longer (several minutes compared to several seconds), but it’s worth it if you really want to see every device on your network. The Additional and Workstation tabs are really only useful for corporate environments where you have many machines on the same network and you want to get information about each computer. The Ports tab is where we can to go next.
Check the Check for open TCP ports box and then click on the little paper icon at the far right of the text box. This will open another window that lists out some TCP port groups. You want to click on HTTP and Proxy and then press the SHIFT key and click on Database servers to select all three items.
Back on the main screen, you should see all the port numbers listed in the text box. Go ahead and also check all the boxes for open UDP ports. At this point, click OK to go back to the main program screen. Now click Start Scanning and you should see results slowly added to the list.
In my tests, the program was able to find 16 devices on the network when checking the Always analyze device option compared to just 11 items when not checked. Any item with a plus sign to the left of the IP address means that it has shared folders. You can click on the + sign to see the shared folders.
The Host Name column should give you an easy to understand name for the device. On the right, you’ll see a column called TCP Ports, which will list out all the open ports for that device. Obviously, the numbers don’t make much sense unless you know what they means, so check out this Wikipedia page that describes each port number in detail.
If anything has port 80 (HTTP) listed, that usually means it has some kind of web interface and you can try connecting to it via your browser by simply typing in the IP address. Port 443 is for secure HTTP (HTTPS), which means you can connect to it securely also.
Mac Network Scanner
On the Mac, you have a couple of options. LanScan is a free app on the Mac Store that does a very simple scan and displays the IP address, MAC address, Hostname and Vendor. The free version will only list the first four hostnames fully and the rest will only show the first three characters. A little annoying, but probably not a huge deal on most home networks.
You’ll also notice that it only found 12 items and that’s because it doesn’t have any options to scan each IP address regardless of whether it responds or not. A better network scanner for the Mac is Angry IP Scanner shown below. It’s open source and works on Windows, Mac and Linux.
By default, the program also scans open ports, which LanScan does not do. The only issue with this program is that you have to have Java installed in order to run the program. Java is a big security risk and is disabled on most Macs by default, so you would have to enable it manually.
Smartphone Apps
I have two apps that I use, both of which are free, and one that can you download on Apple devices or Android devices. Both apps are excellent and pretty much give you the same info, but each has its pluses and minuses.
Fing is a free app that is available on the Google Play store and the iTunes store and has a great looking interface. You don’t have to worry about entering any IP address range with these apps because they figure it out on their own. Once you start a scan with Fing, you’ll get a nice looking list of devices with some basic info like hostname, MAC address, IP address etc.
If you tap on a device, you’ll get another screen where you can give the device a custom name (a feature I really like), enter a location and even add additional notes. If you scroll down, you’ll see an option called Services, which lets you see scan the device for open ports.
The only downside I have seen with this app is that it doesn’t list out all the devices on the network. It only caught about 12 devices on my network out of the 16 that the Windows program had found.
The second app I like using is Net Analyzer, available from the App Store for free. You run a scan by tapping the Scan button at the top right and you’ll get a list of all your devices within a few seconds.
Using this app, I got 15 devices, which was pretty close to the total number of devices on the network. With Net Analyzer, you’ll also see some colored letters on devices that have certain services enabled. The green P means it is pingable, the brown B means Bonjour services are available (Apple devices), the red G means it’s a gateway device (router, etc), and a blue U means UPNP and DLNA services are available.
You can tap on a device to get more information and perform queries on the device. Tap the Query with Tools option shown below once you tap on a particular device.
On the next screen, you’ll see several options including Ping, Route, Ports, Whois and DNS. Tap on Ports, choose Common or All and then tap Start at the top.
As the scan progresses, you’ll see the ports that are open and active and also which ports are blocked. The app also has other tools that you can use to scan specific devices on the network to get more information.
Hopefully, these tools will allow you to fully see what devices are on your network and what services and ports are open. If you have any questions, feel free to post a comment. Enjoy!