Nmap Flashcards

1
Q

Syn Scan

A

-sS
SYN scans sends back a RST TCP packet after receiving a SYN/ACK from the server. Referred to as “half-open” or stealth scans

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

UDP Scan

A

-sU

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

OS Detection

A

-O

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

Version of services running on target

A

-sV

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

Increase verbosity

A

-v, with more v’s meaning higher verbosity
Ex: -vv

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

Output scan in normal format

A

-oN

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

Output scan in XML format

A

-oX

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

Output scan in greppable format

A

-oG

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

Output scan in the three major formats at once

A

-oA

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

Activate aggressive mode

A

-A
This is a shorthand switch that activates service detection, operating system detection, a traceroute and common script scanning.

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

Increase speed of scan (and drawbacks)

A

-T(x) with x being 1-5 sets the speed.
Higher levels are noisier and can generate errors

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

Specify ports- single, range, all

A

Single: -p (x) [-p 80]
Range: -p (x)-(y) [1000-1500]
All: -p-

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

TCP Connect Scan

A

-sT
TCP Connect scan works by performing the three-way handshake with each target port in turn. In other words, Nmap tries to connect to each specified TCP port, and determines whether the service is open by the response it receives.

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

What does a “filtered” port indicate?

A

That it is protected by firewall, and the incoming packet was dropped.

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

If a port is closed, which flag should the server send back to indicate this?

A

RST

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

What are some drawbacks of Syn Scans?

A

Require Sudo permissions
Unstable services are sometimes brought down by them

17
Q

What is the default scan Nmap uses?

A

If the user has sudo permissions: Syn Scan.
If user does not have sudo permissions: TCP Connect Scan.

18
Q

Drawbacks of UDP Scans

A

UDP scans tend to be incredibly slow in comparison to the various TCP scans (in the region of 20 minutes to scan the first 1000 ports, with a good connection)

19
Q

If a UDP port doesn’t respond to an Nmap scan, what will it be marked as?

A

Open|Filtered

20
Q

When a UDP port is closed, by convention the target should send back a “port unreachable” message. Which protocol would it use to do so?

A

ICMP

21
Q

Null Scan

A

-sN
TCP request is sent with no flags set at all. As per the RFC, the target host should respond with a RST if the port is closed.

22
Q

FIN Scan

A

-sF
Request is sent with the FIN flag (usually used to gracefully close an active connection). Once again, Nmap expects a RST if the port is closed.

23
Q

Xmas Tree Scan

A

-sX
Sends a malformed TCP packet and expects a RST response for closed ports. It’s referred to as an xmas scan as the flags that it sets (PSH, URG and FIN) give it the appearance of a blinking christmas tree when viewed as a packet capture in Wireshark.

24
Q

Why are NULL, FIN and Xmas scans generally used?

A

Firewall Evasion

25
Q

Ping Sweep

A

-sn
Sends ICMP packets to ping target IP addresses to determine which hosts are active

26
Q

NSE

A

Nmap Scripting Engine
Written in Lua, extends the capabilities of nmap.
Can be used to do a variety of things: from scanning for vulnerabilities, to automating exploits for them.

27
Q

ICMP is often blocked, requiring the use of what flag?

A

-Pn which tells Nmap to not bother pinging the host before scanning it.