>> So now that we looked at different target types,
let's look at different output types.
The first thing I'm going to do
is I'm going to create a directory called
results in the root of C. Let me clear the screen.
I'll do an md space results.
Now I do a dir results*.
just to make sure it's there.
The results folder is there.
Now I'll do a cd results.
Now we're in the results folder.
I'll clear the screen again.
I just want to show you quickly where in
the nmap help you can find the different output types,
the nmap -h. I'm going to scroll up.
There you can see output and here are the main types,
right here at the top.
We'll go over some of these other options,
too, in a later lab.
You can see, you can scan,
you can output a scan to
normal XML script kiddie and grepable format.
Or you can output to all formats at the same time.
Actually, it doesn't do all of them,
it doesn't do the script kiddie version,
it doesn't do the script kiddie output type.
We will clear the screen again.
We'll start by doing an nmap scan to 192.168.1.254,
just a default nmap scan,
and we will output it to the normal nmap file type.
We'll call it results1.nmap. Hit "Enter".
Now I'll do a dir in the results folder,
and there you see the results1.nmap file.
If you want to view the output quickly,
you can type notepad space results1.nmap.
It'll bring up a notepad document
with the results of that scan.
Since it's the default output type,
what is here will be
exactly what showed up
on the screen when you did the nmap scan.
We can just close out of this, clear the screen.
Now I'll do nmap-O,
scanme.nmap.org.
We'll do a oA results2.
oA will output to the three main file types,
which is the default nmap file type,
XML, and the grepable format.
Notice that I didn't put a file extension,
and the reason why is because nmap will do that
for you. I hit "Enter".
The -O is an operating system detection scan.
So we got our results.
I'll clear the screen. Now I'll do another dir.
You can see that nmap outputted
to a grepable nmap format,
the regular nmap format, and XML,
and you can see that the XML file is the largest.
The next thing I want to cover
was just the fact that you can
put options or scan types,
or target, and the output in different locations in
the command line and
all of them will work the exact same.
We'll do a nmap.
I'll clear the screen.
So we'll do an nmap-oN
results3.nmap
192.168.1.254.
This time we'll put our scan option that for
the operating system detection at
the very end instead of at the beginning, hit "Enter".
[NOISE] Clear the screen,
do a dir, and there you can see your results3.nmap.
Now I'll do an nmap -O,
and this time I'll put the scan option
>> at the beginning,
>> and then I'll put the target,
and then I'll put the results, and hit "Enter".
I really like doing it this way because just like
any Windows Command Line tool,
you can hit "Up Arrow" and you can easily get
to the output type and the output file,
and you can easily get to
the target because they're
at the very end of the command line.
Because a lot of the time you'll have a lot of
options besides just -O,
you'll have a lot of your different
>> options at the beginning.
>> If you hit the up arrow, it's very easy to just
simply change your target and change your results.
[NOISE]
There's the scan,
do a dir, and there you can see the scan results
for result5 for that last scan.
Again, the point was that in this last scan we ran,
the output and the target are at
the end rather than at the beginning.
I hope you agree with me that it's easier.
If you don't yet, you will later,
once we start doing more complex scans.
So now I just want to cover two other things,
and that is, how much detail
is in the results of your scan?
You can control that somewhat by using -v or -vv,
and the v stands for verbosity.
Clear screen and we'll do
an nmap -O, -v. [NOISE]
Then hit "Enter". You can
already see that's a lot more detail
than the last time that we ran that scan.
I'll do a dir. We can basically compare.
Well, right now, we'll have results6.nmap.
What I could do is also run that again.
We'll call it results5.
Then we'll take away the verbosity on
that scan. Hit "Enter".
I'll do another dir.
Really what I want to show you here is if you
look at that last scan I did,
it was only 838 bytes.
Whereas when I use the -v command line switch,
it's a 1,045 bytes.
Let's do one more scan.
We'll do a nmap -O -vv
, [NOISE] hit "Enter".
Again, you'll see a lot more stuff going on.
A lot more details there.
I will do a dir.
So now we can compare the three files,
one with no verbosity, 838,
one with a -v,
and then one with -vv,
and you can see that there's a lot more detail.
If you want to open them up in notepad
or whatever text editor you like,
you'll be able to compare
the difference between the three.
We'll end it there. Thanks so much for going through
this lab on constructing basic nmap scans with me.