返回介绍

Services Running

发布于 2024-10-11 20:49:16 字数 6442 浏览 0 评论 0 收藏 0

Many moons ago, I taught the CompTIA classes for Iron Horse University at Fort Carson in Colorado Springs. My soldiers would sit in my classroom for two weeks of instruction and hands‐on learning. So, if someone wanted to talk to one of my soldiers, they would come down the hall and into classroom 4. They needed a specific person, so they would go to that person's seat so they could talk to him or her.

As an example, let's say the soldier's name was Carla, who was seated in seat 23. So, Carla's socket was classroom.4:23. A socket is a point of ingress or egress. The combination of an IP address and a port is called an endpoint. A socket is one of the endpoints in a two‐way conversation between two programs communicating over a network. A socket is bound to a port number so we know which application that data is destined for.

The person sitting in seat 23 is like the program that is registered with the operating system to listen at that port. What if Carla was absent? What if someone else was sitting in seat 23? Programs listening on a certain port may or may not be the usual listener. You need to know whether Carla and Robert swapped seats. Table 3.1 describes the most common ports and the services that should be running on them.

Table 3.1 : Top Ports Defined

PORT NUMBERNAMEDEFINEDUSED FOR
20FTP‐dataFile Transfer ProtocolMoving files between client and server
21FTP‐controlFile Transfer ProtocolControl information for moving files
22SSHSecure ShellSecurity for logging in and file transfer
23TelnetTelnet ProtocolObsolete unencrypted communication
25SMTPSimple Mail Transfer ProtocolSending/routing email
53DNSDomain Name SystemPhonebook of the Internet; translates names of websites to IP addresses
80HTTPHypertext Transfer ProtocolFoundation of the World Wide Web
110POP3Post Office ProtocolReceiving email by downloading to your host
123NTPNetwork Time ProtocolSynchronizes the clocks on computers on your network
143IMAPInternet Message Access ProtocolView email messages from any device; does not download to a host
161SNMPSimple Network Management ProtocolCollects information and configures different network devices
443HTTPSHypertext Transfer Protocol SecureThe secure version of HTTP; information between a browser and website is encrypted
445Microsoft DSMicrosoft‐Directory ServicesSMB over IP; preferred port for Windows file sharing
465SMTPSSecure SMTPAuthenticated SMTP over SSL
1433MSSQLMicrosoft SQLMicrosoft SQL database management system
3389RDPRemote Desktop ProtocolApplication sharing protocol

If you want to run a services scan against the machines in your ecosystem, Nmap will tell you which of the hundreds of thousands of ports might be open on a host. If a port is open, communication can occur. Sometimes that communication is unwanted and is what you are trying to protect against. For example, in Figure 3.3 you see the Nmap scan report showing the ports that are open, the service, the state, and the version.

Screenshot displaying the Nmap scan report depicting the ports that are open, the service, the state, and the version.

Figure 3.3 : Nmap scan report

To launch a services scan on a network segment, use the following command:

>nmap -sV <target addresses>

When you do a service scan with Nmap, it will tell you which ports are open and will use a database that lists more than 2,000 well‐known services that are typically running on those ports. It has been my experience that network administrators are opinionated and will have their own ideas of how services in their enterprise environment should be configured, so sometimes that database and reality do not match up. If you are doing inventory or vulnerability management, you want to be as accurate as possible and know the version and patch level of systems whenever available.

Version detection investigates those ports to figure out what is actually running. The nmap‐services‐probes database contains certain probe packets for discovering services and matching them to responses. Nmap will attempt to determine the service, application, version number, hostname, device type, and operating system.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文