2.4 Information gathering & Vulnerability scanning: Nmap Flashcards

1
Q

Nmap Discovery Scans: what is Nmap Security Scanner?

A

▪ A versatile port scanner used for topology, host, service, and OS discovery and enumeration
▪ An nmap discovery scan is used to footprint the network

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

Nmap Discovery Scans: give the basic syntax for running nmap scan

A

nmap {IP}
ex: nmap 192.168.1.0/24

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

Nmap Discovery Scans: give the syntax for running a host discovery scan on nmap

A

nmap –sn {IP}
ex: nmap –sn 192.168.1.0/24

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

Nmap Discovery Scans: what -sn stands for?

A

No port scan.
This option tells Nmap not to do a port scan after host discovery, and only print out the available hosts that responded to the host discovery probes. This is often known as a “ping scan”.

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

Nmap Discovery Scans: what -sL stands for ?

A

List Scan (-sL)
Lists the IP addresses from the supplied target range(s) and performs a reverse-DNS query to discover any host names associated with those IPs

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

Nmap Discovery Scans: what -PS <PortList> used for ?</PortList>

A

TCP SYN ping (-PS <PortList>)
Probes (=research/ explore) specific ports from the given list using a TCP SYN packet instead of an ICMP packet to conduct the ping</PortList>

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

Nmap Discovery Scans: what –scan-delay <Time> used for ?</Time>

A

Issues probes (=research/ explore) with significant delays to become stealthier and avoid detection by an IDS or IPS

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

Nmap Discovery Scans: what -Tn used for ?

A

Scan Timing (-Tn)
Issues probes with using a timing pattern with n being the pattern to utilize (0 is slowest and 5 is fastest)

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

Nmap Discovery Scans: what -sl used for ?

A

TCP Idle Scan (-sI)
Another stealth method, this scan makes it appear that another machine (a zombie) started the scan to hide the true identity of the scanning machine

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

Nmap Discovery Scans: what -f or –mtu used for ?

A

Fragmentation (-f or –mtu)
A technique that splits the TCP header of each probe between multiple IP datagrams to make it hard for an IDS or IPS to detect

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

Nmap Discovery Scans: what are the expected results of a nmap discovery scan?

A

The results of a discovery scan should be a list of IP addresses and whether they responded to the probes

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

Nmap Discovery Scans: how can you see the output of the scan and what are the proposed format (5)?

A

▪ Interactive (default) to screen
▪ Normal (-oN) to file
▪ XML (-oX) to file
▪ Grepable (-oG) to file
▪ XML or grepable output can be integrating with most SIEM products

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

Nmap Port Scans: when should you run a nmap port scan?

A

After your footprinting is complete, it is time to begin fingerprinting hosts

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

Nmap Port Scans: what it is used for ?

A

▪ Determine which network services and operating systems are in use by a target
▪ Service discovery can take minutes to hours to complete

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

Nmap Port Scans: what’s -sS used for?

A

TCP SYN (-sS)
In this type of scan, Nmap sends a SYN packet to the target port and analyzes the response to determine if the port is open, closed, or filtered by a firewall. This scan is fast and discreet, making it useful for network mapping and discovering online devices.

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

Nmap Port Scans: what’s -sT used for?

A

TCP Connect (-sT)
Conducts a three-way handshake scan by sending a SYN packet to identify the port state and then sending an ACK packet once the SYN-ACK is received

17
Q

Nmap Port Scans: what’s -sN used for?

A

Null Scan (-sN)
Conducts a scan by sending a packet with the header bit set to zero

18
Q

Nmap Port Scans: what’s -sF used for?

A

FIN Scan (-sF)
This type of scan sends a TCP packet with just the FIN flag set. It’s often used to determine whether a port is open, closed, or filtered by a firewall.

19
Q

Nmap Port Scans: what’s -sX used for?

A

Xmas Scan (-sX)
This type of scan sets the FIN, PSH, and URG flags, but leaves the ACK flag unset. This technique is often used to determine firewall filtering rules and to identify TCP port state.

20
Q

Nmap Port Scans: what’s -sU used for?

A

UDP Scan (-sU)
Conducts a scan by sending a UDP packet to the target and waiting for a response or timeout

21
Q

Nmap Port Scans: what’s -p used for?

A

Port Range (-p)
Conducts a scan by targeting the specified ports instead of the default of the 1,000 most commonly used ports

22
Q

Nmap Port Scans: once you see the port scan results, what state a port can commonly have (3)?

A

▪ Open: An application on the host is accepting connections
▪ Closed: The port responds to probes by sending a reset [RST] packet, but no application is available to accept connections
▪ Filtered: Nmap cannot probe the port, usually due to a firewall blocking the scans on the network or host

23
Q

Nmap Port Scans: you see the port scan results but the scan cannot determine reliable result, what state a port can have in that case (3)?

A

▪ Unfiltered: Nmap can probe the port but cannot determine if it is open or closed
▪ Open|Filtered: Nmap cannot determine if the port is open or filtered when conducting a UDP or IP protocol scan
▪ Closed|Filtered: Nmap cannot determine if the port is closed or filtered when conducting a TCP Idle scan

24
Q

Nmap Port Scans: why do you need to understand the port state?

A

Port states are important to understand because an open port indicates a host that might be vulnerable to an inbound connection

25
Q

Nmap Fingerprinting: what is Fingerprinting?

A

A technique to get a list of resources on the network, host, or system as a whole to identify potential targets for further attack

26
Q

Nmap Fingerprinting: what should you do after the open port are discovered with Nmap?

A

Once open ports are discovered, use Nmap to probe them intensely:
▪ # nmap –sV 192.168.1.1
▪ # nmap –A 192.168.1.1

27
Q

Nmap Fingerprinting: why should you do an intensive fingerprint? What information can you retrieve?

A

An intensive fingerprint scan can provide more detailed information:
▪ Protocol
▪ Application name and version
▪ OS type and version
▪ Host name
▪ Device type

28
Q

Nmap Fingerprinting: what -sV stands for?

A

Probe open ports to determine service/version info

29
Q

Nmap Fingerprinting: what -A stands for?

A

TCP ACK scan
Enable OS detection, version detection, script scanning and traceroute
This type of scan sends TCP packets with the ACK flag set. It is used to determine how a firewall or intrusion detection system (IDS) is filtering packets, and to infer the presence of a firewall or filter.

30
Q

Nmap Fingerprinting: How does Nmap fingerprint what services and versions are running (2)?

A

▪ Common Platform Enumeration (CPE)
▪ Nmap Scripting Engine (NSE)

31
Q

Nmap Fingerprinting: explain Common Platform Enumeration (CPE)?

A

Scheme for identifying hardware devices, operating systems, and applications developed by MITRE

32
Q

Nmap Fingerprinting: explain Nmap Scripting Engine (NSE)?

A

Scripts are written in the Lua scripting language that can be used to carry out detailed probes:
o OS detection and platform enumeration
o Windows user account discovery
o Identify logged-on Windows user
o Basic vulnerability detection
o Get HTTP data and identify applications
o Geolocation to traceroute probes