-
How to defend against port scanning (nmap)linux 2023. 2. 22. 10:59
sudo apt-get update sudo apt-get install nmapNmap (Network Mapper) is a free and open-source network exploration and security auditing tool. It is used to discover hosts and services on a computer network, thus creating a "map" of the network. Nmap is designed to be flexible and can be used for a wide range of purposes, from identifying hosts and services on a network, to checking for open ports and vulnerabilities, to auditing network security. It is a powerful tool used by network administrators and security professionals to scan and map networks, identify vulnerabilities, and test the effectiveness of security measures.
You can install nmap on Ubuntu 18.04 using the following command in the terminal:
- To scan a specific port on a target machine using nmap, you can use the following command:
nmap -p [port_number] [target_IP_address]- For example, to scan port 80 on a machine with IP address 192.168.0.10, you would use:
nmap -p 80 192.168.0.10- This command will display the status of the port (open, closed, filtered), as well as any services running on that port. You can also use the -sV option to get more detailed information about the services running on the target machine:
nmap -p 80 -sV 192.168.0.10This will provide information such as the service name, version number, and possibly even the operating system running on the target machine.
After performing a port scan, you may need to take further actions depending on your goals and the results of the scan. Here are some common actions that you may take:
- Identify open ports: Analyze the output of the port scan to determine which ports are open and what services are listening on those ports. This information can help you understand the network configuration and identify potential vulnerabilities.
- Vulnerability assessment: Use the information gathered from the port scan to conduct a vulnerability assessment of the network or host. This can help you identify potential security weaknesses that can be exploited.
- Hardening: Based on the results of the vulnerability assessment, implement measures to harden the system, such as disabling unnecessary services, configuring firewalls, and implementing access controls.
- Penetration testing: Use the information gathered from the port scan to conduct penetration testing to identify potential vulnerabilities and exploit them to gain unauthorized access to the system. This can help you identify weaknesses that need to be addressed.
- Monitoring: Regularly scan the network and hosts to identify changes in the network configuration and potential security issues.
It is important to note that you should only perform port scans on systems that you own or have permission to scan. Unauthorized port scanning is illegal and can result in serious legal consequences.
'linux' 카테고리의 다른 글
Temporary Directory Security (sticky bit) (0) 2023.02.22 What is Access Control Lists? (0) 2023.02.22 What is a port scan? (0) 2023.02.22 How to read and edit files (vi, vim) (0) 2023.02.22 How to disable specific user logins. (remote and local) (0) 2023.02.22