Article Title: five top-level Linux security tools. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source. First, no program can ensure permanent security of your network or server, security is a continuous process of continuous improvement, evaluation, and improvement. Fortunately, there are many good tools in linux to help you in this process. In this article, I will recommend five of my favorite security tools to help you prevent, check, and respond to intrusions. Although it is easier to prevent problems that may occur at any time, you still need to check and respond when you encounter problems, which means that before the form threatens your needs, you must first familiarize yourself with their usage.
1. Nmap
To assess whether a machine is vulnerable to attacks, you need to know how many services are exposed to attackers. An excellent tool is Fyodor's network er Nmap. Debian users can obtain it through apt-get install nmap, run it to check what services are running on the server-run even if you think you know it. Obviously, if the ssh port is closed, the ssh password will have no impact on you.
The simplest use of Nmap is to detect hosts on your local network. In this instance, we require nmap to send ICMP echo request packets (ping) to all hosts within a certain IP address range:
$ Nmap-sP 10.0.0.1-254
Starting nmap 3.81 (http://www.insecure.org/nmap)
At
NZDT
Host 10.0.0.25 appears to be up.
MAC Address: 00: 0C: F1: AE: E6: 08 (Intel)
Host 10.0.0.51 appears to be up.
MAC Address: 08: 00: 09: 9A: 1A: AA (Hewlett Packard)
Host 10.0.0.70 appears to be up.
MAC Address: 00: 0F: EA: 64: 4E: 1E (Giga-Byte Tech Co .) |
However, nmap is most commonly used to detect which service is running. Because TCP uses three handshakes to establish a connection, we can check the ports that are not actually connected to them but are opened again. This is the famous SYN or semi-open scan, this is the default mode when you use root to log on and execute the command. If you run the command as a normal user, nmap tries the full connection to test whether each port is open. (Problem: in semi-open mode, we send the initial SYN Packet and listen for the response. RST indicates that the port is closed, and SYN + ACK indicates that the port is open. If no response is received, nmap indicates that the port is filtered. Some firewalls will discard the data packet and generate a filter status mark. Others will send the RST so that the port looks closed, if a server is listening on a port that you do not want to listen to, check carefully:
# Nmap-sS 10.0.0.89
Starting nmap 3.81 (http://www.insecure.org/nmap)
At
NZDT
Interesting ports on 10.0.0.89:
(The 1637 ports scanned but not shown
Below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
42/tcp open nameserver
80/tcp open http
110/tcp open pop3
...
|
Fyodor also adds many service fingerprints. You can require nmap to identify a specific service and add the-sV option after the command:
# Nmap-sV 10.0.0.89
Starting nmap 3.81 (http://www.insecure.org/nmap)
At
NZDT
Interesting ports on 10.0.0.89:
(The 1637 ports scanned but not shown
Below are in state: closed)
PORT STATE SERVICE VERSION
21/tcp open ftp?
22/tcp open ssh OpenSSH 3.8.1p1
Debian-8.sarge.4 (protocol 2.0)
42/tcp open nameserver?
80/tcp open http Apache httpd 1.3.33
(Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.10-16)
110/tcp open pop3?
...
|
Other incredible uses are the detection of the operating system. Simply add the-O parameter after the command. If the machine has at least one port opened and at least one port closed, you can obtain the information of the operating system accurately:
# Nmap-O-sS 10.0.0.89
Starting nmap 3.81 (http://www.insecure.org/nmap)
At
NZDT
Interesting ports on 10.0.0.89:
(The 1637 ports scanned but not shown
Below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
...
Device type: general purpose
Running: Linux 2.4.X | 2.5.X | 2.6.X
OS details: Linux 2.5.25-2.6.3 or
Gentoo 1.2 Linux 2.4.19 rc1-rc7), Linux 2.6.3-2.6.8
Uptime 30.906 days (since Mon Oct 2 11:18:59 2006)
|
Therefore, use nmap to check all machines on your network to see if there are services temporarily installed but forgotten to be deleted, you can also use it to check whether your firewall is correctly configured out of your network range.
[1] [2] [3] [4] [5] [6] Next page