In network security, it is important to understand port scanning. Hackers use tools to scan a network and determine if there are open ports and if they contain some sort of vulnerability. To scan ports, you first have to find active hosts on a network. Once you find active hosts and discover a list of IP addresses for those hosts, a port scan can be performed to gather information about open ports and analyze services running on those ports. A port scan is the process of sending packets to an active host's ports and learning details that can help you gain access to that host or to discover open vulnerabilities on your network.
Some common ports are:
Port 20 - File Transfer Protocol or FTP
Port 22 - Secure Shell protocol or SSH
Port 23 - Telnet protocol for unencrypted transfer
Port 80 - HyperText Transfer Protocol or HTTP
Port 443 - HyperText Transfer Protocol Secure or HTTPS
The Well Known Ports are those from 0 through 1023
We are going to simulate a port scan by filling a list with 100 random port numbers. These values will be used as the keys in a dictionary where the values will be randomly generated integers 0 / 1. The 0 will be a closed port and a 1 will be an open port.
Your first TODO is to create a function called "create_host_IPs( )" that randomly generates a list of 10 IP addresses with 4 random octets values, concatenating the 4 values into a string and appending it to a host list. The function returns the generated host list. The random values can be limited to a range of 10 to 200.
Your next TODO is to create another function called "simulate_scan(h)" that iterates through the host list (received as h ) and then creates a new list called open_ports. The function should use a nested for loop that iterates through the host list, and then iterates through the returned list from a call to "create_random_open_ports()". If the returned list value is 1, then append it to your open_ports list. This simulates a scan of all the IPs in the host list and creates randomly generated open ports. Finally it should print the host IP and a list of open ports as displayed in this example output.
The default values can be found in the pictures
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 4 images
- Explain the concept of a proxy server in the context of the OSI model and its applications in network security.arrow_forwardIn the context of computer networking, what exactly is an assault on the DNS (Domain Name System)?arrow_forwardExperiencing slowdowns in performance is possible while using an application proxy due to the challenges of decrypting end-to-end encrypted traffic. It is possible that a proxy server might benefit from a solution that allows for communication via an encrypted protocol at the application layer.arrow_forward
- The DHCP policy defines a set of criteria to use when deciding whether to accept a request from a client. In client/server networks, there are two kinds of policy settings that provide for more flexibility in typical real-time situations.arrow_forwardNetwork Security Design is required since servers on a flat network are responsible for most of the company's commercial activity. Demilitarized zones might be formed if necessary. What modifications would you want to see made to the network's current layout?arrow_forwardWhat's the point of keeping an eye on DNS?arrow_forward
- An explanation of the DNS should cover everything from repeated and non-repeated queries to root servers and DNS entries.arrow_forwardTunnelling is made possible by a network's point-to-point transport layer protocols, which are also the ones responsible for the creation of tunnels.arrow_forwardIn FTP, if the client needs to retrieve one file from the server site and store one file on the server site, how many control connections and how many data transfer connections are needed?arrow_forward
- The DNS is subjected to a comprehensive analysis, which includes the iteration of requests, inspection of authoritative and root servers, and analysis of DNS entries.arrow_forwardIf a network administrator is collecting data, such as FTP traffic, why would they wish to restrict access to certain ports?arrow_forwardIn what situations would you utilize static route configuration as a network administrator?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education