- 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
Port Scanning
A port scan is a way to figure out which ports on a network are open and which are listening and possibly show whether there are any security devices such as firewalls between the sender and receiver. This process is called fingerprinting.
Ports are numbered from 0 to 65,535, but the lower range of 0 to 1,023 consists of the “well‐known” ones. A port scan will carefully craft a packet to each destination port. There are some basic techniques to choose from, depending on the network topology and scanning goals.
- Vanilla scan : This is the most basic scan, fully connecting to 65,536 ports. It's accurate but easily detectable.
- SYN scan : This scan sends a SYN but does not wait for a response. It's faster, but you still learn if the port is open.
- Strobe scan : This selectively attempts to connect to only a few ports, typically fewer than 20.
There are some other techniques that penetration testers use, such as Stealth, FTP Bounce, and XMAS, which are scans that were developed so the sender could scan undetected. The sender's location can be obfuscated so that an attacker can get the information while not being tracked.
Now that you know a machine is alive on the network, it's time to determine which ports are open on that host. From a security viewpoint, it is vital to the health and well‐being of your network to know exactly which of the 65,536 ports might be exposed. There are six port states that are currently recognized by Nmap.
- Open : An application is actively listening for a connection.
- Closed : A probe has been received, but no application is listening.
- Filtered : It's unknown if port is open; packet filtering typically from a firewall has prevented a probe from reaching the port. Sometimes you get an error response, and sometimes filters will just drop the probe.
- Unfiltered : A port is accessible, but Nmap hasn't a clue if the port is open or closed.
- Open/filtered : The port is filtered or open, but no state is established.
- Closed/filtered : Nmap is unable to determine whether the port is closed or filtered.
The most popular port scan to use by default is the
, or SYN, scan you see in Figure 3.2 . It is a fast scan, scanning thousands of ports per second relatively stealthily since it's not waiting around for an acknowledgment.‐sS
To launch a port scan on a network segment, use the following command:
>nmap -sS <target addresses>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论