Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
Already have an account? Sign In »
Hello. My name is Dustin, and welcome to pen test basics scanning networks. We're gonna go into some actual and maps scans, and what I've got here is the real quick cheat sheet that goes through a few of the most common commands that you'll use in. The cool thing about this is once you know some of these, you can actually combine them,
and I'll see you how to do that when we get to it.
But the first command you'll want to nose the most basic command, and that's just end map and then an I P address. And what that will do is run and maps default scan on a single I P address. If you didn't know the I P address or you prefer to just scanned by hosting, you can do that as well. And you can do that by typing and map
and then the hosting
so pretty easy. You can also scanning range of I PS, and that's just end map. The first i p address in the range gaffe last I P address in the range.
Hey, maybe easier sometimes to scan a full sub net.
And in the case of that you would just type in end mouth and then the network address. So in this case, 19216810 sets the 1 90 to 1 68 1 network,
and we did a slash 24. And you see, do you want to do it in cider notation and that'll scan that whole network with the base and math scan.
You can also scan from, ah, list of targets and written into a file,
and that's really useful. If you ran a few scans, maybe to see what hosts are up, just ran a real quick pink skin and rode it to a file. You can then
use that list to run a more advanced scan,
so it's cool. You can combine a couple of these. If you're just looking for a single port, you can do that as well, and you do that by typing and map Dash P and in the port number. So, for example, sshh. Or if you want to look for telling that or a C P. D. N s anything, you could just enter the port number than the I P address.
You can also scan for a range of court numbers, and this is done in the same way that the range of eyepieces done. So it's end map dash p for port number, the first court number in the range and then the last port number
and then the i P address. And that'll scan for all of those ports on one I p. Address.
Another one that's really useful is just scanning the 100 most common ports. And you can do that by doing it and map dash capital F
then the I p address. So really easy Thio to do that, just the top 100 ports, most common ones.
Then, if you really want to, you can scan for every single port,
and you could do that by doing the map Dash P dash, then the I P address.
And like I said, you can kind of combine some of these commands So say he wanted to search for the most 100 common ports on a range of I P addresses.
You can do that by typing in and map
Dash F for the most common ports,
and then the first i P address in the range. One nine two one six eight one one dash the last I p. Address of the range. So we're gonna go ahead and hop in the lab now and kind of show you how some of these work.
All right, so I am in the lab now. As you can see, I've got a terminal open in Cali, Lennox, you can open it from the little sidebar over here or by typing in control T So we know where on the 1921681 network. So let's go ahead and scan a single. I pee on the way we do that again, it's just end map.
Then that I p address 19 to 1 68 11
So we will let that scan run. It should only take about 15 20 seconds or so.
All right, so that was real quick and only took about 17 seconds and we can see on the default skin that we've got a few different ports open on this device.
That's really cool. It shows it all there nice and easy.
Another really useful scam would be a
whose discovery scam. And that's just something you can kind of scan the whole network just to see if the hosts are up. So if we run
with scenes in math
lower case S P and then the network rains were into the 1 91 6810 slash 24. And you could also take this as ah range of I p. So 19216811-2 55. Who wanted to scan everything? I know
for a fact you don't have that many devices on this network, so we're just gonna d'oh
and map one through 20.
As you can see with that just quick Discovery scan with the SP one through 20 looks like all 20 hosts are up, so there's a few other things you can do can combine these. Like I said, you can actually scan from a list, so it's going to create a list real quick. So you see a nano
and we will just listed as
we'll say no Nai peas.
All right, so let's say we know 192
Sure, we get our
16811 is ah, host. We wanna scan 121681 15 192.1 sexy. Got one.
13. It'll have to be any order. This is a list of hosts.
So if we hit control Um Oh, that'll right up file. Enter
control X look. Good and clear that.
And so l s Let's see if we can find
okay. So we can see that this
scan did complete It Looks like it took just over a minute to scan those hopes. So we've got a couple of posts up, so we've got 121682 up. And it's showing that s h is open.
We've got 192168 That 1 15 with a bunch of filtered ports wanting to 1681 13. And it shows that 2069 is open. And then we've got our 19216811 So this is really useful for scanning and network to see what's on there.
What devices? Air running.
You can do a dash a for advance and that will attempt to discover what operating system is. What other service is. Maybe running. There's a lot of stuff that you could do with end map. It's a really powerful tool to discover what's on
your network. And one thing. I will mention this super handy like so you can scan from known I P lists.
One thing you can do
is we can do and maps can
any and maps can. So we'll just do the 192168.11 again, and you can actually write it to a text file
so we can stay Router scan results
and we'll let that scan run. If you remember, this one should be pretty quick. It's already done, so it's unclear the screen. It's going a little crowded, and then we will cat router scan results. And here is your exact,
scan results from that one,
and it's really easy to build. Some commands kind of filter through these outputs, look for only certain ports
and just kind of narrow it down. And because it was all command line, you could do a lot of different scripting with maps. A very, very powerful tool