NMAP

Course
Time
7 hours 1 minute
Difficulty
Beginner
CEU/CPE
7

Video Transcription

00:01
Welcome to the end map lesson on operating system detection and fingerprinting.
00:05
Always detection and fingerprinting is one of the most powerful features of end map. And just like application and service version detection, there's a lot to cover in this lesson. So let's get right to it.
00:16
Here are the learning objectives for this lesson.
00:19
First, we'll talk about what operating system detection and fingerprinting is an end map.
00:25
Second will discuss why it is both relevant and important.
00:28
Third, we'll talk about when and how to use it, including the most important command line option. You need to know
00:35
they don't provide a couple other command line options that are really helpful,
00:39
and we'll finish up this lesson with a lab on operating system detection and fingerprinting. Let's get started.
00:46
Os detection is exactly as it sounds, and map sends up to 16 DCP,
00:52
UDP and ICMP probes against the target, then evaluates responses in order to determine the operating system that the target is running.
01:00
There are several ways to perform OS detection and map, which will go over later, but fundamentally it can be performed with a single command line switch, and that is dash capital o
01:11
the combination of all responses received by N map. Make up the devices fingerprint.
01:15
So OS detection tells us what operating system the target is running.
01:21
But fingerprinting provides us with details about that system that make up a more unique identification.
01:27
In General OS detection and fingerprinting is much more accurate and informative on a local network than on a remote network,
01:34
but it provides extremely valuable information. In both cases,
01:38
the Last bullet point is a reference to a great entry point into discovering all of end maps. Capabilities regarding OS detection in fingerprinting,
01:49
OS detection and fingerprinting offers many of the same benefits is application and service version detection and provides answers to key questions that interest both network admin, DS and information security professionals.
02:00
It's include I T Asset Management,
02:04
Licensing and Compliance, among others.
02:07
For network admin, DS and security operations teams. It is vital to know
02:12
what operating systems were running on your network,
02:15
and map can either be your primary source for learning this information quickly, or it could be a secondary source to compare against your IittIe asset management software.
02:23
One obvious benefit to having multiple sources of this information is that any differences in the 2 may indicate unknown or rogue devices.
02:32
In this case, OS detection and figure bringing in N map may lead to further investigation of a potential breach
02:40
for penetration testers. Learning the operating system of your target is Justus important as learning app in service versions.
02:47
The vulnerabilities that exist in older and unpatched operating systems provide low hanging fruit for exploitation.
02:54
Once a machine on the inside of the network perimeter has been breached, pivoting to other machines is much easier.
03:01
So OS detection is a great way to quickly find Target Machine's.
03:07
So far, we've discussed a lot about how N map discovers devices on a network thin skins for open ports than attempts to determine what service is an application versions Air running on Target hosts.
03:19
In the last lesson, I suggested that this is the normal flow of N map scanning, and I truly believe that is a great way to structure approach to scanning.
03:27
I've placed OS detection in fingerprinting on the end of this module for one reason alone, and that is because of the complexity of what end map is performing during an OS detection scan
03:38
With that said. I'd suggest one possible alteration to your scanning of a network.
03:45
Consider performing device Discovery first, then OS detection and fingerprinting, followed by port scanning and service. An application version detection
03:53
have placed a graphic at the top of this slide to represent the flow.
03:59
Obviously, how you structure your scanning is completely up to you and depending on your objective, this flow may not always be appropriate
04:05
for your use of time. But I think you'll agree that this flow makes sense because your skin results in each phase will become more and more granular,
04:15
and the end result will be an extreme amount of detail of your target network and its hosts.
04:21
The basic command for performing OS detection and fingerprinting is simple.
04:26
It is an map space dash capital O.
04:29
In my experience, and especially on a network with a lot of Windows hosts, an enhancement to this scan is in map space. Dash Capital O Space dash Dash script equals SMB Dash O s Dash Discovery
04:44
Space Dash V, then the target host.
04:46
We've discovered we've covered NSC in several past lessons and we'll go over it more detail of the next one, but
04:55
the use of SMB Dash O s Dash Discovery script will be very helpful and informative when performing os detection. So I simply couldn't justify leaving it out of this lesson.
05:05
I'll demonstrate it in the lab.
05:08
Additionally, I suggest that you use the dash V to increase the verbosity of your scan results.
05:14
Not only will you get instant gratification of each scanning phase, but will also get some detail that you wouldn't normally obtain.
05:21
The last bullet point on this slide simply shows you the command as it is typed out in its entirety against the host 1 92.1 68 that 1.10
05:31
Here are some other command line options that you can add to your OS detection scan along with the dash Capital O,
05:36
with the exception of the last one, which is dash Capital A.
05:42
I've shown you Aah! Dash Capital A in the past and I've told you how powerful it is.
05:46
The difference between the 1st 3 options and the dash capital A is that the 1st 3 will complement dash capital O, whereas the dash capital A can be used as a replacement for dash capital O
06:00
Dash os can dish limit is said toe limit OS detection, too. Promising targets. In other words, if you're trying to perform OS detection against an entire sub net and wanted to be accurate yet go quickly at the dash Dash O s scan dash limit option
06:16
as you'll see when you run OS detection scans. And Matt will tell you that OS detection is most effective if at least one open and one closed TCP ports are found.
06:28
Dash dash O s scan dash limit causes the dash o
06:31
dash capital O or dash capital A toe on lee be performed when these conditions are met.
06:39
Dash dash O s scan dash guests or dash dash fuzzy for short are the same thing. And well, guess Os detection results
06:47
when you run a normal dash capital. Oh, and map will only provide you with a guest of the target OS. It is very confident in its results
06:58
when you use this option
07:00
and map will give you its best guess. And we'll add a confidence level for each guests
07:04
again. You'll see this in the lab
07:06
Dash dash max, Dash O s dash tries
07:11
followed by a space and a number will set the maximum number of OS detection tries against the target.
07:15
When an unmapped dash, capital O or Dash Capital A has performed and fails to find a perfect match, it will repeat the attempt five times until it provides you with the result.
07:27
The Dash Dash Max OS tries allows you to find, tune and map in such a way that you can essentially increase the speed or increase the possibility of accuracy of the OS detection scan.
07:39
Finally, dash capital A.
07:41
I considered Platt placing Dash A in the lesson on service inversion detection, but decided not to. It's simply to reduce redundancy and save you time
07:49
Dash capital A Stands for advanced and aggressive. Well, at least that's what I decided. The creators of N map haven't decided what which it stands for, so I decided to make it stand for both.
08:01
If you walk away from this course remembering little about the command line switches I provided, I urge you to remember Dash Capital A.
08:09
It is somewhat slow and noisy, but it provides a lot of bang for the buck.
08:13
Essentially, it performs detailed port scanning, OS detection and application inversion detection, all in one.
08:20
Additionally, it runs NSC script scans against the target hosts.
08:26
I think that the unmapped creators decided not to make it stand for aggressive because of their timing option. Dash Capital T four
08:35
Capital T four. Adjust the timing oven End maps can too aggressive
08:41
the dash Capital A does not do that by default.
08:43
However, From an idea standpoint, all of the things that the dash capital a option performs will certainly look aggressive and even somewhat hostile.
08:52
So use it carefully.
08:54
In some cases, it may even appear to be a denial of service attack
09:00
now into the lab, and this lab will run through the steps mentioned in earlier slide.
09:05
First, we'll do a host Discovery scan. Then we'll do simple OS detection and finger burning scan.
09:11
Then we'll add some additional options and finally will perform an advanced and aggressive scan using the dash capital A Let's do it

Up Next

NMAP

The network mapper (NMAP) is one of the highest quality and powerful free network utilities in the cybersecurity professional's arsenal.

Instructed By

Instructor Profile Image
Rob Thurston
CIO at Integrated Machinery Solutions
Instructor