5 hours 21 minutes
right. Hello and welcome to command line Basics. This module will cover one knows Net commands. I'm Christopher Hyler and this begin.
So the learning objectives for this module is we're gonna learn the capabilities of the Net command. Add users from the command line, create groups, start and stop Service's and mount remote file shares
aren't pre assessment. Which command is used to mount a remote share? Is it a net remote?
Be net share C net use or D Net file.
The answer is C net use. So the Net use command is going to use a drive letter to help mount a remote share. And this is something that you will see commonly inside of from Assist agnan Perspective Free one. There's nowhere
The net remote net share and that file are all different. Different types of purposes for the next command that we can learn
aren't so enter to the Net command. This is a very, very strong command for the Windows Command line.
It has all sorts of different functions. We can add users at groups, starter stop service's and connect other computers, and, well, that sounds very. It's very useful. It's very strong and you know, it's very helpful for missus admin perspective where you know we can
create these computers and have them running smoothly together and talking to each other and be able Thio utilize thes functions.
But at the same time, it is also a very sought after in a very highly used command for penetration testers, hackers and the nation state actors as well.
So you will see the neck command is used pretty heavily offensively as well. Where if a Windows host is compromised, a, uh, actor can use the net use command to mount remote file, share to another workstation
and try to pivot, you know, into a separate
machine to exploit a network further. So that's why this command is very important to understand. And ah, you know, if you're going into the ethical hacking side of the house that absolutely need to know how to use this command. Thio pivot through a network.
All right, so adding users, we could do net user space, user name, space password.
And if you have a list of 500 users, this could be automated as well.
So let me give you a quick demonstration of that.
So just like any other comments were going to do. Net
slash question Mark
and we have all sorts of different options. Weaken. Do so The Net command has like different flavors inside of it. So since we are looking forward, that user,
it's a net user slash question mark.
And this gives us more info about the Net user command and how we use that.
So it's a Net user
new, and the password will be
and my user name could not be found.
Oh, you know, I need to do add
That is why slash ed
and asked. This is denied. I believe it is because I am not on a dumb in controller.
But regardless, if you weren't a command, control it. That's how that works
aren't so adding groups very similar to the users. We'll do Net Group and then a group name. You do slash ad to add user names or slashed elite that delete user names from a group
that's gonna be very similar. You can look through the help documentation as well.
Starting and stopping service is so. This is something you'll see a lot, especially from the penetration testing side where you will start a service or stop a service, depending on you know, the different kind of attack you're trying, Thio begin or service you're trying to exploit. So, uh,
this could be used to list service is as well. I'll give you a quick demonstration of that.
Let's say Net start
and this will give us a big list of service is that are already started
and like you received before, we can pipe this into a more that way we can read through it line by line before it goes flying past our face.
no, let's see which service should we stop?
Let's say I don't want to end the power surface right now. At least,
let's say Windows event logs do net stop.
And since there are spaces were in and put this in, quote
enter all right and stopping the winners event. Log Service will also stop thes service's
occasion. Where Liz Yeah, sure. Let's give that a shot. Access is denied. Oh, boy. All right, Well, that's how you would stop service.
And then the same way to start the service is well
aren't and then net used. We can use the net use command to connect to a remote file share. And, like I was saying before, this is a very common way to pivot between user computers to exploited network a za penetration tester or a hacker.
So one example would be net use, and then you have to put in the drive later you're going to use and then, uh, the remote file share.
So let me show you what I have
Net share. So this shows my current shares on my computer right now. So we have the C d
ah i p c print admin and users folders that are always shared out. So I want to connect in the Mount A to the d Dr.
So we're gonna do net use slash question mark first. So we can always see how to use this command
net use. And then we need the device name. I am going to do device. Kay.
All right, and then
Frist Tech laptop.
Thanks slash D dollar sign.
All right, says command completed successfully. Let's take a look and check it out. I have a map network drive
that is actually my d dr.
And to delete it, it's going to be the same command, except we'll just put a slash delete, as you can see right here.
All right, so it's a net use and we don't need to put in the full file path. Just say K slashed elite
and says K was deleted successfully. Let's take a look and it is gone. Great. So that is how we can attach and remove remote file shares.
All right, post assessment. When actions cannot be done with the Net Command, said a connect. Other computers
be create admin accounts.
See Starter Stop Service's or D shut down a computer.
The answer is D shut down a computer. There is actually the shutdown command that could be used to shut down the computer. And, like I was saying, before the Net Command can be used to connect to other computers, create new accounts and started stop service is
all right. So in this video, we learned the capabilities of the neck Command had add users from the command line, create groups, share local files and mount remote file shares, and I hope to see you in the next video
SOC Analyst Assessment Level 1
Cydefe's SOC Analyst Assessment, Level 1, Capture-the-Flag (CTF) Assessment
How to Use GDB (BSWJ)
The GNU Debugger (GDB) is one of the most commonly-used debugging tools in the world. ...
Certificate of Completion Offered