Deck 1 Flashcards

1
Q

What should you do if a script is missing in the local scripts directory?

A

You can fix this by running ‘sudo apt update && sudo apt install nmap’ or by manually downloading the script from Nmap and updating the script.db file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What command can you run to manually install a missing NSE script?

A

You can run ‘sudo wget -O /usr/share/nmap/scripts/.nse https://svn.nmap.org/nmap/scripts/.nse’ to download and install the script.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command should you run after manually installing an NSE script to update the script.db file?

A

You should run ‘nmap –script-updatedb’ to update the script.db file after manually installing a script.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Where does Nmap store its scripts on Linux?

A

/usr/share/nmap/scripts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of the /usr/share/nmap/scripts/script.db file?

A

To search for installed scripts in Nmap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Where can you find a list of all official scripts for Nmap?

A

On the Nmap website.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the content stored in the script.db file?

A

Filenames and categories for each available script.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the command to activate NSE scripts from the vuln category?

A

To activate NSE scripts from the vuln category, the command is –script=vuln.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the command to run multiple scripts simultaneously?

A

To run multiple scripts simultaneously, the command is –script=,.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can arguments be given to NSE scripts using the Nmap switch?

A

Arguments can be given to NSE scripts using the –script-args Nmap switch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can the built-in help menu for Nmap scripts be accessed?

A

The built-in help menu for Nmap scripts can be accessed using the command nmap –script-help .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What language are NSE Scripts written in?

A

NSE Scripts are written in the Lua programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some categories of NSE Scripts?

A

Some categories of NSE Scripts include safe, intrusive, vuln, exploit, auth, brute, and discovery.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What can NSE Scripts be used for?

A

NSE Scripts can be used for scanning for vulnerabilities, automating exploits, reconnaissance, bypassing authentication, and querying running services for further information about the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of using a ping sweep with Nmap?

A

The purpose of using a ping sweep with Nmap is to obtain a map of the network structure by identifying active hosts based on ICMP echo responses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the -sn switch do in Nmap?

A

The -sn switch in Nmap tells it not to scan any ports and rely primarily on ICMP echo packets to identify targets during a ping sweep.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What additional packets does the -sn switch cause Nmap to send during a ping sweep?

A

In addition to ICMP echo requests, the -sn switch causes Nmap to send a TCP SYN packet to port 443 and a TCP ACK (or TCP SYN if not run as root) packet to port 80 of the target during a ping sweep.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How can you specify IP ranges when performing a ping sweep with Nmap?

A

You can specify IP ranges using either a hyphen (-) or CIDR notation when performing a ping sweep with Nmap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are NULL scans used for?

A

NULL scans are used to send TCP requests with no flags set at all.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the expected behavior if a port is protected by a firewall during a NULL, FIN, or Xmas scan?

A

If a port is protected by a firewall during a NULL, FIN, or Xmas scan, the scan will identify the port as open|filtered, closed, or filtered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the purpose of FIN scans?

A

FIN scans send a request with the FIN flag and expect a RST response if the port is closed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the reason for most modern IDS solutions being savvy to NULL, FIN, and Xmas scan types?

A

Most modern IDS solutions are savvy to NULL, FIN, and Xmas scan types because they are designed to detect these scan techniques and prevent firewall evasion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the expected response from network hosts for closed ports according to RFC 793?

A

According to RFC 793, network hosts should respond to malformed packets with a RST TCP packet for closed ports.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Why are Xmas scans called Xmas scans?

A

Xmas scans are called Xmas scans because the flags it sets (PSH, URG, and FIN) give it the appearance of a blinking Christmas tree when viewed as a packet capture in Wireshark.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is the main characteristic of UDP connections?

A

UDP connections are stateless and do not require a handshake.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is one reason why UDP scans tend to be slower compared to TCP scans?

A

UDP scans tend to be slower due to the difficulty in identifying whether a UDP port is actually open.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is the switch for performing a UDP scan in Nmap?

A

The switch for performing a UDP scan in Nmap is -sU.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is a good practice when running an Nmap scan with UDP?

A

A good practice is to run an Nmap scan with –top-ports enabled to scan the top commonly used UDP ports.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What type of requests does Nmap usually send when scanning UDP ports?

A

Nmap usually sends completely empty requests (raw UDP packets) when scanning UDP ports.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

How does Nmap identify an open UDP port?

A

When a packet is sent to an open UDP port, there should be no response, and Nmap refers to the port as being open|filtered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What are the advantages of SYN scans over TCP Connect scans?

A

SYN scans are faster than TCP Connect scans and require sudo permissions to work correctly in Linux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What does it mean if a port is considered filtered?

A

If a port is considered filtered, it means that it is open but hidden behind a firewall, and the firewall is configured to drop incoming packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

How can a firewall be configured to respond with a RST TCP packet?

A

A firewall can be configured to respond with a RST TCP packet by using commands such as ‘iptables -I INPUT -p tcp –dport -j REJECT –reject-with tcp-reset’ in IPtables for Linux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

What does it mean when Nmap sends a TCP SYN request and receives nothing back?

A

When Nmap sends a TCP SYN request and receives nothing back, it indicates that the port is being protected by a firewall and the port is considered to be filtered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What makes it difficult to get an accurate reading of the target when a firewall is configured to respond with a RST TCP packet?

A

When a firewall is configured to respond with a RST TCP packet, it can make it extremely difficult, if not impossible, to get an accurate reading of the target(s) using Nmap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

How does Nmap determine if a port is closed?

A

Nmap sends a TCP request with the SYN flag set to the closed port, and if the server responds with a TCP packet with the RST flag set, Nmap establishes that the port is closed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What happens when Nmap sends a TCP request to an open port?

A

If Nmap sends a TCP request to an open port, the target server will respond with a TCP packet with the SYN/ACK flags set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

How does Nmap mark a port as open?

A

Nmap marks a port as open when it receives a TCP packet with the SYN/ACK flags set in response to its TCP request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

What is the purpose of the TCP packet with the RST flag set?

A

The TCP packet with the RST (Reset) flag set is sent by the target server to indicate that the connection does not exist and that the port is closed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

What is the purpose of a TCP Connect scan?

A

The purpose of a TCP Connect scan is to determine whether a TCP port on a target server is open or closed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

How does a TCP Connect scan work?

A

A TCP Connect scan works by performing the three-way handshake with each target port, attempting to establish a connection and determine if the service is open or closed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

What are the three stages of the TCP three-way handshake?

A

The three stages of the TCP three-way handshake are: 1) Sending a TCP request with the SYN flag set, 2) Acknowledging the packet with a TCP response containing the SYN and ACK flags, 3) Sending a TCP request with the ACK flag set to complete the handshake.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

What are the three basic scan types when port scanning with Nmap?

A

The three basic scan types when port scanning with Nmap are TCP Connect Scans (-sT), SYN ‘Half-open’ Scans (-sS), and UDP Scans (-sU).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

What are some less common port scan types covered in the content?

A

Some less common port scan types covered in the content are TCP Null Scans (-sN), TCP FIN Scans (-sF), and TCP Xmas Scans (-sX).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

What is one notable difference between UDP scans and the other scan types discussed?

A

One notable difference between UDP scans and the other scan types discussed is that UDP scans work differently compared to TCP Connect Scans, SYN ‘Half-open’ Scans, TCP Null Scans,
TCP FIN Scans, and TCP Xmas Scans.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

How can you access the help menu for nmap?

A

By typing nmap -h in the terminal command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What are switches in nmap?

A

Command arguments which tell a program to do different things.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What tool is commonly used for port scanning?

A

nmap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

What is the purpose of port scanning?

A

The purpose of port scanning is to determine which ports on a target system are open, closed, or filtered by a firewall.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

What is the purpose of performing a port scan before attacking a target?

A

To determine which ports are open on the target server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

What is the industry standard tool for port scanning?

A

The industry standard tool for port scanning is Nmap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

What is the standard port for HTTP Webservice?

A

Port 80.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

What makes Nmap a powerful tool for port scanning?

A

Nmap is a powerful tool for port scanning because it has extensive functionality and a scripting engine that can be used to scan for vulnerabilities and perform exploits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

Why is proper enumeration important before attempting exploitation?

A

Proper enumeration is important before attempting exploitation because it provides knowledge about the target system or network, allowing for better informed exploitation attempts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

What is the purpose of port scanning in the reconnaissance phase of hacking?

A

The purpose of port scanning is to identify which services are running on the target system or network, providing a map of the ‘landscape’ to be attacked.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

What is a port in the context of networking?

A

A port is a networking construct used by a computer to open a connection and receive network services.

57
Q

How are ports used to establish connections between web browsers and remote webservers?

A

Ports are used to establish connections between web browsers and remote webservers by connecting an open port listening on the server to a randomly selected port on your own computer.

58
Q

Why are ports used in networking?

A

Ports are used in networking to direct traffic to the appropriate service when running multiple services on a server or when establishing connections between different network entities.

59
Q

What is the purpose of using different ports when loading multiple webpages in a web browser?

A

The purpose of using different ports when loading multiple webpages in a web browser is to determine which tab is loading which webpage.

60
Q

What is the purpose of a router?

A

A router’s purpose is to connect networks and pass data between them.

61
Q

What is routing?

A

Routing is the process of data traveling across networks by creating a path between them.

62
Q

When is routing useful?

A

Routing is useful when devices are connected by multiple paths.

63
Q

What are switches designed to aggregate?

A

Switches are designed to aggregate multiple other devices such as computers, printers, or any other networking-capable device using ethernet.

64
Q

What is the main advantage of switches over hubs/repeaters?

A

Switches are much more efficient than hubs/repeaters as they keep track of what device is connected to which port and only send packets to the intended target, reducing network traffic.

65
Q

Where are switches usually found?

A

Switches are usually found in larger networks such as businesses, schools, or similar-sized networks, where there are many devices to connect to the network.

66
Q

What is the purpose of connecting switches and routers to each other in a network?

A

Connecting switches and routers increases the redundancy (reliability) of a network by adding multiple paths for data to take. If one path goes down, another can be used.

67
Q

What is the main characteristic of a ring topology?

A

The main characteristic of a ring topology is that devices are connected directly to each other to form a loop.

68
Q

How does data travel in a ring topology?

A

Data travels across the loop in a ring topology until it reaches the destined device, using other devices along the loop to forward the data.

69
Q

In a ring topology, when will a device send received data from another device?

A

A device in a ring topology will only send received data from another device if it does not have any data to send itself.

70
Q

What is a potential disadvantage of a ring topology when it comes to data traveling?

A

A potential disadvantage of a ring topology is that data may have to visit many multiple devices before reaching the intended device, making it less efficient for data traveling across a network.

71
Q

What is a disadvantage of the bus topology?

A

A disadvantage of the bus topology is that there is little redundancy in place in case of failures.

72
Q

What is the backbone cable in a bus topology?

A

The backbone cable in a bus topology is a single connection that all devices in the topology stem from.

73
Q

What happens if the backbone cable in a bus topology breaks?

A

If the backbone cable in a bus topology breaks, devices can no longer receive or transmit data along the bus.

74
Q

What is the main issue with the bus topology when devices simultaneously request data?

A

The main issue with the bus topology is that it quickly becomes slow and bottlenecked if devices within the topology are simultaneously requesting data.

75
Q

What is the main premise of a star topology?

A

The main premise of a star topology is that devices are individually connected via a central networking device such as a switch or hub.

76
Q

What is the advantage of a star topology?

A

One advantage of a star topology is that it is very easy to add more devices as the demand for the network increases.

77
Q

What is a disadvantage of a star topology?

A

One disadvantage of a star topology is that if the centralised hardware that connects devices fails, these devices will no longer be able to send or receive data.

78
Q

What is the most commonly found topology today?

A

The most commonly found topology today is the star topology.

79
Q

What does the term ‘topology’ refer to in networking?

A

The term ‘topology’ refers to the design or look of the network at hand.

80
Q

What is the importance of network topology?

A

Network topology is important as it determines how devices are connected and how data flows within a network.

81
Q

What command can be used to map the path a request takes as it heads to a target machine?

A

traceroute

82
Q

What protocol does the Windows traceroute utility (tracert) use by default?

A

ICMP

83
Q

What is the purpose of the ping command?

A

The ping command is used to test whether a connection to a remote resource is possible.

84
Q

What layer of the OSI Model does the ICMP protocol work on?

A

The ICMP protocol works on the Network layer of the OSI Model.

85
Q

Which protocol does the ping command use?

A

The ping command uses the ICMP protocol.

86
Q

What is the basic syntax for the ping command?

A

The basic syntax for ping is ping .

87
Q

What is the ping command commonly used for?

A

The ping command is commonly used to test the connectivity to a website on the internet or a computer on a local network.

88
Q

What can ping be used for besides testing network connectivity?

A

Ping can be used to determine the IP address of a server hosting a website.

89
Q

What is the purpose of the three-way handshake in TCP?

A

The three-way handshake establishes a stable connection between two computers before data transmission.

90
Q

What are the two most important protocols in the TCP/IP suite?

A

The two most important protocols in the TCP/IP suite are the Transmission Control Protocol (TCP) and the Internet Protocol (IP).

91
Q

What does TCP stand for?

A

TCP stands for Transmission Control Protocol.

92
Q

What does the SYN bit indicate in the three-way handshake?

A

The SYN bit indicates the request to initialize a connection in the three-way handshake.

93
Q

What does IP stand for?

A

IP stands for Internet Protocol.

94
Q

What does the ACK bit indicate in the three-way handshake?

A

The ACK bit acknowledges the received SYN bit and confirms the successful setup of the connection in the three-way handshake.

95
Q

How many layers does the TCP/IP model consist of?

A

The TCP/IP model consists of four layers.

96
Q

What are the four layers of the TCP/IP model?

A

The four layers of the TCP/IP model are Application, Transport, Internet, and Network Interface.

97
Q

What is the purpose of the OSI model in networking?

A

The OSI model is used for learning the initial theory of networking.

98
Q

How do encapsulation and de-encapsulation work in the TCP/IP model?

A

In the TCP/IP model, a header is added during encapsulation and removed during de-encapsulation at each layer.

99
Q

Why are encapsulation and de-encapsulation important in networking?

A

Encapsulation and de-encapsulation are important in networking because they provide a standardized method for sending data and ensure that all transmissions consistently follow the same methodology, allowing any network-enabled device to send a request to any other reachable device and be sure that it will be understood, regardless of manufacturer, operating system, or other factors.

100
Q

What is the purpose of encapsulation in networking?

A

The purpose of encapsulation in networking is to wrap data with headers and trailers, allowing it to be transmitted over a network in a structured format that can be understood by receiving devices.

101
Q

What is the process of de-encapsulation in networking?

A

The process of de-encapsulation in networking involves removing the headers and trailers from encapsulated data, allowing the original data to be extracted and processed by the receiving device.

102
Q

What is the process called when the message is received by the second computer?

A

De-encapsulation.

103
Q

What is the purpose of encapsulation in the OSI model?

A

Add information at each layer.

104
Q

What happens when a computer receives data in the OSI model?

A

De-encapsulation occurs, starting from the physical layer and moving up to the application layer.

105
Q

What is the data referred to as in layers 7, 6, and 5 of the OSI model?

A

The data is referred to as ‘data’ in layers 7, 6, and 5 of the OSI model.

106
Q

What is the encapsulated data referred to as at the Network Layer?

A

The encapsulated data is referred to as a ‘packet’ at the Network Layer.

107
Q

What is the encapsulated data referred to as at the Data Link layer?

A

The encapsulated data is referred to as a ‘frame’ at the Data Link layer.

108
Q

What does the header added by the Network Layer include?

A

The header added by the Network Layer includes things like the source and destination IP addresses.

109
Q

What is the purpose of the data link layer’s addition at the end of the transmission?

A

The addition at the end of the transmission by the data link layer is used to verify that the data has not been corrupted on transmission.

110
Q

What is the process called when data is sent from one computer to another?

A

The process is called encapsulation.

111
Q

What kind of information does the Transport Layer header include?

A

The Transport Layer header includes information specific to the protocol being used.

112
Q

What is the role of the physical layer in a network?

A

The physical layer is responsible for converting binary data into signals and transmitting them across the network, as well as receiving incoming signals and converting them back into binary data.

113
Q

Which layer of the network is responsible for converting binary data into signals and transmitting them across the network?

A

The physical layer is responsible for converting binary data into signals and transmitting them across the network.

114
Q

What does the data link layer focus on?

A

The physical addressing of the transmission.

115
Q

What information does the data link layer add to a packet received from the network layer?

A

The physical (MAC) address of the receiving endpoint.

116
Q

What is the main function of the data link layer?

A

The data link layer focuses on the physical addressing of the transmission. It receives a packet from the network layer (that includes the IP address for the remote computer) and adds in the physical (MAC) address of the receiving endpoint. Inside every network enabled computer is a Network Interface Card (NIC) which comes with a unique MAC (Media Access Control) address to identify it.

117
Q

What is a MAC address and how is it set?

A

A MAC address is a unique physical address assigned to a Network Interface Card (NIC) by the manufacturer. It is burnt into the card and cannot be changed.

118
Q

What is the responsibility of the network layer?

A

The network layer is responsible for locating the destination of a request and figuring out the best route to take.

119
Q

What is logical addressing?

A

Logical addressing refers to the use of IP addresses to provide order to networks and categorize them.

120
Q

What is the most common format of logical addressing?

A

The most common format of logical addressing is the IPV4 format.

121
Q

What is an example of a common IPV4 address for a home router?

A

An example of a common IPV4 address for a home router is 192.168.1.1.

122
Q

What are the two most common protocols in the transport layer?

A

The two most common protocols in the transport layer are TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

123
Q

In TCP, is the transmission connection-based or connectionless?

A

In TCP, the transmission is connection-based.

124
Q

What is the purpose of using UDP in the transport layer?

A

UDP is used in situations where speed is more important.

125
Q

What are the bite-sized pieces called in TCP and UDP?

A

In TCP, the bite-sized pieces are called segments; in UDP, they are called datagrams.

126
Q

What is the role of the session layer in networking?

A

The session layer is responsible for setting up, maintaining, and synchronizing communication sessions between computers across a network.

127
Q

What is the uniqueness of the session created by the session layer?

A

The session created by the session layer is unique to the communication in question, allowing multiple requests to different endpoints simultaneously without data getting mixed up.

128
Q

Which layer does the session layer pass the data down to once it has successfully logged a connection?

A

The session layer passes the data down to Layer 4: the transport layer.

129
Q

What happens if the session layer cannot establish a connection with the remote computer?

A

If the session layer cannot establish a connection with the remote computer, it sends back an error and the communication process does not proceed further.

130
Q

What does the application layer of the OSI model provide?

A

The application layer provides networking options to programs running on a computer.

131
Q

What is the role of the presentation layer in the OSI model?

A

The presentation layer translates data into a standardized format and handles encryption, compression, and other transformations.

132
Q

Which layer of the OSI model receives data from the application layer?

A

The presentation layer receives data from the application layer.

133
Q

What model is used to demonstrate the theory behind computer networking?

A

The OSI (Open Systems Interconnection) Model.

134
Q

How many layers does the OSI model consist of? Cite the name of each one of them.

A

The OSI model consists of seven layers. They are: - Application
- Presentation
- Session
- Transport
- Network
- Data Link
- Physical

135
Q

What is the mnemonic you can use to remember the layers of the OSI model?

A

Anxious Pale Shakespeare Treated Nervous Drunks Patiently

136
Q

What is the aim of this room?

A

The aim of this room is to provide a beginner’s introduction to the basic principles of networking.

137
Q

What are the topics covered in this room?

A

The topics covered in this room are: The OSI Model, The TCP/IP Model, How these models look in practice, and An introduction to basic networking tools.

138
Q

What is the OSI Model?

A

The OSI Model is a conceptual framework that standardizes the functions of a communication system into seven distinct layers.