Hello and welcome to Command Line
Basics.
In this video, we're learning about
Windows System commands one.
I'm Christopher Haler and this
begin.
So we're learning objectives for
this video. We are going to learn
the system in full command, learn
the date and the time commands,
understand the Who am I command
very similar to the Linux, who am I?
And get the command history
pre assessment.
Which command will display the
current computer name.
Is it A who am I.
B System C
check disk with the
system info.
The answer is the system info, we
are looking for the system
information in order to see
the computer name of the
system we are on.
So this is a very useful tool that
we are going to learn a little more
about to get a better diagnostic
or specific information for
a computer system.
The Who Am I command is used to
see what user account you're using.
The system is not a real
command and the check disk is used
to prepare a file system.
All right, so the system Infocom
command, as we learn this, will
display a lot of information
about the current computer to
include the computer name, the patch
level, also show the
specific CPU and GPU
for the machine as well.
Additionally, you'll see what type
of domain it is a part of
or if it has a specific work
group that it's a part of the
BIOS information and the last boot
time.
So what's very useful about
the system infocom in is that if
you are able to compromise
a Windows machine as a penetration
tester and you need
to find any more vulnerabilities for
a system, you can use the system
info and it will display all of
the patch level, computer
name kernel information
that you can use to help verify
or identify new
exploits for a system.
So this can be very useful from the
penetration test or mindset.
So let's give you a quick
demonstration.
I'm going to type system info at
my command prompt.
It'll take a few seconds to gather
all this information.
All right, and as we saw, there was
a whole lot at once, so I'm going to
do the up arrow and we are going to
type this into more.
That way we can take our time
reading through.
All right, here we go. So as we can
see a top, it has my computer
name. We see that I'm on
Microsoft Windows 10 home and
I'm on 10 01, seventeen
seventy six three.
So this is very useful information.
We can see the original install
date. It was February 5th
of twenty nineteen and
last Budha, my computer on September
11th.
So a lot of very useful information
that we can use in order to
help identify either system
information for a
system administrator perspective to
help validate or fix
a computer or to help compromised
computer friendly penetration tester
as well.
All right. So date and time, the
date and the time commands are used
to either see this
specific date and time on
the computer or we can also
change the date or
the time from the command line as
well.
And this is useful to keep in mind
for a Kerberos environment that
Windows is a part of
where it is a system
clock is more than five minutes off
from the Kerberos
for the domain.
Then you'll have a lot of very
strange and the
issues with the system
communicating over the domain
so it can be useful command to
validate that a computer is within
that specific time window for
Kerberos environment.
So let's start off with date.
And as we see, today
is Sunday, September 15th.
Twenty nineteen.
And I do not want to enter a new
date because I do want to keep the
date the same. So I'm just going to
hit enter and then ignore it.
And we can do the same at the time.
In the current
time is eleven, fifty and
forty nine seconds and I do
not want to enter any time, so I'm
going to hit enter.
We have the Who am I come in and
this is very, very similar to Lennix
one where it displays the logged in
user and at the Windows
command prompt, it will show your
domain as well.
And if you're not part of a domain,
then you'll just show your local
computer name as the
domain that you are a part of.
So we will take a look at this
type. Who am I?
And it looks like I am Chris Laptop
Chris. And that is my user account.
So that sounds just about right.
So this is a useful comment.
If you compromise machine as well,
you can see exactly which user
account you are.
We have the command history, so
for the Windows command line,
we can use the dusky history
and this will display all the
previous commands that we've
executed during this
this command session.
Now, if we close out of this command
session, it will clear this history.
So if you have a specific command
that you ran and you want to save
it, I highly recommend running this
task history command
and then you can copy and paste the
specific command out of that into
a text file so you can save it for
later.
So let's take a look at that.
We'll do task
history
and look at that.
I have all sorts of different
commands that I entered.
And just like we learned, if we want
to be able to copy and paste
text from the command line, we can
right click do mark
and then drag all the way down
and then hit enter.
And it is in our clipboard now that
we can paste directly into a text
file for later.
Pose the question, why is the system
infocom and important to appen test?
Is it a it shows the domain password
B may help display vulnerabilities.
C, it gives you system privileges
or D shows the Kerberos ticket
granted to get
the answer is B it may help display
vulnerabilities.
Just as we learned the system
infocom in displays all of the
current information about the system
to include the current patch level.
So for a test or you can take this
information and look in different
databases for exploits for that
current patch level.
So very useful to be able to kind of
determine how you can further
compromise the machine.
It does not show the domain password
does not give you system privileges,
which is kind of like the root
account for a Windows box, and
it does not give you the Kerberos
ticket granting ticket.
All right. So in this video, we
learned about the system infocom in
and how we can use it.
We learned the date and the time
commands and how we can set a
different date or time for a
machine.
Understood the Who am I command
and how we can see which user
account we are using.
We got the command history and
learned how to copy and paste it
into a separate file for
later.
So I hope to see you in the
next video.