Linux enterprise port scanning practice

巴扎黑
Release: 2017-08-10 11:51:06
Original
1862 people have browsed it

[Introduction] As the saying goes: A thousand-mile embankment is destroyed by an ant nest. Once a small vulnerability is discovered by an attacker, the final consequence may be the paralysis of the entire network. And how to discover security vulnerabilities in corporate networks? What key technologies need to be mastered and adopted? Is there any more popular and efficient tool that can

As the saying goes: "A thousand-mile dike is destroyed by an ant nest." Once a small vulnerability is discovered by an attacker, the final consequences may be to the entire network. of paralysis. And how to discover security vulnerabilities in corporate networks? What key technologies need to be mastered and adopted? Are there any popular and efficient tools that can be used to assist system administrators in scanning and discovering vulnerabilities?

Enterprise port scanning strategy

1. The purpose of port scanning

For those located in the network For a computer system, a port is a potential communication channel, that is, an intrusion channel. Performing port scanning on the target computer can obtain a lot of useful information to discover system security vulnerabilities. Through it, system users can understand what services the system currently provides to the outside world, thereby providing a reference method for system users to manage the network.

In terms of technical principles, port scanning sends detection packets to the TCP/UDP service port of the target host and records the response of the target host. By analyzing the response to determine whether the service port is open or closed, you can learn the services or information provided by the port. Port scanning can also monitor the operation of the local host by capturing the incoming and outgoing IP packets of the local host or server. It can not only analyze the received data, but also help users discover some inherent weaknesses of the target host without Detailed steps for entering a system will be provided. Generally speaking, the purpose of port scanning is usually one or more of the following:

1. Discover open ports: discover open TCP or UDP ports on the target system;

2. Understand Host operating system information: Port scanning can use the "fingerprint" of the operating system to infer information such as the version of the scanned operating system or application;

3. Understand the software or service version: The software or service version can be determined by " "Flag acquisition" or application fingerprint to identify and obtain;

4. Discover vulnerable software versions: Identify flaws in software and services, thereby helping to launch attacks against vulnerabilities.

Port scanning mainly includes classic scanners (full connection) and so-called SYN (semi-connection) scanners. There are also indirect scans and secret scans. The TCP scanning method establishes a standard TCP connection with the scanned host, so this method is the most accurate and rarely misses or false positives, but is easily detected and recorded by the target host. The SYN method establishes a semi-open connection with the target host, so that it is not easily recorded by the target host. However, the scanning results will cause false negatives. This false negative is serious when the network condition is not good.

2. Quickly install nmap for enterprise port scanning

nmap is a network detection and security scanning program that can be used by system administrators and individuals This software scans large networks to obtain information such as which hosts are running and what services are provided. nmap supports many scanning technologies, such as: UDP, TCP connect(), TCP SYN (half-open scanning), ftp proxy (bounce attack), reverse flag, ICMP, FIN, ACK scanning, Xmas Tree (Xmas Tree), SYN scanning and null scan. nmap also provides some advanced features, such as: detection of operating system type through TCP/IP protocol stack characteristics, secret scanning, dynamic delay and retransmission calculation, parallel scanning, detection of down hosts through parallel ping scanning, decoy scanning, avoidance Open port filtering detection, direct RPC scanning (no port mapping required), fragment scanning, and flexible target and port settings.

In order to improve the performance of nmap in the non-root state, the designers of the software have put in a lot of effort. Unfortunately, some kernel interfaces (such as raw sockets) need to be used in root state. So nmap should be used at root whenever possible.

Running nmap will usually get a list of scanned host ports. nmap will always give the service name of the well known port (if possible), port number, status and protocol information. The status of each port is: open, filtered, unfiltered.

  • The open status means that the target host can accept the connection using the accept() system call on this port;

  • The filtered status indicates firewall and packet filtering and other network security software mask this port, preventing nmap from detecting whether it is open.

  • unfiltered means that the port is closed and there is no firewall/packet filtering software to isolate nmap detection attempts. Normally, the status of a port is basically unfiltered. Only when most of the scanned ports are in the filtered state, the port in the unfiltered state will be displayed.

Depending on the feature options used, nmap can also report the following characteristics of the remote host: operating system used, TCP sequence, user name running the application bound to each port , DNS name, whether the host address is a spoofed address, and other things.

Before using it, we need to download the source code package of the software and install it.

The above is the detailed content of Linux enterprise port scanning practice. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!