But basically, ohh thank you for starting the recording. I'm
guessing that that may have been.
Somebody who remembered.
It wasn't me anyway. Alright. Thank you for starting the
recording. Welcome to Tuesday nights, M&T.
Real informal this go around. Basically what I'm gonna cover
is the basics of the different hypervisors out there, how you
can set-up a VM on your own host machine.
And then we'll cover some of the Linux distros that you can get
on that VM, especially if you're going to be using them
throughout the internship. If you need one to use for the
different training areas, hack the box, try hack me, etcetera.
I will ask if anybody cause I can't because I'm gonna be
looking and few different screens at once. I won't really
be able to monitor the chat, but if a question pops up if you
guys just ask, that'll be fine. Or if somebody could tell me if
someone has their hands up.
I'll try to keep an eye on it though.
So.
Right off the bat, I was hoping to have something where you guys
can, like follow along. If you don't have a VM already, but I
know that would require everybody to download everything
ahead of time. I tried to put it out, but it was a little short
notice, so completely understandable if you didn't get
all the items you need, but for the sake of just this exercise,
let's say we'll go over Kali.
Even though I have parrot open, that's just the one of my
choice. But we'll go over how to install Kali, since that's most
likely the one.
That most of you will be using throughout the internship.
Because it will have a lot of the tools you may need pre built
into it. That's really the basics of these security
distros. I just come with a lot of most used tools built in so
you don't have to worry about installing them, but we will go
over the basics of package management as well and how you
can find and install programs or utilities you may need to use
when you're on Linux as well as how to find information about
those programs because that's the most important thing, at
least to me that I see people go through is learning how to find
help.
Uh, when you need it. So if you don't understand something, you
need to learn where to go to get it, and the basic one we're
gonna cover is just how to access the man pages. So the
manuals.
I'm just call man pages for shorts, wanted some of the
terminology you'll hear.
So kicking it right off, if when you see on my screen I have two
hypervisors open, two of the most popular that we'll talk
about. But basically the term hypervisor is any piece of
software or any program that utilizes the hardware on your
host machine in this in most cases a PC which camera not a
laptop as well or a Mac, any operating system can host them,
but they just utilize this piece software that runs that utilizes
the hardware. So it.
You could split up your ram. You could split up your hard drive
space. You can even assign some of your other hardware like your
dedicated graphics card to be used by the VM itself. That's a
little more involved, we'll just go over the basics today, but
that's basically what a hypervisor is. It's just
software that utilizes the hardware on your machine to run
virtual computers.
When people use terms like the cloud or some, you know, if
they're using infrastructure as a service, something like that
AWS, Azure, those cloud environments you may have heard
meme going around. It's like a joke that people say it's like
there is no cloud, it's just somebody else's computer. And
that's true to an extent. You basically when you have a cloud
environment, if you've ever worked in them before, it's
similar to the way virtual machine runs. They just have
racks and racks of servers set-up and you're just accessing
them remotely.
If you've ever worked in a government environment, you're.
Pretty familiar with this concept, even if you don't know
it, because if you worked in a well, let me specify a
classified environment within the government.
Then basically what you get is 3 different access to the
different systems. Usually you get like unclassified, secret
and then top secret.
Well, those networks are basically clouds. They're
they're amorphous networks. Your computer that you're logging
into, it's never stored locally. Information. There is always
stored on a network device. They're all boot. They're all
set to boot through the network. So basically when you're
accessing stuff like that, you're accessing a virtual
machine. So whether you know it or not.
So on the left here is VirtualBox, you if you're
familiar with VM's at all, or hypervisors, you've probably
seen this one. It's a good free option.
It's.
Well-rounded has a lot of utilities you can use as a lot
of the basics for our purposes is the one I'm going to
demonstrate on.
But it they're all work about the same. Once you know how to
install the operating system itself, and you're gonna do it
just like you went on a computer. If you were doing a
bare metal, which is just the hardware. And then on the right
side we have VMware. This is the pro edition. You can buy it if
you want, but there is a free version as this as well. There's
just a few features that aren't available in the free versus the
Pro Yavor.
Uh, yeah, quick question. If we already have a VirtualBox
Sure.
downloaded, do you want us to like go to Cali and download
their their US version so we can follow along with you or?
Yeah. I mean, yeah, if you if you want to cause it, if you
already know how to set it up. I admittedly you might not get too
much out of these this first part because it's just gonna be
setting up the VM. But yeah, if you want, you could download
Collie to follow along. That's what I downloaded actually
earlier today. I just know it's like 2 gigs. So it takes a
while. So just in case you guys don't get it in time, it's OK.
We can always go back and watch the recording if you need to
walk through.
Got it, got it.
But yeah, actually that brings us to a good point. And now we
talked about the hypervisors.
Essentially, the the easiest way you can think about it and
you'll get people that will tell you ohh, this isn't that's not
exactly how it works. So you get the actually people where they
go. Actually the way it works, that's fine. There is an
in-depth technical explanation, but for our purposes, all you
guys need to know is that virtual machines are just real
computers running on your existing hardware. They're just
taking a piece of that existing hardware and running on it
within your host machine, so.
Again, the two will go over is VirtualBox and VMware the the
process though is the same. I'm only going to go through the
in-depth process of VirtualBox, but VMware it's nearly
identical. The setup process. What I'm not gonna do and I'll
show you guys that now.
Is download the version that made for VM, so this is the
collie website the you know used to be called backtrack. If you
wanna read up on the history of Kali. But basically they have
different versions available. Now when you go to click
download and the two you're going to see recommended are
bare metal or virtual machines. The bare metal version. This is
the version we're going to download. Even though we're
installing it on a virtual machine. And I'll tell you why
because I like working with Isos.
But the reason we're doing it this way is because if you do
try to install a virtual machine image, it's a prebuilt VMware
VirtualBox, so it will be specific to which hypervisor you
have and not just coli. But let's say you're trying to get
other Linux distros, they may not have this option available
where you can just download a prebuilt image. If we were to
download this, we would basically load it into VMware,
VirtualBox and all it would give us was a machine that was
already set-up ready to go, had everything.
Ohh you can even see it already has default credentials setup.
So you go that route if you want just to download and go, but if
you use snapshots, I like to use an installer.
And the reason is because I can go to any. I can throw this on a
a USB stick and I do have one. We keep around like a USB stick
full of OSS and you try to keep them up to date and you could
just go around. You can even make a bootable USB out of the
ISO image so you can boot directly into collie from your
USB. It's there's a lot of different ways you can do it,
but I just like to carry around the Isos, download them because
they're universal. You can take them anywhere. You can put them
on a CD and do it in a bare metal machine. You could convert
an old laptop if you have one kicking around to Cali.
Whatever you want to do, so yeah. If you're gonna follow
along, this is the one I downloaded, and you can see I
actually have it in a folder here. So that's the one that
we're on. 2022.3. And that'll increment as the year goes on.
If you're ever unsure about downloading an OS or where
you're downloading it from now Kali, I can see up here that I'm
actually on the page, so I'm not on a different page or anything,
but collies pretty trustworthy. So as long as you know you're on
the right page, OK, but if you're unsure if it's somewhere
you haven't downloaded before, if you've never done this, you
can always check, check the checksum, or inspect the
checksum if you want. And all this is it gives you the shot
256 some.
Of the file it's supposed to download. So if you're, you
should be familiar with hashing. If you guys are in the
internship, but when you hash something it it generates a
unique value. There is such thing as hash crashing MD5
mainly where two different values can generate the same
hash, but that's not the case. Was shot 256. It's just so huge
that there is no to my knowledge there's no collusion. Existing
collisions known on shot 256 but.
What you can do is you can actually check the hash.
Excuse me. Let me just fire this up.
You can check the hash of the file itself and ensure that it
matches. There's a lot of different ways you can do it.
You can use an online version if you want.
Excuse me? You can use an online hasher if you want. Just select.
Make sure you're selecting shot 256.
But the other way and let me see if I can get this going here.
Ohh well, I'm not on my shared list.
Let me see here.
But basically you can plug that file into the.
An online service if you want anything, they can check the
shot 256 hash.
And that'll work for you. Oh, here we go.
I could do it on here I suppose.
Ohh never mind.
Can you guys still hear me? I'm sorry my computer locked up.
Alright. Well, we'll do. We'll have to do that later. My
computer locked up. We'll do it once we get it up and running.
Alright, great. Sorry about that.
OK, so when you are downloading again like I said, you can check
the SHA 256 sum to make sure you have the right file and then you
can just download the ISO itself, save it to wherever you
want on your computer.
So for this one, like I said, we're gonna go through just this
first part. We'll only go through VirtualBox, but I I
don't. The reason being is that I have the pro version of VMware
and I don't wanna do it on here because it will be slightly
different. So I don't wanna show you the exact steps, but it is
similar. You're just setting up the how much hardware you wanna
dedicate to the VM, how much space you wanna dedicate to it.
And then once you you just run through the install as if you
were installing it on a bare metal machine.
Alright.
So for VirtualBox, we're gonna just set-up a new machine. You
can name it whatever you want. I'll do this one.
Holly 2022.3.
Once you initially set-up VirtualBox, you're going to have
a file where it's going to put all the virtual machine
directory for that machine itself. So this is just where
mine saving, it's just on a spare drive I have and it sets
all the virtual machines. You could do it anywhere you want.
The most important thing you're going to look for in this first
page is the type and the version, because it's gonna
set-up the way the hardware communicates with the machine.
It's gonna go by this.
So if you set this up wrong, it might not work.
I'm it typically defaults to Microsoft Windows, but since we
know we have Cali.
We're gonna say we're running a Linux machine.
Now to get into Linux distros, I'll do it in this part because
this is where we're gonna have to pick a version. If you don't
know what a distro is, you've almost certainly heard of them
because it's all different types of Linux. So Collie is a sub
distro of the main distro, Debian. So was parrot. It's like
different versions of that software that people are putting
out. If you grew up with Windows, so if you were a
Windows user all your life, and you're just only familiar with
Windows, these other operating systems confuse you.
A good way to think of it is just imagine somebody made
little customized versions of Windows and made their maybe
their own file structure their own way. The desktop shows up
the own default settings, like the way the text looks, things
like that.
Then that is a separate distro equivalent of Linux. So do you
have a? Let's say there's Dan Windows and I had my own little
custom format and I put it out for you guys and I'm like,
download Dan Windows today, then that would be a distro of
windows if Microsoft allowed that sort of thing. They don't.
Linux is open source so everybody can get Linux while
Unix is the backbone of it. The kernel is open source. You can
actually work on the project if you get good enough at coding.
You can actually submit.
Uh commit requests to the the GitHub, the Linux GitHub for the
kernel, and you can say I worked on the Linux kernel.
It it takes a lot to do but and they they it's they only merge
very trustworthy sources. Recent news on that with I think it was
the beginning of this year is actually.
Massachusetts. I wanna say Massachusetts or Maine, one of
the schools that is authorized the state colleges to update the
Linux kernel, got in trouble because they were actually
injecting malware. They said it was as a test or something to
see if somebody paid attention. It was this whole convoluted
story. But basically, they take it very seriously. The
maintainers and you can only update it if you're a
trustworthy source. And if you've made a lot of requests
that are legit in the past.
Then you get approved. It's so it's a pretty prestigious thing.
So basically that's where Linux might have an edge over windows
and why some people like it is because it's highly
customizable. There's thousands of distros you can start from
your main ones, though, are going to be Debian and Red Hat
are the two. You're gonna see a lot debbins another base, Red
Hat Arch Linux. And I say Debian Red Hat because I come from the
government side and that's the ones we use the most, but.
I've seen it in the industry as well.
Uh Arch is like a highly, extremely customized. So you
build it from scratch, basically version Gen 2, Fedora, Mandriva,
Oracle, Red Hat, opensuse, turbolinux, Ubuntu. These are
just all different distros, but they all run on like one
backbone. So for Collie, Collie is a sub distribution of Debian
and we're gonna select 64 bit because I have a 64 bit
processor in here.
Alright, so the other benefit about the sum of these distros
is they're known to be lightweight. Kali is one that's,
I'd say, semi lightweight if you ever worked with like Mint or.
Other like extremely lightweight distros, you'd see what I mean.
There are some that are just 100% CLI based and you can run
them on a potato. I run an older version of Kali with the same
tools. It's still works, but I run it on my laptop which has,
you know like 8 gigs of RAM and I think at one point it had four
and it worked fine. It's starting to have graphics card.
It's got a built in. It's a basic HP G4 or whatever they
call it laptop. It's like an old modded business laptop.
The point is you can run these things on anything if you ever
see somebody says, oh, you know, you gotta have collie with like
64 gigs of RAM and the high end graphics card for cracking
hashes.
You you generally don't. If you are cracking hashes a lot, then
yeah it helps, but you generally don't need this beast of a
system just to run Linux. So for this our purposes we can specify
2048, let's just say 2 gigs of RAM.
You know what? Let's up into four just.
That's overkill, but let's do it.
So virtual hard disk for these you're gonna wanna use the
default. You cannot use a virtual hard disk, but then you
won't have storage. You can use an existing hard disk. This is
just the actual file.
For the.
I'm sorry for the VM that's gonna use as it's as if it was.
It's real hard drive basically. So for default you can create a
virtual hard disk. Now I like to use a VDI. It's the standard
disk image. You the differences here are usually going to be how
file is stored or how data is stored on that file. Again, for
our purposes you're not getting too deep into that. You can just
stick with the defaults.
And finally, you want to leave it dynamically allocated so it
explains it here, but basically as you reach the size limit, you
can up the maximum fixed size and then it. It'll basically
only use up to the amount you set or as much as you're
actually using.
I don't plan on keeping this one around, so I'll make it, let's
say, just 40 gigs for now. However, if I planned on keeping
this and using it a lot, and even even then, I only use VMS
for a couple months and then I just either revert back to a
snapshot or I get rid of them altogether. If I'm not using
them anymore. So for this one, let's just say we'll set it for
40. I typically do around 80 though.
And that's it. Once we create, it's going to create the file.
We can use to load that VM. Now we're not done yet to actually
load the operating system, so at this point you want to think of
it as if you just have.
A bare metal machine sitting in front of you. You just have that
tower and no operating system on it. So for the VM you have to
install an operating system and that's what we're gonna do now.
Some things I like to do beforehand. You don't have to do
this, but it's just my advice is to check your display settings,
make sure you're if you have more than one monitor, you can
actually set it to two or however many you have, and you
can display. You can use those monitors in the VM. You also
wanna change your video memory if you want to allocate more.
It's just how much.
For most purposes, you won't need that, but if you plan on
watching videos in your VM for any reason, you might wanna up
that a little bit.
Or playing games if that's something you want to do.
We can see the storage here. So for this file you can see we
have like a virtual CD drive here and what we wanna do is we
wanna load our ISO into it. So when we downloaded that.
Excuse me, when we downloaded that, basically the the ISO
operates as a CD basically, so you can actually load any ISO in
here. So let me go down here.
Asians or it is?
This is why, like I said before, why I like getting ISO version
because I can install it anywhere I can put it on any
hypervisor I have run in any computer. If I have a bare metal
machine in front of me, I can load from USB like I was saying,
so that's why I like having that. But this is what we're
gonna select now. Now it's quote UN quote loaded into that C
drive. I keep forgetting you guys can't see my hands. I talk
with my hands a lot.
We can hit OK and we can launch it.
Should probably shut down my parrot, cause it's gonna take
up.
Resources.
Go. Sorry to open up on another screen.
But let me just get that loaded there so you can see it opened
up the select, the startup disk and we're gonna select the one
we loaded into the drive.
And you can see it's starting up now.
For those of you that haven't seen any Linux installation
process before, it's.
You gotta go similar to Windows, somewhat like windows, but for
ease of use we can take the graphical install just the
default setting.
It's going to ask us to format the drive that we're utilizing.
We can feel confident. We're not gonna lose any information
because since we're running this in a VM, the formatted drive
it's well, the drive, it's going to format is that.
That special VM file we set aside for the hard disk, so
really it's not formatting anything, it's just creating a
new file.
And the idea here was to show you how quick and easy this can
be. It does take a few minutes. I'm not gonna sit here and make
you guys watch it all, but once you are loaded in, we can start
talking about that as well. And I'm pretty much right on time
here because the 1st 1520 minutes, I just wanted to talk
about this. Go over any questions and then show you some
just basics of Linux navigation, how to get around, how to find
help you need. And then we can actually.
They have some basic Linux terminal exercises like
different websites that gamified websites that you can learn
from. If you don't know it.
And that could help too. So I can show you those as well. I
haven't spun up here.
Alright, let me just get rid of this alert. There we go.
Alright, so the first thing it's going to ask you to set your
host name. I like to since I do have a few VMS at any given
time. My personal recommendation is to name the host name as to
what you're going to be using that for.
You can so for instance, if you were gonna do adjust for the
internship, you can do like your internship box or your
competition box. And that's one that I have set-up a lot. So I
would just name the name of the operating system and then combox
something like that. And that tells me, OK, this is the
competition box that I have for Collie. If I was doing CTFS, I
can't use the. Sorry.
Colly comment box is there we go.
Domain name. You could skip this unless you have a Internet
address tied to your domain. You don't. You don't wanna really
mess with this.
Alright, so naming your user, you do have to create a user
account for non admin rights and then you can add yourself to the
sudoers file or the default. The first user create usually will
be anyway.
So for my purposes of this use my handle.
And we'll continue.
And that's the username for my account.
Alright, so you can set-up a password. We're just gonna go
with the default one, obviously. Make it secure your VM. I'm just
going with a default. Easy one for now. Because again, I'm
gonna delete this.
And then setting up the hard disk. This is that formatting I
was telling you about. Once again, just stick with the
default settings. It's going to use the entire disk because
we're not worried about all the space it has. So you can say I
gave it just enough space to run the.
Operating system and do a couple other things.
You wanna keep it all in one partition? You can split up the
the some of the partitions if you want, and that's just if you
wanted to boot faster and then access it on another partition
of the drive. But since it's so lightweight, you're really not
going to get much benefit out of doing it like separate of your
partitions.
These are the changes just asking you to confirm all your
changes to the hard disk and then it's going to format it and
you can finish partition in the disk. This is one of the only
ones where you have to take an action because it's basically
going to erase information. So it's if there's any there. So
it's going to ask you to confirm and you actually have to click
yes because the default is no, that's on most distros do it
that way that I've seen because just because of that step is so
important. You don't want to accidentally partition a disk
that you need.
So this is the long part. Well, I'll let this one go and I'll
show you the just the user, we get set-up when we're done, but
now that I have, let's say we got it booted up.
And I'm just again, I'm gonna switch over to parrot.
Kali and Parrot similar systems. I'm just preferring. I'm
crushing on Parrot right now. Real hard. I have been for like,
a year and a half now in love and parrot. So it's just my
preference right now. And I guess that's a good a time as
any to talk about the different preferences people have before I
get into that yavor you have a question?
Uh, yeah, just real quick about parrot, if we're setting up like
a like a parrot, a virtual machine is set-up the same as
the Cali one.
Yes and no. So like, set-up you mean the setup process we just
went through? Is that the same?
Yeah, pretty much.
Yeah, yeah, yeah, that's pretty much the same apparent has one
different thing where it actually boots you if you choose
the graphical install, it'll boot you into a default
environment with just like a basic user with no root
permissions.
And then right over here on the left.
You'll just have a little program.
I think it's called like install parrot or just install and you
click that and that runs the install process. So on Collie
you saw was like that little box and you had to pick the
Yeah.
installation. Parrots kind of similar because it is built on
Debian as well. So parrots kind of similar in that once it boots
though you just have to click that install and it'll run you
through the same process naming your user partitioning the drive
etc.
Got it.
So this is just the the parrot competition box I've been using
lately.
Nothing fancy, I just change it around so it's how I like it.
But the way once I'm in OK, so I wanted to talk about the
different distros and how you will if you haven't already,
you're gonna run into people who are gonna tell you one one thing
or not. Like use this dish or or I only use this one. Or if
you're a real security person, you'd only use like, collie or
something.
It ignore it. I mean, that's the best advice I can give. Just
ignore it. You don't need. There's no one that's the right
one for everybody, if that makes sense. No one OS is gonna be the
right one for everybody. If you're doing a lot of sysadmin
work. I've seen people who just prefer Red Hat just because of
the features in it are good for that kind of work. If you're
doing a lot of pen testing, as you've seen, you'll have people
that wanna load up collie or pair it. It's just good for that
type of work.
It it's all going to come down to personal preference and as
you start using different distros you're gonna develop
your own preferences and you're gonna get into it a little bit
too. You get into that little friendly competition where
you're like mine's better. Or this dish here is better. I just
wanted Covey, though, for new people who have never loaded up
a Linux environment. Don't get discouraged by all that. Don't
let it get to you. Don't get overwhelmed with. Oh well, this
person said use this one. I will say if you want just a super
lightweight version with nothing installed on it.
You could go with Debian or Red Hat, whichever one, and just get
a base operating system because you can install the Debian one
as well. Just a base version of Debian and you just go to
debian.org. Let me bring it up real quick. So if you wanted
like just the base version and this is paired and collie
without anything on it, that's all it essentially is. There's
no utilities preinstalled or preconfigured. There's no
desktop environment preconfigured, it just boots
directly into the default one. So if you wanted.
To get you know, Debbie, in just a bare bones version to start
with, you can do that as well. It's no matter where you start
it. Just wanna be comfortable with the basics of using it. So
it doesn't matter what operating system you're working with. Just
get comfortable with the basics. So.
Alright, now that we are in.
I can talk about just first navigating around.
In most cases, side will say sometimes some distros are
set-up to auto boot into a terminal or even into a windowed
terminal like you see here. Mines not set-up like that, just
in case I wanna do something else. However, 90% of the time
I'm working in a terminal so I just have mine set-up right up
here. I just just like on Windows you can select like you
can pin icons to your taskbar or whatever you wanna call it up at
the top or the bottom. You can even move the taskbar around if
you wanted again.
That's all up to you.
That's all kind of personalization stuff. We don't
have to get into right here.
Let me double check the chat.
Look, you're more like I said, Red Hat. I've seen it. I've seen
it. This is personal. Seen it. Used mostly for sysadmin work or
networking work. So like your network admins might have read
headset up and they'll SSH into the different Cisco terminals
for routers, switches. What have you.
A lot of this admin if if an entire, let's say.
A corporation or an entire organization is using one kind
of OS. You may even like, even if they're using Windows, you
may see a Red Hat box used for creating users on the network as
a whole. Things like that. So yeah, a lot of admin work. Red
has been good for. Again, I've seen it in the military a lot.
It it all depends on what organization it the question
kind of gets at the heart of it though, where no, let me
rephrase that. So the question is kind of broad, right? It's
like asking what is Windows used for? It's like well, it's used
for everything. Anybody that wants to use it. So with Linux,
it can be used for anything. It's just an OS. This is kind of
what I wanna get through. That's the heart of it.
Alright.
So once you're in a box.
And I wanna look at this from the perspective of either it's
your first time using a Linux environment, you're looking at a
terminal and you're like, what the heck do I do now, or you're
working through one of the training sessions, you know,
either and hack the box or try hack me and you do something
that just confuses you even worse, which is gaining access
to the machine. And now you're like, well, what do I do now?
How do I find out? Like, what do I? Where am I? Who am I? How do
I move around things like that? And the good part is.
Doing things like who am I is very easy and you'll see this a
lot as the first command because it's literally the command
itself is. Who am I? You'll see. This one used a lot for when you
do gain access to machines that you're training on. I don't want
to say where you're not supposed to be because I wanna put out
legal advice here and I'm not a lawyer. But you should only
access machines that you have the rights to access. So I'll
just put it that way. Yeah. Don't go trying to be super
hacker and breaking into things and then messing around.
Because even if you don't mean.
To like cause harm you you can still get in trouble for it and
I thought I saw Sean in here. So if we wanna get into getting
written approval beforehand, I'm sure Sean could tell us all
about that.
But basically, when you do pen testing work, it's always
important to get written approval beforehand. That's the
crux of it. You should have heard that in class as well, so
getting ready to it. So who am I? Is just gonna tell you who
you are on the system so you can see I am mental forklift. It's
just the user I created for this one.
Where am I? Is a command called Print Working Directory and
that's going to be just the the initials PWD. So if you type PWD
it'll tell you what folder or what directory you're in. And
right now I am in my home directory.
Ohh Sean is not here, he said over chat. So.
If you can leave a message for him, if anybody really needs to
get all of them, alright. So if I change a directory, so let's
say you know if I'm in my home directory and I go to documents.
So now I'm in documents and if I print working directory now you
can see I move to documents. Can you guys see this as this too
small? I can make it bigger.
No. Well, we're gonna do it anyway.
No, no, no, there we go.
We'll make it bigger. There you go. Now you can see it. So one
thing you made me see me do before was list LS. If you're
not familiar with that command, it's just gonna list what is in
the current directory. So I moved to the root directory and
now you can see that everything I type LS and this is everything
in the root directory.
Commands are going to have something you're gonna call or
you'll hear called arguments and or switches. I've heard them
called switches. You'll hear them called arguments options.
Some people may even say I tend to jump between arguments and
switches.
But all those are are different like settings you can apply to
the commands to change what it does.
So let's say I wanted to list everything in a actual list from
top to bottom, and I also wanted to list all information about
the directories or in Linux you'll hear the term. Everything
is a file, so if I wanted to list all of the information
about each file within the directory I'm working in, then
you can do that with the switches or these arguments and
the ones that I like to do. Typically with list are Al or
LA. Again, in most cases the order won't matter.
In this one it doesn't, but in some cases the order does
matter. It's all gonna depend on the command, but list AL will
get you a list L in top to bottom format and a will get you
all the information about all the files within the directory
you're working in. Or you can specify the directory if you
wanted so I can do home and then mental forklift my home
username, but I'll just do the root directory for now.
And right off the bat, something you may see is.
A file that isn't listed in this up here. So when I ran list
before you could see I don't have this auto relabel file.
It's basically what those are. If you're more familiar with
Windows, those are hidden files. If you put a period in front of
a file name in Linux, almost all Linux distros. Again, this is
used throughout anything it's. If you put a period there, it's
gonna be hidden, which means it won't show up when you type a
normal list command. That's why you had to do that.
Hey, to get it to show up in my home folder I also have that and
another way a shortcut in Linux again to your home folder is
just the tilde which is that WAVY line above your tab button.
You have to hold shift to get it or else you're gonna get a a
hash mark or a tick mark.
And that lists my home. Now you can see in home directories
you're going to have a lot more hidden files.
And the reason for that is.
The all of the configurations some utilities require
configuration settings and each user is going to have different
configurations, so each user is going to get their own file. So
I have one for vim. If used WordPress scanner before. I've
used ZAP before which is OWASP. It's kind of like Burp suite but
an OWASP ZAP version. You zshell before these are all just
programs I've used before and so it created a configuration file
for me.
So I have one for Burp suite. I have a regular config file for
my user et cetera et cetera.
If you wanted to access any of these hidden files, you would
just do it normally, like you can list or you can change
directory into them, one that you will want to see a lot for
users is there SSH file because this usually contains SSH keys
and while you might not always have rights to it, there's
different ways you can sometimes get the key. So for my purposes
I can list.
The actual contents of that SSH file just by using the tilde to
specify Home directory forward slash as a separation, and then
I actually have to type the dot SSH.
In some.
Bash terminals cause there's zshell in some shells like bash
really into that shell you will have tab completion and another
ones you won't. What I mean by that is if I just type like dot
S and there is something in that folder with that name and then I
press the tab button, it'll auto fill it out for me. So it's just
tab autocompletion. Is what you're gonna hear that call
that's not available in all distros. It's not available in
all shells. The shell is the actual terminal you're using at
that time, so zshell bash.
Dash is the most popular one you'll hear people say. I want
to learn bash. It's pretty much the same commands those basic
commands lists change directory Print working directory. Who am
I? Those are usually always gonna work, so that's why those
are the most important ones. But for this case I can use tab
autocompletion. If I just type a period and try to do tab. If I
tap it twice, you could see it pops up with everything that
starts with a period within the directory in my Home directory.
So for now we'll just go with SSH.
And I can list the contents of that as I say file, especially
known hosts, I won't tap that file out for obvious reasons,
but I will just say that that's how you can look around with
list.
On that note is cat.
Which is concatenate. It just means print the contents of this
file.
The important thing to remember with that is it's not like Linux
where it's only going or I'm sorry. It's not like Windows
where it's only going to present a text file. It will print the
contents of the file whether or not that file is text readable.
And a good example of that. And actually I have a competition
folder here.
And if I happen to NCL, I bet I have some jpegs and stuff there.
Of course I do because it's NCL.
And so you see in this directory I have a couple of jpegs. These
are different challenges from the National Cyber League over
the years, but I just wanna prove the point that I can cat
in this case, let's do a text file. So there's a test hash in
here. So if I do cat test hash, that's a text file, I'll get the
hash. I'm guessing I was trying to crack a hash or trying to
pull something out of something. That's why I created that
because of the steganography count. But anyway, you'd see
it'll print the file if I try to do that with a JPEG or an image
file.
That won't work, right? What you're gonna get is a bunch of
gibberish like this, and that's because Kanye. Like I said, it
will print the human readable bytes of that file. If there are
no human readable bytes, you're going to get a lot of these
little question mark symbols. And this just means that cat
didn't know how to display this, so it won't pop up.
And then other ones, you'll get gibberish like special
characters. You'll get funny looking characters that look
like you're in a different language. That's just because
the byte has a human readable representation, but obviously
it's not what we were looking for.
I don't wanna jump around too much, but this would be a good
time to segue into what's called the Strings Command.
The Strings Command is similar to Cat, except it's going to
print out what it thinks are human readable strings of a
certain length. I think the default is 8 or a more. It's
going to just print those lines, and this is the good way if you
are working with a data file. Sometimes you can find
information about what kind of file that is or how to open it
or what kind of data is in there by just printing the human
readable characters and so that is going to be your strings
command. And if I do it on the same file which was the Steg
one.
Now you can see I'm getting its best estimation of what is the
human readable characters. Another thing you could do is
pipe.
Whenever you do the solid pipe symbol, that's why I'm that's
what the term pipe comes from. We call it. When you pipe a
command, you're basically taking the output of 1 command and
sending it to another command. So I'm going to put the pipe
that is above your enter key. It's the back slash button. You
just have to hold shift when you hit it. If you're using a
standard querty keyboard American Cordy, but that's up to
you, so you can always pipe commands and one when I have a
long file like this, I'd like to do less.
Because that's just gonna put it up in a window that I can scroll
through. And this is what I was talking about. When you want to
see the human readable characters, you can see that
near the top of this file because I believe it's a PNG as
JPEG near the top we have. It gives you some information and.
The first thing you're going to see since this is JPEG, you're
gonna see the magic bytes and those magic bytes have a court
corresponding characters. So JFIF. JFIF if you ever see that
you know you're looking at a JPEG file. There's also PNG
files ping files. If you open those you're gonna see PNG at
the top because that's human readable characters. It's the
magic bytes of the file itself that's comes into play. If
you're doing stuff like forensic analysis you're gonna wanna know
the magic bytes of a file.
So again, strings is a good command for that because you can
see the top bites I'll get in access D and stuff like that in
a minute. But you can also see that the access data of the
file, so if you've ever heard of except data metadata, you can
pull that from an image and this one just has that. This was an
Adobe, it was edited or created in Adobe Photoshop on a
Macintosh. The time and date it was created, things like that.
Different programs that were used to edit it.
This is similar to the.
The info would like the properties file on Windows, so
just to show you the example, this is what we're looking at
right now. This is step one. I'm just gonna open it up on windows
and it's this gentleman right here.
So you should know who that is.
But I'll leave that as an exercise to you guys, but
anyway, this was the steganography challenge for NCL.
I can kind of get into it now. I won't share the answers or
anything, but when you ever you view the properties of a file,
that's basically what you're looking at is that except data.
So here are the properties of this file. And if I go to
details, you can see that a lot of the same stuff is right here.
The program name used to create it, Adobe Photoshop CC.
Ohh the pixels this one didn't show up because it didn't count
it. It's human readable strings didn't, but you can get that
with other tools, but this is basically what's displayed in
the same spot. It's just this is the Windows version so you can
see active version is 0221 and 0221 XF.
It's the same thing, it's just displayed in different format.
This is where Windows gets it from when it looks at the file,
so that's just useful knowledge to have so you know how files
work on your computer, whether it's Windows or Linux or what
have you. They all work the same, it's just data stored in a
certain file type.
So getting into it further, we went over strings. One thing you
guys may have seen me do, I just wanna cover this cause I realize
any talk about it is the change directory to command. You
probably see me hopping around, it's just CD. If you want to CD
into a specific file you can start it and use that tab
completion to see what's in there. Or you can navigate 1
higher just by doing dot dot. That basically means go back. So
since I'm in competition and CCL, if I go back one I'll be in
competition so you can see that I hit that.
And now back in competition and I can list what's in here to
look around.
But I'll hop back in the NCL real quick.
The other one I wanted to cover.
Kind of goes along with strings.
As if you wanna view data of a file. If you want to view the
raw bytes you wanna use something called the excess D
command and it's just like a hexdump command. XXD will dump
the hex contents of a file, so if we use that Steg one again.
You can see I get a regular hex dump of that file.
This is a good way to and I've cause I've seen this challenge
before. This is a good way to export files. If you're stuck in
the terminal for some reason and let's say you can, I don't know
you wanna copy a file, but you can't get it out. Or you can
only copy and paste for whatever reason. It's come up before in
challenges where you had a terminal and you can only copy
and paste. This is a good command to do it in because if I
take this I can just take the contents of this file and run it
through XXD.
And you don't have to manually highlight it. I was just showing
you the example, but if you run that through XXD.
And I can actually pipe it or redirect it to another file and
that's what the greater than symbols for. You can redirect
it. So you're basically think of it like an arrow. You're
pointing it to another file and you can create like let's say
Steg one dot text.
And now I created that file.
And it's there in the directory we're in. But now if I cat that
file out.
It's gonna be the heck stop.
And the reason I said this is good for exfiltration. You're
gonna have to bear with me here. Pretend we copy and paste this
from somewhere. You can actually reverse the process and XXD to
get back to the original file. So you're just gonna use tact R
or app dash R?
Air Force used to use the word tact for that symbol for a dash
when they were talking commands that blame that on somebody
else. I used to work with in competitions, but got me saying
it too, so I say tack R if you hear me say tack. It just means
dash. You're just setting the argument. So ecstasy, TAC, R and
then the name of the text file where we save the hexdump for
two and what this will do is it will actually reconstitute it
into an actual file.
So we can now redirect this to let's say Steg one recombined
recom dot JPG cause it was a JPEG. We learned that from the
first few bytes.
And now you have the actual file back in there and I can show you
that here.
You see, I just reconnect, reconstituted the file. So you
basically recombining the hex dump back into an actual file.
Say there's the name right there that I just changed it.
The reason I'm going over these basic commands is you know you
guys are gonna be probably using these a lot.
They're useful for navigating around and checking files.
Another one you wanna know is what I was talking about before
the hash dumps of a file.
So you can actually generate sums with this as well, so you
can.
Excuse me.
Sorry about that. I had to take a quick drink.
Throats killing me tonight.
Yeah. So you can actually generate sums of file as well.
So one way we can do that is we can there's built-in commands,
and I believe this one is SHA 256.
Some and we can just do this that one file, let's say.
And this will give you the actual hash of that file.
So let's say we were going to compare it to what we were doing
before.
And I can bring that up real quick as well.
I wanted to circle back on this because I know I told you guys
about it.
When I was showing you before. But I'm gonna copy that cause
it's. This is my shared folder. The competition folder. I don't
have the other one in the shared folder, but I'm just copying
over the ISO file that I downloaded before so I could
show you guys that so you can see the ISO files should be in
here now. Yep, there it is right there and I can run that same
SHA 256 command on it.
I may get something different because Linux sometimes they
actual command itself. It may actually take the new line at
the end of the file if there is one. So you may get something
different just in case this doesn't work on me.
That way I'm not embarrassed. It's gonna take a while because
it's a huge file.
I probably shouldn't have used this as an example, but.
We'll let that run a little bit, see if it happens in a few
seconds.
If not.
There we go. So it happens. Just took a little bit.
And if we compare that.
You can see, let me bring it back up.
So this is what I was talking about before. If you're ever
uncertain on a file and you wanna check the hash of that
file before, you will either open it or install it on your
system, what have you after you download it? That's how you do
it. Sometimes some programs will have that some button or it'll
have a checksum button. You just click that and then you hash the
file itself and you can see these match. Quick way to do it
is just check the first couple and the last couple because for
most cases those are going to be different for different files.
And that's how you can check the hash of a file.
That's important if you're ever installing anything and you're
unsure of where it came from. It's important to do that to
make sure the files are safe, or that you're actually downloading
what it says you're downloading, etcetera.
Alright.
Next.
Daniel, before we go too much farther, can I ask a quick
Let me see.
Yeah.
question?
Sure.
So talking about hashes and things like that and trying to
Umm.
get a bit more involved in that you had made the JPEG and the
recombined JPEG what those have matching hashes as well or what
that change it.
Nope, should have mashing hatches and.
The year and after you piped it and it came back, it should
Yep, Yep.
still match. OK. I wonder if that might actually play into
100% so.
it. So I thought I'd ask.
Just for quickness I'm using MD5 here that is an unsecure hash
that shouldn't be used for security, but you will see it
used a lot in sometimes in just checking hashes like this
because it's the same process even though it's not secure. But
you can see here same exact hash even though they have different
file names because the file name isn't what counts, it's what's
in that file. The actual bytes of that file and we can actually
mess with that. We can go in here. I'm going to use vim.
But let's say I wanted to do that one I recombined, right?
Let's take one recom. We're gonna mess with me, aren't you?
Ohh.
And when you get a chance, I know you have four. Had another
Vim doesn't.
question as well. If he wants to still ask it.
Ohh yeah, go ahead.
No, no, no, Ashley. I clicked on it by accident, I guess.
No, no problem. So, yeah, I'm gonna hop back in here because I
wanted to. Vim wouldn't autocomplete this cause vim
doesn't like to open.
Non human readable files like Jpegs. There's meant basically
an image, but the reason I'm going to open this is I just
wanted to demonstrate real quick. I can hop down the end.
Vim is just a text editor. It's based off the original terminal
text editor vie. It's just via improved, hence vim. I
definitely recommend when you get into Linux and when I get
into the portion where I show you guys different programs you
can use to learn this stuff.
He he learn at least one text editor again, just like distros.
You're gonna have your, your diehards who are gonna say one
of the other is the best. I prefer vim. Other people for
Emacs, some people for nano. These are all just different
text editors. Sublime is a graphical one. If you want to do
it that way.
I'll argue that once you learn the basics of a modular text or
a modular text editor modal, I think it's called. Excuse me
like terminology, if I'm messing it up, but it's modal, I think
it is, and that basically means it operates on different modes,
so modal text editors like Vim or Emacs is another one. Nano is
a little more.
User based like cause it it has a whole menu of options, but vim
is definitely a mode of 1. So what I mean by that is right now
I'm in command mode and you can see my cursor just hopping
around at the end of these lines. So moving it around right
here in the middle on just above line 224.
But you see, when I move around.
I'm in command mode and the cursor is bouncing around. If I
try to type in something. So let's hop down to the end.
And if I try to type in.
Anything here?
Uh.
Like right now? See, I'm hitting D that deletes align. I'm
hitting F say and it's giving me all these errors cause make
command mode basically.
If I wanted to go into insert mode, I would just hit I you
don't necessarily need to remember this cause this is been
specific. If you guys end up wanting to work with them.
But again, that's up to you. I'm just gonna hit I here, and I'm
gonna change some bytes. I already deleted some lines and
there's this big joke running around that says you're not an
expert unless you know how to get out of him or exit vim. So
I'll make you all experts right now to enter command mode from.
Insert mode. You're gonna hit escape.
And then you're gonna hit the colon key, so shift and then
your semi colon key will bring up a colon you see down at the
bottom. I have this colon key and I'm back in command mode.
From here. You can either force quit queue for quit and then
explanation point for force. It means don't save your changes.
But if you wanted to save your changes and you had rights to
the file, you can do write, quit WQ and you can also force it
with exclamation point.
I'm just gonna do WQ which means I wrote those new images to the
recombination file.
And if I open it up, it looks no different. So I deleted a couple
lines, I edited it, but if I.
You can also do colon X.
Which will save and quit.
Ohh. Saving quit. Yeah. Yep. Yeah, you can do colon X saving
quit.
Again, all up to you. But the big point I was trying to get at
here is you can see now that the hash of that file changed
because I changed some bytes in it, even though I didn't change
enough to actually change the image itself. So the image is
still valid. You can still see it. It's the same exact image as
the other step one.
Even though I didn't change that.
Or changing enough to change the image, I at least change one
byte and so the hash is completely different now, so
that's kind of where the hashing gets into usefulness. I guess I
didn't mean to go over hashes here, but hey, that's helpful.
Alright, so let me see here.
Now, I guess we can get into a little bit of the different.
Utilities you can use to learn Linux. First and foremost, this
is a personal favorite of mine. We also have some tasks for it
if you want them. We can get them assigned, but it's over the
wire over the wire is a real popular CTF kind of a learning
CTF.
I don't know. I'm hesitant called CTF because there's no
real competition aspect to it. It's more like just gamified
learning. And you wanna start from very beginning. You start
from bandit and this actually is a like I said, it's a game that
will help you work through different Linux commands. You
start at level 0.
And I think it is the answer to these is the password to the
next level.
So this is gonna ask you to SSH into it.
SSH is just a secure shell and it's asking you to SSH into this
address and this port.
We cannot actually.
I guess we can demo, I'll just show you real quick.
Ohh the first option.
So if I go where to my. There we go. I'll just pull this up on
port two 2220. Username and password are bandit 0 again.
That gives it to you. But.
We can copy and paste. I don't know if I have.
Sometimes I disable that. Yep, cool. It worked sometimes on
your VM you might have to enable host to VM and vice versa. Copy
and pasting and drag and drop.
It's up to you if you wanna enable it or disable it if
whether you're in VirtualBox, you may have to get the
VirtualBox guest machine tools to program this installed on all
OS. You can install it or on VMware they have VMware guest
addition tools as well. It's just the file you need to put on
your VM so you can do stuff like that.
So this is going to be on port. What did it say?
220.
See. So it's gonna ask. I've never connected before, so I
wanna set. Do I wanna save this fingerprint or Are you sure you
want to connect? Continue connecting. It gives me the
shafic 256 fingerprint of the machine. I know this address.
It's one that's just the over the wire machine. So I know it's
OK. It's gonna ask for. Oops. Well, first of all, we already
did this. If I don't specify username you can see here SSH
try to specify my machine or my user account which is mental
forklift. That won't work.
Because it already told us that it was Bandit 0. So we're gonna
do Bandit 0 at.
The address which is bandit.labsthatoverthewire.org
and then your port number.
And now it's gonna ask for the password which is Bandit 0.
As you can see, most Linux machines, it won't print the
password as you type it, and apparently I typed that wrong.
That's the downside. If you mess it up, you won't know until you
hit enter.
And apparently I did something wrong.
And it am I reading that wrong you guys wanna?
Right.
Uh, it may be down at the moment, I don't know. Or no, it
can't be down because it's.
I've.
But it's telling me you got the wrong password.
I promise that's not a problem with me. That looks like it's
the machine itself and I'm just making sure I typed it right.
Alright anyway.
Sorry I didn't get demo that for you, but over the wire it does
work.
I'm not sure why it's not working on mine right now. I may
have something in my SSH settings they configured it.
But that's how you connect to it and you you get the password for
the next level. Once you finish that level, you're on. So as you
can see here, once you work your way through, you'll get the
password and it starts with the basic commands I was telling you
about, and you can work your way through.
Another one I like and I can't see the chat right now, so if
anybody's alright.
Talking or raising their hand?
Alright anyway.
Another one I like is.
This is terminus. If you've ever played old like Dungeon Crawler
games, this might be something you're into. Terminus is one of
those old. It looks like an old exploration game, but as you
work through it'll actually teach you the basic commands of
Linux and how to get around.
So this one like you can see already, it gives you the
description to look at your surroundings. You use lists. So
we were actually using LS to look at the files. This tells
you you can look at your surroundings. You can move to a
new location with change directory or CD.
Huh. You can interact with things in the world with less,
and then what you want to interact with. And if you forget
where you are, you can use that print working directory so you
can see how your print recommend directory says I'm home and even
has like little graphics.
It kind of looks like an old Tandy machine or a Commodore. If
you were into that.
So you can see I have different locations and just by playing
the game and navigating around you'll start to get all these
commands if that's something you're. If this is like
something you could be into or you find fun, it's a great way
to learn. So there's Terminus and I will put all these in the
chat for everyone so we don't miss out.
Well, not only will I put them in the chat, but they're in the
Cyber Wiki as well, so you guys can go there and get them as
well. There's also Linux survival, which is another
little like.
Gamified version of Linux commands.
So you Linux survival is just like a free tutorial that
teaches you all the commands as if you were playing a game.
So to try it out. So again the first command it's try, we gonna
teach you is list. So you can do LS and you can see the different
things that are in here.
And you find out what the list command actually does. You can
click the right arrow to go to the next page, so I can click
the next page I want to go back real quick because you can kind
of see it gave you an example of how a Linux file structure
works, and you can see we have animals and then when I hit list
I list all the different types of animals. So that's kind of a
graphical way to show you how the Linux files director works.
So that is the Linux survival tutorial. You can go to that one
as well. And then finally, if you want to learn Vim and I just
had it open, where did it go?
No, no.
Read my VIN machine.
Ohh there it is. OK vim adventures.
This has been adventurous, sorry. Off screen I have like 40
tabs open like usual as any good cybersecurity person should have
like 100 tabs and you gotta click through to find what you
were working on. Vim Adventures is a great way to learn vim,
another gamified way and again I love gamified learning so you
can press any key to start.
And I was disconnected, so I had it sitting open. But there you
go. This video is recorded, Benjamin. So it's it's recording
right now.
So Vim adventures is just teach you the basics. The actual
commands of them, and this is one of the reasons I liked these
modal editors like them is because it keeps your hands on
the keyboard. So a lot of studies have been doing with
coding and working on computers that the more you have to remove
your hands from the keyboard, the less work you actually get
done. Just from the time you actually move around a lot and
you're doing something else. So.
It's mainly a thing encoding. I've heard devs talk about it a
lot, but it's as long as you keep your hands on the keyboard,
you're always working and that's why it's great to learn a tool
like them because you can do absolutely everything from the
keyboard. You don't need to lift your hands off at all, and you
can see just like if you've ever gained a lot on a laptop or a
computer, WASD move you around while in vim, it's HTML for left
and right and up and down and disconnecting. Because I'm not
moving around. But you could see.
If I start hitting L&H, it'll move left and right
respectively for H&L and then J goes down and K goes up.
So with one hand one or just four fingers on one row of your
keyboard you can move all around a text file or you can use your
arrow keys in vim yourself, but you see it says Vim allows using
the cursor keys. The game doesn't want you to do it
though.
So Vindhya ventures, that's another good one. I will post
all these and just second, but we have more questions yavor.
Uh, yeah, real quick, just the two far question. I guess first
Yep.
one, if we were to be using the stuff like the adventure in the
Linux survival or can we?
Clark came for those.
Yeah, yeah. You're learning. You're doing stuff that's
furthering your internship.
And the second one is it.
I don't, I'm.
Are there any like labs or any kind of like games like this
that you know of? Or like any kind of IDs or IPS?
Not in a gamified version that I know of. Not not. At least this
gamified since he's the basics. They're easier to put into a
game, but there are try hack me roles for stuff like that.
And let me get out of him. Adventures cause it's playing a
lot of sound while I'm trying to type.
But there are try Hackney rooms that you can go to that I'll
have stuff also different hack the box rooms, but those are
more gonna be about evading IDs and IPS.
Got it. Cause yeah, the I did the the snort one and.
And try having but I couldn't find you one. That's why I was
asking.
So learning network security solutions, even sure you could
take would be good. Yeah, like set a lot of the snort ones.
There's introduction to looks like Zeek, which probably kind
of like Splunk. It looks like thread detection.
Uh, cyber evasion techniques to test and get around to IDs. So
there's a lot of different rooms you can go into.
So yeah, this is some of the short ones, but those are worth
doing if you wanna learn the basics of an IDs and IPS.
If you're looking to like how to set one up and configure it,
that's going to be a little different because it is going to
depend on which one you're using, so.
Got it.
So yeah, I've covered a bus few basic commands. I don't wanna
get too much further into it cause I will carry on for hours
and hours if I start getting into like specific topics. At
this point I can always set something else up to do that. If
you guys wanna get into a certain topic, my personal
favorites reverse engineering and I can certainly set
something up to go over the basics of how a program works.
Differences between Linux programs, executables and
Windows executables.
How to view them or view the metadata from them? How to
determine what kind of file it is? How to determine what it
does? Reverse engineer it? That would be a multicourse thing,
but I can go over the basics of it at some point, but that's
again, that would take a whole another hour up.
Aaron got a question.
Yeah, really quick and I had stepped away kind of at the
beginning to take care of some stuff really quick, but I didn't
No problem.
know if you went over to the Shrimad and read write
privileges and all that. If that was something that we could
Change mod.
cover really quick or if that's too in depth.
So yeah, I I didn't.
I didn't. No, it's not too in depth. So you guys probably saw
it when I was doing the full list command, you probably saw
this.
At the left side, these are the. This is what Aaron saw about
these are the permissions for every file and the first letter
here is gonna tell you what type of file it is. If it's just a
task mark or a dash, it's just a regular file. So picture file
and ISO file text file what have you.
And I have mine set-up just to change the color as well, but
that's something you configure to your preferences if it has
ad, it just means it's directory that just a folder in windows
when you use the term directory. Same thing. So that just means
it's a directory we can go into and then you'll see RWX RWX RX.
And these permissions are RWX, are just read, write and execute
respectfully and it's just what you can do.
To that file.
So I read, write and change, you may hear get thrown around
sometimes, but basically it's a read, write and execute.
And it goes by the group you're in. It goes by the user itself
and the user created it, so you're usually looking at the
end, and that's what you have access to these last three.
That's why you see it repeated three times RWX. There are also
different numbers to this setup, so when we're talking about the
change mod command, if you wanted to change the.
Uh, the rights of a file. You can use the change mod command,
which is just CHMOD.
And this is another one I wanted to get at. Actually, I'm glad we
did this because I wanna talk about how to get help if you
need it. Most commands you can see when I first type it and
didn't give any kind of arguments or switches. It told
them that it was missing an operand. So basically this
command requires arguments or else it won't work. So it told
me I can type tech help For more information.
And you can get that here. This is the basic help then how to
use the command. You can set your different switches. It'll
tell you what the different switches do and sometimes it
will give you an example of the command. So this one near the
top. Sometimes they'll be at the bottom, but if you want more in
depth information about a command and this is any command
on Linux, you're gonna wanna learn the man command which is
just manual and you can do man change mod and that will bring
up the entire manual on that command. You can navigate
through it.
Because, like you were reading a book, because most of these are
books, the good news is you don't have to use your arrow key
and scroll one letter at a time. You can use page up and page
down. So as you're reading through it. But the biggest
thing you're usually gonna learn on from a man page is just the
basic description of the command.
And then your options or your switches that you can run on
that command.
Excuse me and that exists for all. To my knowledge all Linux
commands the.
Main ones anyway. You won't find it for a lot of different
programs, but for the main ones it's all there. The LS command
list, cat everything and you can see down at the bottom is just
queue to quit or age for help.
One other one I wanted to get at is. You can find out where a
command is.
Located on a file system with a witch command. So WH ICH and
then the command and that'll actually tell you where that
command is located for that user. So in this case I'm in the
file user the binaries directory bin and then list.
You could also do app repos, which literal definition it
means which command is appropriate and so I can do list
or LS.
Ohh this is gonna have nothing appropriate because it's like
files, let's say file. You could just find the different what
commands are good for by typing a general description.
In there or general word.
And that'll give you the appropriate command basically.
So basically, if you know like keywords related to it, things
like that.
Or.
Ohh, I don't know. Let's say we wanted to.
OK, let's say we're trying to zip a file, right? So I wanted
to compress. I should.
Have.
Ohio zip. OK, for some reason, it's not giving me anything
appropriate.
But yeah, apropos will just give you the appropriate programs for
that.
For what you're trying to do, it's a good way to figure out if
you know what keyword of what you're trying to do.
I propose a good one to use, and that's especially if you're an
environment where it might have different binaries than what
you're used to, things like that.
Alright, Aaron, did you have something else or is your hand
Ohh no, I never raised down, I apologize.
up?
OK, you're good. You're you're good. You're good. Just make
sure.
I'll, but yeah, that's all I have for you guys. I know this
went by quick. I hope I was at least labeled to convey some of
the basics. I know this was a lot more informal than we
normally do, but I really didn't want to give you guys another
death by PowerPoint because I I don't know, at least to me, I I
feel like you won't get a lot out of that if you're just
sitting and watching a PowerPoint as opposed to getting
something you can follow along with and doing it hands on.
I'd say personally, it really helped me out. Being able to see
like you going through you and doing things like piping
commands and how you can extract in certain instances as well,
like a lot of us probably have had a Linux class at some point,
Sure.
but it's basically just this is the LS command. This is how you
Yep.
use it, like seeing it, how you actually use it in competition
than real world experience helped a million times and we
greatly appreciate it.
Sure. Yeah. No, no, I appreciate you guys being here.
Nick, what do you got?
Just wanna make comment one. One thing that really kind of.
Mess with me at one point. If for anybody who has not
installed, I don't, at least Cali, I haven't. I don't have a
parade on mine.
Depending on your antivirus system you use, if you install.
An actual VM for you. Download the files.
Make sure you whitelist your Cali file.
Ohh definitely yeah.
Because it will destroy. I mean I I, I.
Moved everything over to a new system after the first three NCL
and I kind of had my Cali built up like yours and it destroyed
it. So just into advice, make sure you whitelist it. It will
tear apart and you will have to completely reinstall. Most
antiviruses will do that, at least with Kali, just because
some of the tools and everything it will recognize as malicious.
Yeah, definitely. I I do run into that same problem and you
guys are bound to run into it, even going through try hack me.
So like Nick said, you wanna whitelist. I do it for this
competition folder that I have. I just tell my antivirus to
ignore it. Well, let me rephrase that. It doesn't ignore it. It
ignores the certain subdirectories where I install
stuff that might be read as malicious if anything tries to
move from that directory then it will Alert me to it. But yeah,
you definitely want to be careful because when you start
to download these to open them up in a sandbox.
Like VM, you're you're gonna run into the issue where we're
either windows or whatever antivirus you're using is gonna.
Kind of neglected. It's basically gonna erase it and
won't let you install it. Yeah. Great. Great device, nick.
Thanks.
Alright, one thing I wanna get into. It's kind of like the last
thing I'll leave you guys with. It's kind of like when I was
talking about vim, how it just it's a steep learning curve to
learn the shortcuts. Team Ox is another one of those. If you've
never used Team UX, it's a way to split up your terminal so you
can have multiple windows open at once. It takes a lot of
learning, but once you learn the shortcuts you can really.
Get pretty far with it, so you see I type in commands if I want
same way as in Vim, I can also split Windows. So if I wanted to
have two Windows split and if you turn on graphical mode or
mouse mode, you can actually use your mouse, but otherwise you
can just switch with. The default is control B put you in
command mode so you can keep splitting windows if you want.
Things like that. So it's like I said, by default it's control B
and so if I hit quote, it'll split it horizontally and then
if I hit percentage it'll split it vertically. The window you're
on is usually highlighted in a certain color and you can switch
windows with the control B and then arrow keys so you can see.
I'm hopping around here. You see where my cursor is like I'm
typing over here. I can hit left and type over here. I can go
down and kill that pain.
If I wanted the same thing control B go down control BX,
kill the pain, so again it's just learning the shortcuts and
when you're doing stuff like that, let me pull up. If you
just search for Tmux like CHEAT SHEET, let's say usually any
command you just search for that command sheet, you'll usually
find a lot available. So here's a quick one tells you how to
open a new session. You saw me do that when I started it.
Tells you how to list. You can list your sessions if you're
escaped from one at the current moment, like you can actually
close this one or keep it in the background so you can background
a session and go work in a normal terminal and you can come
back to that session later. It's this kind of stuff's really
useful when you're working and try Hackney or any environment
where you got to hack in the boxes because you're going to
want to jump around a lot.
You can also do new Windows, so if I hit control BC I'm gonna
open up a new window and you can see down here at the bottom. I
now have two bash window opens. You can rename those. You can do
all sorts of things basically with Team mocks, another ones a
more graphical one is called Terminator and it's just a
terminal program that allows you to do all this same functions,
but it's more graphical. You can actually have a menu bar up at
the top and switch around. You can right click and have a menu
bar that you can jump around with on.
It's all up to you. Again, that's gonna come down to
personal preference. I prefer Team Rocks, but you may like
something different.
It's all again up to you.
I think that should do it. Now I don't wanna. Again. I don't
wanna take up.
Too much extra time for you guys.
But yeah, we're pretty much done. Unless anybody has any
other questions or anything. Thank you for being here.
I appreciate it.
Hey, Dan. Hey. Hey, Daniel.
Yes.
Are you on LinkedIn?
I am. Yes, I I don't go on there too much anymore. I usually only
OK, what's your? What's your last name?
use it for job searching.
Fuel. It's it's listed on here, right? Is it on? Yeah. Just my
OK.
name on here. It it should pop up.
OK, sorry.
OK, great. So I just wanted you know.
Yeah, no problem, no problem.
Can I?
OK, cool. Thank excellent job.
Thank you.
Yeah, that's all I have for everyone. So thank you for being
here. I I like doing these informal ones cause I feel like
I do jump around a lot. It's just the way I am. I know if I'm
not teaching to like an actual PowerPoint, then I will jump
around, but I tend to stay on topic when questions are asked.
At least I hope I do so again. If you guys wanna get in any
other topics, there's plenty of experience in this program
between different people, not just myself. And we I know we'd
love to put something together for you.
Teach more if you're looking For more information.
Alright, everybody with that, I'm probably gonna get to bed
myself pretty soon because I'm not feeling too well. So thank
you for being here.
You all have a good night.
Have a good night, everybody. Thank you, Daniel. Beautiful
presentation.
No problem. Thank you.
Hi everybody.