Hello and welcome back to Sai Berries Infrastructure Services course today we're gonna look at what ports do we have open. So this will be looking at the difference ports and soccer's we have open to the Internet or our own network.
So in this video, we're gonna look at the command line that stat the command, not step in its usage. Also, we're going to utilize Investec Command to verify that our server is listening.
it's pretty powerful. There's a lot of difference flags and options for it. But we're what we're gonna use it for right now is we're gonna determine what ports are open to our network and what programs are using them.
So when you talk about what programs are using them
ah, you're actually gonna have the wrongness as admin. So it's just just doing it off the back. You can look at the P I ds of the programs without being admin, which is kind of cool if you don't have admin access, but you do its command prompt access, and then you can reference that p i d.
Through your task manager, right?
So then we'll also quickly look at the winter, Stan, and they have boon to usage.
All right, so we're gonna test with two different service here. I'm gonna bring out my Windows 10 machine. We're going to start the solar winds T FTP server. Well, uh,
and that's gonna listen on UDP port 69.
So here we got windows time, I actually gonna be running the
see. We have solar winds on Don't remember. We dio
No. So if you're gonna run TFT PD,
I'm gonna verify real fast we do a clear screen,
verify. So if we look at net stats
Dash, we would look at all ports would look a new miracle. We don't need to resolve any host names.
We're gonna look at protocol UDP
here is our exude connections.
So we currently are not listening on 69.
And here you'll see the couple different I p addresses. Uh,
these air different VM ware.
So let's go ahead and start up to have TPD.
This is a very lightweight free program. He needed as well
started. Gandhi wanted to
on We should be listening on the server,
so let's go ahead and just at the up. Arrow. Run it again.
Here we see that. Now we have something listening on poor 69. So is the one that you can run it when you're doing this kind of secure, kind of short term security office. If you think that a breach and what happened, you can see, you know, is there something listening out that should not be kind of a obscure way of doing it. But you have nothing else. It's a quick, easy way
to do it. We had issues at my current replace where we thought that Britain and the Radius server wasn't listening. We went through. We verified that radios is listening.
We also had issues where some programs were taken. The trap poor for SNP
s. So we had to actually shut down on a program. So that way, the correct solar ones program would take the traps.
So here we're gonna look at some of different flags since it was gonna be apparel
and we're gonna put in the B flag, which will show us the program or the dot t x c that is currently utilizing that port.
So here we get in here, we say port 69. And it is the TF TPD 64 that e x c program. So here hopes so that stats
show. I'm gonna look at the one that shows the p I ds here.
So here's all the different flags train.
Okay, so here, if we do the
for get rid of the B. If we do the
oh flag, you'll see the p I d that's associated with.
So here we see P i d 67 56. All right, so now we're gonna go ahead and bring up the boon to server. Are there just be a boon to image here? We're gonna bring up just a simple HD to be server with Python. We're gonna verify that it is listening on TCP port 80.
So here, bringing us out to the side here. So it's still kind of see,
Let's expand this out
clear on it here. So we do it in that stance minus all the miracle protocol. TCP
So here we started looking at the TCP. We have this listening on Port 53
So listening for Deena's traffic currently, but no on.
All right, so let's go ahead and bring up the python server here. We've seen that we're not listening. Import 80.
So let's go ahead and do it.
Actually, we're gonna need Sudo on this one.
Right on. Pseudo a simple http server were lesson on Port Haiti. We can actually said that. What a report. We want a default simply to 80 80.
So let's go ahead and hit the up arrow. Do the same thing.
Scroll up and come on.
You'll see we're now listening on a port 80 tells us the PD python as well. Already.
So quick. Quiz here for the end with flag on the net. Step command requires elevated privilege. Sin, this is four Windows tends to think about it for a second.
Think about what each one kind of means.
If you guessed letter t or dash B, you would be correct. A remembers for all for all connections and his numerical meaning Doors off Host news and C is to give you the p i. D. Of the owning program.
And in his lesson today we looked at the command that stat and is usage a little bit. We utilize net stat to verify that our servers were listening and they worked properly.
And, as always, thank you for washing this lesson that look forward to seeing you in the next one.