- About the Author
- About the Technical Editor
- Credits
- Acknowledgments
- Foreword
- Introduction
- CHAPTER 1 Fundamental Networking and Security Tools
- CHAPTER 2 Troubleshooting Microsoft Windows
- CHAPTER 3 Nmap—The Network Mapper
- CHAPTER 4 Vulnerability Management
- CHAPTER 5 Monitoring with OSSEC
- CHAPTER 6 Protecting Wireless Communication
- CHAPTER 7 Wireshark
- CHAPTER 8 Access Management
- CHAPTER 9 Managing Logs
- CHAPTER 10 Metasploit
- CHAPTER 11 Web Application Security
- CHAPTER 12 Patch and Configuration Management
- CHAPTER 13 Securing OSI Layer 8
- CHAPTER 14 Kali Linux
- CHAPTER 15 CISv7 Controls and Best Practices
Services Running
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 NUMBER | NAME | DEFINED | USED FOR |
20 | FTP‐data | File Transfer Protocol | Moving files between client and server |
21 | FTP‐control | File Transfer Protocol | Control information for moving files |
22 | SSH | Secure Shell | Security for logging in and file transfer |
23 | Telnet | Telnet Protocol | Obsolete unencrypted communication |
25 | SMTP | Simple Mail Transfer Protocol | Sending/routing email |
53 | DNS | Domain Name System | Phonebook of the Internet; translates names of websites to IP addresses |
80 | HTTP | Hypertext Transfer Protocol | Foundation of the World Wide Web |
110 | POP3 | Post Office Protocol | Receiving email by downloading to your host |
123 | NTP | Network Time Protocol | Synchronizes the clocks on computers on your network |
143 | IMAP | Internet Message Access Protocol | View email messages from any device; does not download to a host |
161 | SNMP | Simple Network Management Protocol | Collects information and configures different network devices |
443 | HTTPS | Hypertext Transfer Protocol Secure | The secure version of HTTP; information between a browser and website is encrypted |
445 | Microsoft DS | Microsoft‐Directory Services | SMB over IP; preferred port for Windows file sharing |
465 | SMTPS | Secure SMTP | Authenticated SMTP over SSL |
1433 | MSSQL | Microsoft SQL | Microsoft SQL database management system |
3389 | RDP | Remote Desktop Protocol | Application 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.
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
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.nmap‐services‐probes
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论