Module 03 - Scanning Networks ( EC Mode ) Flashcards
Which of the following TCP communication flags confirms the receipt of a transmission and identifies the next expected sequence number?
A. ACK flag
B. SYN flag
C. FIN flag
D. RST flag
Answer: A. ACK flag.
Synchronize or “SYN”:
It notifies the transmission of a new sequence number. This flag generally represents the establishment of a connection (three-way handshake) between two hosts.
Acknowledgement or “ACK”:
It confirms the receipt of the transmission and identifies the next expected sequence number. When the system successfully receives a packet, it sets the value of its flag to “1,” thus implying that the receiver should pay attention to it.
Finish or “FIN”:
It is set to “1” to announce that no more transmissions will be sent to the remote system and the connection established by the SYN flag is terminated.
Reset or “RST”:
When there is an error in the current connection, this flag is set to “1” and the connection is aborted in response to the error. Attackers use this flag to scan hosts and identify open ports.
Which of the following TCP communication flags notifies the transmission of a new sequence number and represents the establishment of a connection between two hosts?
A. PSH flag
B. RST flag
C. FIN flag
D. SYN flag
Answer: D. SYN flag.
Finish or “FIN”: It is set to “1” to announce that no more transmissions will be sent to the remote system, and the connection established by the SYN flag is terminated
Synchronize or “SYN”: It notifies the transmission of a new sequence number. This flag generally represents the establishment of a connection (three-way handshake) between two hosts
Push or “PSH”: When it is set to “1,” it indicates that the sender has raised the push operation to the receiver; this implies that the remote system should inform the receiving application about the buffered data coming from the sender. The system raises the PSH flag at the start and end of data transfer and sets it on the last segment of a file to prevent buffer deadlocks.
Reset or “RST”: When there is an error in the current connection, this flag is set to “1” and the connection is aborted in response to the error. Attackers use this flag to scan hosts and identify open ports
Which of the following types of scanning involves the process of checking the services running on a target computer by sending a sequence of messages to break in?
A. Port scanning
B. Banner grabbing
C. Vulnerability scanning
D. Network scanning
Answer: A. Port scanning.
Network Scanning: Network scanning is a procedure for identifying active hosts on a network, either to attack them or assess the security of the network.
Port Scanning: Port scanning is the process of checking the services running on the target computer by sending a sequence of messages in an attempt to break in.
Vulnerability Scanning: Vulnerability scanning is a method for checking whether a system is exploitable by identifying its vulnerabilities.
Banner Grabbing: Banner grabbing, or “OS fingerprinting,” is a method used to determine the OS that is running on a remote target system.
Which of the following TCP communication flags is set to “1” to announce that no more transmissions will be sent to the remote system and the connection established by the SYN flag is terminated?
A. RST flag
B. FIN flag
C. SYN flag
D. ACK flag
Answer: B. FIN flag.
Explanation:
The following are the TCP communication flags:
Acknowledgement or “ACK”: It confirms the receipt of the transmission and identifies the next expected sequence number. When the system successfully receives a packet, it sets the value of its flag to “1,” thus implying that the receiver should pay attention to it.
Reset or “RST”: When there is an error in the current connection, this flag is set to “1” and the connection is aborted in response to the error. Attackers use this flag to scan hosts and identify open ports.
Finish or “FIN”: It is set to “1” to announce that no more transmissions will be sent to the remote system and the connection established by the SYN flag is terminated.
Synchronize or “SYN”: It notifies the transmission of a new sequence number. This flag generally represents the establishment of a connection (three-way handshake) between two hosts.
Which of the following is NOT an objective of network scanning?
A. Discover the services running
B. Discover usernames and passwords
C. Discover the network’s live hosts
D. All of the above are objectives of network scanning
Answer: B. Discover usernames and passwords
Explanation:
The more the information at hand about a target organization, the greater the chances of knowing a network’s security loopholes and consequently, for gaining unauthorized access to it. Below are some objectives for scanning a network:
Discover the network’s live hosts, IP addresses, and open ports of live. Using open ports, the attacker will determine the best means of entry into the system.
Discover the operating system and system architecture of the target. This is also known as fingerprinting. An attacker can formulate an attack strategy based on the operating system’s vulnerabilities.
Discover the services running/listening on the target system. Doing so gives the attacker an indication of vulnerabilities (based on the service) exploitation for gaining access to the target system.
Identify specific applications or versions of a particular service.
Identify vulnerabilities in any of the network systems. This helps an attacker to compromise the target system or network through various exploits.
Which of the following hping commands is used by an attacker to collect the initial sequence number?
A. hping3 -S 72.14.207.99 -p 80 –tcp-timestamp
B. hping3 -2 10.0.0.25 –p 80
C. hping3 –A 10.0.0.25 –p 80
D. hping3 192.168.1.103 -Q -p 139 -s
Answer: D. hping3 192.168.1.103 -Q -p 139 -s
Explanation:
ACK scan on port 80: hping3 –A 10.0.0.25 –p 80
UDP scan on port 80: hping3 -2 10.0.0.25 –p 80
Collecting Initial Sequence Number: hping3 192.168.1.103 -Q -p 139 –s
Firewalls and Timestamps: hping3 -S 72.14.207.99 -p 80 –tcp-timestamp
Which of the following scanning tools is a mobile app for Android and iOS that provides complete network information, such as the IP address, MAC address, device vendor, and ISP location?
A. Netcraft
B. Maltego
C. Fing
D. Nmap
Answer: C. Fing.
Netcraft provides Internet security services, including anti-fraud and anti-phishing services, application testing, and PCI scanning.
Nmap (“Network Mapper”) is a security scanner for network exploration and hacking. It allows you to discover hosts, ports, and services on a computer network, thus creating a “map” of the network.
Maltego is a program that can be used to determine the relationships and real-world links between people, groups of people, organizations, websites, Internet infrastructure, documents, etc.
Fing is a mobile app for Android and iOS that scans and provides complete network information, such as IP address, MAC address, device vendor, and ISP location. It allows attackers to discover all devices connected to a Wi-Fi network along with their IP and MAC address as well as the name of the vendor/device manufacturer.
An attacker is using the scanning tool Hping to scan and identify live hosts, open ports, and services running on a target network. He/she wants to collect all the TCP sequence numbers generated by the target host. Which of the following Hping commands he/she needs to use to gather the required information?
A. hping3 -Q -p 139 -s
B. hping3 -S -p 80 –tcp-timestamp
C. hping3 –A –p 80
D. hping3 –F –P –U 10.0.0.25 –p 80
Answer: A. hping3 -Q -p 139 -s
hping3 -Q -p 139 -s: By using the argument -Q in the command line, Hping collects all the TCP sequence numbers generated by the target host.
hping3 –A –p 80: By issuing this command, Hping checks if a host is alive on a network. If it finds a live host and an open port, it returns an RST response.
hping3 -S -p 80 –tcp-timestamp: By adding the –tcp-timestamp argument in the command line, Hping enables the TCP timestamp option and tries to guess the timestamp update frequency and uptime of the target host.
hping3 –F –P –U 10.0.0.25 –p 80: By issuing this command, an attacker can perform FIN, PUSH, and URG scans on port 80 on the target host.
If a tester is attempting to ping a target that exists but receives no response or a response that states the destination is unreachable, ICMP may be disabled and the network may be using TCP. Which other option could the tester use to get a response from a host using TCP?
A. TCP ping
B. Hping
C. Traceroute
D. Broadcast ping
Answer: B. Hping
Hping2/Hping3 is a command-line-oriented network scanning and packet crafting tool for the TCP/IP protocol that sends ICMP echo requests and supports TCP, UDP, ICMP, and raw-IP protocols. It performs network security auditing, firewall testing, manual path MTU discovery, advanced traceroute, remote OS fingerprinting, remote uptime guessing, TCP/IP stacks auditing, and other functions.
In the above scenario, the host does not respond to a ping request. Here, the tester needs to use Hping tools and perform an ACK scan to get the response from a host using TCP.
Hping can be configured to perform an ACK scan by specifying the argument -A in the command line. Here, you are setting the ACK flag in the probe packets and performing the scan. You perform this scan when a host does not respond to a ping request. By issuing this command, Hping checks if a host is alive on a network. If it finds a live host and an open port, it returns an RST response.
Which of the following open-source tools would be the best choice to scan a network for potential targets?
A. Cain & Abel
B. John the Ripper
C. NMAP
D. hashcat
Answer: C. NMAP.
Explanation:
Nmap is an open-source security scanner for network exploration and hacking. It allows you to discover hosts and services on a computer network, thus creating a “map” of the network.
hashcat, Cain & Abel, and John the Ripper are the password cracking tools that allow you to reset unknown or lost Windows local administrator, domain administrator, and other user account passwords. In the case of forgotten passwords, it even allows users to get access to their locked computer instantly without reinstalling Windows.
Which of the following Hping3 command is used to perform ACK scan?
A. hping3 -1 –p 80
B. hping3 –A –p 80
C. hping3 -8 50-60 –S –V
D. hping3 -2 –p 80
Answer: B. hping3 –A –p 80.
hping3 -1 –p 80: This command performs an ICMP ping on the target IP address on port 80.
hping3 –A –p 80: This command performs an ACK scan on port 80 of the target IP address.
hping3 -2 –p 80: This command performs a UDP scan on port 80 of the target IP address.
hping3 -8 50-60 –S –V: This command performs a SYN scan on ports 50-60 of the target IP address with verbose output enabled.
Which of the following ping methods is effective in identifying active hosts similar to the ICMP timestamp ping, specifically when the administrator blocks the conventional ICMP ECHO ping?
A. ICMP ECHO ping sweep
B. ICMP ECHO ping scan
C. ICMP address mask ping scan
D. UDP ping scan
Answer: C. ICMP address mask ping scan
Explanation:
ICMP Address Mask Ping Scan: This type of ping method is also effective in identifying the active hosts similarly to the ICMP timestamp ping, specifically when the administrator blocks the traditional ICMP Echo ping.
ICMP ECHO Ping Scan: ICMP ECHO ping scan involves sending ICMP ECHO requests to a host. If the host is alive, it will return an ICMP ECHO reply. This scan is useful for locating active devices or determining if ICMP is passing through a firewall.
ICMP ECHO Ping Sweep: A ping sweep (also known as an ICMP sweep) is a basic network scanning technique that is adopted to determine the range of IP addresses that map to live hosts (computers). Although a single ping will tell the user whether a specified host computer exists on the network, a ping sweep consists of ICMP ECHO requests sent to multiple hosts. If a specified host is active, it will return an ICMP ECHO reply.
UDP Ping scan: UDP ping scan is similar to TCP ping scan; however, in the UDP ping scan, Nmap sends UDP packets to the target host.
Which of the following protocols uses the port number 88/TCP and can verify the identity of a user or host connected to a network?
A. TFTP
B. Finger
C. NTP
D. Kerberos
Answer: D. Kerberos.
The important reserved ports are listed below:
Name Port/Protocol Service Description
tftp 69/tcp Trivial File Transfer
finger 79/tcp Finger
kerberos 88/tcp Kerberos
ntp 123/tcp Network Time Protocol
Which of the following scans detects when a port is open after completing the three-way handshake, establishes a full connection, and closes the connection by sending an RST packet?
A. ACK flag probe scan
B. TCP connect scan
C. IDLE/IPID header scan
D. Stealth scan
Answer: B. TCP connect scan.
Explanation:
TCP Connect scan detects when a port is open after completing the three-way handshake. TCP Connect scan establishes a full connection and then closes the connection by sending an RST packet.
Stealth Scan involves abruptly resetting the TCP connection between the client and server before the completion of three-way handshake signals, thus leaving the connection half-open. Scanning involves abruptly resetting the TCP connection between the client and server before the completion of three-way handshake signals, thus leaving the connection half-open.
ACK Flag Probe Scan is used by attackers to send TCP probe packets set with an ACK flag to a remote device and then analyze the header information (TTL and WINDOW field) of received RST packets to determine if the port is open or closed.
In IDLE/IPID Header Scan, every IP packet on the Internet has a fragment identification number (IPID); an OS increases the IPID for each packet sent; thus, probing an IPID gives an attacker the number of packets sent after the last probe. A machine that receives an unsolicited SYN|ACK packet will respond with an RST. An unsolicited RST will be ignored.
Which of the following Nmap options is used by an attacker to perform an SCTP COOKIE ECHO scan?
A. -sY
B. -sL
C. -sU
D. -sZ
Answer: D. -sZ.
Explanation:
In Zenmap, the -sY option is used to perform the SCTP INIT scan.
In Zenmap, the -sU option is used to perform a UDP scan.
In Zenmap, the -sZ option is used to perform the SCTP COOKIE ECHO scan.
In Zenmap, the -sL option is used to perform a list scan.