-
So how do you install stuff on Linux?
-
Like if you want to install
-
software, programs, or packing tools, what
-
do you do?
-
If you're fairly new to Linux, you might
-
be a bit lost. Don't worry,
-
I got you. In this video, I'm going to
-
show you how to install pretty much
-
anything on Linux. Everything from common
-
tools that everyone uses to even some
-
custom hacking stuff that other hackers
-
create
-
you can download on GitHub. How do you do
-
all that? Let's get started.
-
[Music]
-
This is episode 5 of Linux for hackers
-
and everyone because
-
everyone needs to learn Linux. In this
-
episode, we're covering Linux package
-
management or basically how do you
-
manage all the software and the programs
-
on your Linux machine? And I'm going to
-
do my best to cover pretty much
-
everything, so if you're looking for any
-
particular way to install something,
-
check the timestamps, jump to it.
-
Also, I want you to do this with me. Every
-
command I type, everything I
-
install, do it with me. The best way to
-
learn anything is hands-on,
-
especially Linux, and you can do that for
-
free
-
right now thanks to our sponsor Hack The
-
Box Academy. Get signed up for free at
-
the link in the description, and you'll
-
get access to a
-
pwn box which is as cool as it sounds.
-
It's basically a Linux computer that you
-
can use
-
right here in your browser, it's amazing.
-
And it's free, like
-
yeah, just do it, just do it. Also what the
-
junk is Hack The Box Academy.
-
Well, I like to think of them as
-
Hogwarts for hackers. You're a wizard
-
Harry.
-
They teach you how to become a hacker
-
from zero to whatever you need to be.
-
It's awesome. They also recently came out
-
with a student subscription so if you
-
are a student, you get a discounted rate.
-
And you get CPE credits for completing
-
tier 1 modules and above,
-
it's awesome. Check it out, link below. So
-
get your pwn box ready,
-
grab your cup of coffee, what are you
-
drinking? I'm drinking
-
networkchuck.coffee, check it out. Let's get
-
started. Oh, and by the way,
-
have you hacked the YouTube algorithm
-
today? Let's make sure you do. Like this
-
video, comment, subscribe, notification
-
bell.
-
Let's hack YouTube today ethically, of
-
course. [Sips Coffee]
-
Oh, let's get started. Okay, as always, get
-
logged in to Hack The Box Academy and
-
launch the
-
Linux fundamentals module right here. And
-
today we're going to be focusing on
-
package management which is right around
-
here. So go ahead and click on that. Now
-
again, freaking fantastic stuff right
-
here, but the stuff you want to look at
-
right now with me as you follow along
-
this video
-
is right around here. Scroll down, click
-
on start instance to start your killer
-
awesome pwn box.
-
And while that's brewing, perfect time
-
for a coffee break. [Sips Coffee]
-
And mine is ready. I want to jump in
-
there and get this party started. So in
-
Linux, the stuff we want to install,
-
our apps, our programs, like you know,
-
Discord or Firefox or
-
Minecraft. Anything that we want to install, it's
-
contained in something called
-
packages. We install packages. Packages
-
are the thing. Packages, packages, packages.
-
Sorry, I've already had too much coffee
-
today. [Laughs]
-
No such thing as too much. How do we
-
install these packages?
-
Well, as you may have guessed from the
-
intro, it's something called a package
-
manager. Now there isn't just one package
-
manager. Of course, there's not just one.
-
It wouldn't be that
-
simple, right? It's not. There are two main
-
ones we see all the time though. One is
-
called dpkg
-
or d package, that's the way I like to
-
say it. The other you'll see all the time
-
is apt,
-
apt. Now, I'll go ahead and get this out
-
of the way. Apt is awesome,
-
it's super easy to do. You can install
-
things in a flash, no worries. But I'm not
-
going to show you that one just yet. You
-
got to earn that, you got to pay your
-
dues. I'm going to show you the harder
-
way first so you can appreciate
-
what this is and what it does for us.
-
Don't you want to do that? Yes. I'm
-
answering for you. So first, I want to
-
show you
-
d package or dpkg, I said it right that
-
time. Now, I say hard, it's not too crazy,
-
but it does look stupid compared to apt.
-
It's referred to as a
-
low-level package manager because it's
-
kind of and this is my opinion,
-
kind of dumb. I mean, sure, it'll do the
-
job. It'll install your software. It'll
-
install your packages.
-
It'll uninstall or remove them, but it
-
has two major,
-
huge flaws that I hate. So let's go ahead
-
and launch our terminal, our shell,
-
the green or yellow thing up here, and
-
we're gonna install our first
-
application,
-
Discord. And it's gonna be hard, it's
-
gonna be difficult because we're using
-
the more difficult way of doing this.
-
And already, we've hit our first flaw
-
because to install Discord, we have to
-
go
-
find it and download the package. So
-
let's go ahead and launch our web
-
browser. We'll go to discord.com.
-
Click on the little side panel over here,
-
and click on
-
download. We'll scroll down and right
-
here we have download for
-
Linux. Click on that. That's going to say
-
deb, who's deb?
-
I'll explain here in a minute. Click on
-
deb. Now, instead of open with, I want you
-
to do save
-
file, just work with me here. Click on
-
that, save file, and then click ok. And it
-
should go pretty stinking quick. So now
-
we can close Firefox
-
and get back to where we love being, our
-
terminal, our bash shell,
-
yes. First thing we want to do is get to
-
our downloads folder. If we type in ls to
-
list our contents of our stuff here, we
-
have a downloads folder, let's cd to that.
-
So cd
-
downloads. Type in ls to see what's
-
inside. And there's our Discord right
-
there.
-
Our Discord Debby. When you see .deb, that's
-
the file extension for
-
packages in Linux, specifically Debian
-
based,
-
which is what we're on right now. We're
-
using Parrot OS which is a Debian-based
-
system.
-
It's sort of like .exe you see on
-
Windows and
-
.dmg you see with Mac. Now, if you do
-
happen to be on another Linux system
-
that's maybe not debian-based,
-
maybe it's CentOS, maybe it's openSUSE,
-
Red Hat, instead of .deb, you'll see .rpm, but
-
we're not going to cover that today.
-
We're going to cover
-
debian-based systems. So how do we
-
install deb here,
-
our Discord server or not server, our
-
Discord application. It's pretty
-
straightforward actually. We'll type in
-
dee pay,
-
dee pay, I'll never get this right. Dpkg
-
for d package. We'll do a dash 'i' for
-
install, and then we'll specify our
-
package. There it is, that simple. But no
-
it's not, though.
-
No, you can do this, but it's going to
-
fail. Let's do it anyway. This is going to
-
reveal the second major flaw with d
-
package. Oh wait, that wasn't it. We do
-
need sudo
-
privileges. If you don't know what sudo
-
means, go watch episode four. So sudo
-
d package, let's do that now. Flaw coming.
-
So far so good. Looking good, right?
-
Whoa, whoa, whoa, whoa, whoa, error. I hate seeing
-
errors.
-
Problems, more specifically, dependency
-
problems. And that's
-
the second major flaw with d package. You
-
see, most packages in Linux, they depend
-
on
-
other packages to work. For example,
-
Discord here, if I scroll up a bit, Discord
-
depends on the
-
libappindicator1, which is not
-
installed, and the
-
libc++1, and it's not
-
installed. Those are two packages that
-
have to be installed for Discord to work.
-
So d package, the dummy is like
-
hey, yeah sure, I'll install Discord for
-
you, but it needs two other things, and
-
it's just not gonna work, sorry. You
-
need to go get those two other things
-
yourself. Okay, lazy. So yeah, sure, we could
-
go out and find these and
-
install it using d package, but that's
-
stupid. And this is where apt
-
shines, it's better. Let's talk about apt.
-
Apt is beautiful, and if you've ever
-
installed anything on Linux, any kind of
-
debian-based system, you've probably used
-
apt
-
before. It stands for advanced package
-
tool, and when comparing that to d
-
package, duh, it's advanced. D package is
-
stupid.
-
Anyways, it has its place. Sometimes you
-
may have to install something manually
-
with a
-
.deb file, whatever, we'll get to that, why
-
that is in a second.
-
Coffee break for a second, real quick. [Sips Coffee]
-
So let's install something with apt. Now,
-
first thing we're going to do real quick,
-
new command time. We'll do sudo apt
-
and we'll do the command update. I'll
-
explain that here in a moment, just go
-
ahead and do it. Let it do its thing.
-
Now time to install something, so do sudo
-
apt.
-
This time, instead of update, we'll do
-
install, and then we'll just
-
name the program or package we want to
-
install. I'm going to install an old
-
favorite,
-
pidgin. Remember pidgin? The open
-
source instant messaging app. [Laughs]
-
So instead of having to specify the .deb
-
file, instead of talking to deb, all we
-
have to do is reference the package name
-
which is pidgin and that's it. Now, it's
-
not going to work.
-
And it's not his fault. It's actually d
-
package's fault, I'll show you. Apt was
-
smart. It went out and found everything,
-
but then it's like whoa, whoa,
-
hold on, Discord, we noticed that it's
-
kind of broken, we don't have the
-
dependencies
-
of the lib indicator and the c++.
-
You might want to fix that. Dumb old d
-
package, but it even gives us a way to
-
fix it. Apt
-
fix broken install. It'll fix Discord
-
for us, so let's do that real quick. I'm
-
just going to copy that command.
-
Apt fix broken install. Let's paste
-
that in there. I'll do a control 'a' to get
-
to the front of my command and type in
-
sudo right before it.
-
And let's fix some Discord. It's
-
going to install those two packages.
-
Hit enter. Thank you, apt. So it fixed that.
-
I'm going to clear my screen, and let's
-
try to install Pidgin once more.
-
Up arrow twice or three times, four times.
-
There we go. And let's hit enter on
-
Pidgin right now. Now, real quick before I
-
hit enter to say yeah, let's continue
-
this, let's scroll just a little bit here.
-
Notice it's not only installing Pidgin,
-
super smart, amazing apt goes oh,
-
hey, we have some dependencies. The
-
following new packages will also be
-
installed as well.
-
And it's kind of a lot right, but it's
-
going to do it for us, which is what you
-
expect. That's like- you
-
want that to happen. So let's
-
go ahead and do that, hit enter. Coffee
-
break.
-
Very short, I love this. Actually long
-
coffee break, it's kind of long, isn't it?
-
And that was it. I want to try launching
-
Pidgin just by typing in Pidgin. [Laughs]
-
Look at that. I'm not going to use it, but
-
that was pretty cool, right? Way easier
-
than d-package. Now, I'm not sure if I
-
mentioned this before, but apt is a
-
high-level
-
package manager, which basically means
-
it's easier for us to use. Now, one of the
-
main differences between itself
-
and d-package is that d-package required
-
us to download the
-
.deb file, the actual package file. Apt
-
doesn't
-
need that or use that. As you saw in our
-
example, apt just needed the
-
package name, but how does that work? Apt
-
will rely on a thing called a repository.
-
A repository is basically a storage
-
location or essentially just someone's
-
server
-
that has a collection of all the
-
software that we might want to use. The
-
most common stuff anyway. So when we
-
typed in apt
-
install pidgin, apt went out to his
-
repository and goes hey, where's this
-
pidgin thing at? You got it? And the
-
repository said yep,
-
here it is, go ahead and download it, it's
-
good. And going back to that first
-
command we entered, what was it? Do you
-
know what it was?
-
The first command was apt update, and
-
what that did is apt
-
went out to the repository and said hey,
-
give me all those packages, what you got
-
there? I want a list of everything you
-
have.
-
And the repository replies with a list of
-
everything he has. And by the way, this is
-
something you want to do
-
every time you install something. Before
-
you say apt install whatever tool you
-
want to install,
-
do apt update to update your list of
-
stuff
-
because these repositories are owned by
-
someone else and they're regularly
-
updated. There are a lot of repositories
-
out there, which
-
ones are we using? Well, let me show you.
-
There's an easy way to do this, and we'll
-
use the apt command here as well.
-
New command time. The command will be- and
-
we're going to always start with sudo,
-
apt space edit dash sources,
-
and hit enter. And it's so nice, it asks
-
us what text editor we want to use.
-
Nano, my favorite one, I don't care. Now,
-
Parrot pulls like a bait and switch.
-
Normally you'll have your list of
-
repositories in this file. Parrot's like
-
nah,
-
nah, nah, we put our stuff somewhere else.
-
It tells us the parrot repo is located
-
at this location right here, so I want to
-
do right now is just
-
highlight that, copy it, go ahead and do
-
that with me.
-
Let's control x to get out of this file,
-
and we're going to
-
cat that file. So I'll type in cat. Paste
-
that file there, and hit enter.
-
I must have not highlighted the entire
-
thing, yeah, it's parrot dot list. Oh yeah,
-
I've forgot the list, dot list.
-
Dot list, there we go. And actually
-
instead of cat, let's go ahead and just
-
nano that. So I'll do sudo nano just so
-
we can see it a bit cleaner I think.
-
Dot list, yeah, that's better. So right
-
here we have a list of servers or
-
repositories
-
that apt will look to to pull packages
-
from.
-
Notice it does have the deb preface
-
before it, and what do you say we go
-
check it out real quick? We can actually
-
just click on that link here,
-
control click. Yeah that's what it was, control
-
and click. We're browsing the repository.
-
So if I jump into the pool directory
-
right here, go to let's say the main
-
directory. We got a bunch of stuff in
-
here.
-
Let's go to the n's, let's go to
-
n. And look,
-
there's nmap right there in the
-
repository. So when you do sudo apt
-
install
-
nmap, it looks at that repository and
-
goes oh, there it is,
-
let's pull that down. Now, sometimes the
-
tool you want to install is not in these
-
repositories. Like for example, this is
-
the one that's provided by Parrot OS.
-
What do you do then? Well most of the
-
time, these tools will have an
-
alternative way to install it. We'll
-
cover that here in a moment.
-
Or they'll have their own repositories
-
that you can add to the sources list.
-
They'll document it for you. They'll say hey,
-
here's our source. Add that to your
-
sources list, do a sudo apt
-
update, sudo apt install, you're solid.
-
Now, you're ready?
-
New commands with an 's' time. Apt has some
-
cool stuff we can do with it.
-
Now, first always you can do sudo apt dash h-
-
what the heck am I doing here?
-
It'll tell you some stuff you can play
-
with, some of those switches you can use.
-
Let's walk through a few real quick.
-
Sudo apt list will list all the
-
available packages in your-
-
I can't talk, repositories. You can
-
also do apt
-
list dash dash installed to see what
-
your system is installed with, very handy.
-
If you want to search through that list,
-
just do a pipe at the end of that.
-
Pipe, type in grep, we'll explain that
-
sometime in another episode, and then
-
just
-
search for something, like let's search
-
for, let's say, anything that begins with
-
nmap. And there it is. Nmap is installed
-
right there. Let's say you want to learn
-
more about what tools you have installed,
-
like what the junk
-
is that, what does it do? You can do
-
sudo apt
-
show or show me what it is, let's just
-
say nmap.
-
Show nmap, and it'll dang tell you. The
-
network mapper, and it tells you all
-
about it. You can also do
-
apt search, and let's just say again, nmap.
-
And it's going to search through the
-
description of a lot of stuff
-
and show you all the stuff, and that's an
-
easy way to search through a bunch of
-
packages. Now, we covered how to install
-
packages, but how do we remove stuff, how
-
do we uninstall something?
-
Two ways. Apt is still the guy for this.
-
So sudo apt,
-
new command time, remove. Pretty
-
self-explanatory. So if you wanted to
-
remove
-
Pidgin, just type that in, hit enter, and
-
it's going to say whoa, whoa, whoa,
-
are you sure? And I'm going to say no, not
-
right now because I got more to tell you.
-
Remove is kind of a safe command because
-
it will remove the application, but not
-
your user data. Basically the config you
-
might have put into the application. So
-
if you removed it accidentally or you
-
want to reinstall it, all that stuff will
-
still be there. Now, if you're confident
-
you don't want this dumb app anymore, you
-
want it gone, you can use a different
-
command, the purge.
-
So we'll swap out remove for purge. This
-
sounds so intense. We're gonna purge
-
Pidgin. This will remove
-
everything. And let's go ahead and do
-
that. So if we do our command that we
-
learned earlier,
-
sudo apt list dash dash
-
installed, we'll grep for anything that
-
begins with
-
Pidgin. So it did remove the main package,
-
but not this secondary one, the Pidgin
-
data. So I want to remove that real quick.
-
Let's purge Pidgin data. Let's see if
-
Pidgin is here now.
-
No Pidgin here. All right, two more useful
-
commands with apt.
-
First sudo apt upgrade. As you might
-
imagine, sometimes your applications, your
-
packages
-
get updates. You would hope they get
-
updates, and this is the way to update
-
those packages. Now, normally you'll see
-
this
-
command combined with the update command.
-
So you might see it like this: sudo apt
-
update to go to the repository and say
-
repository,
-
can you tell me if the packages have
-
been updated, otherwise you wouldn't know
-
about it, right? So update that and then you'll
-
see an '&&',
-
which allows us to do two commands in
-
one line which is awesome. Sudo apt
-
upgrade. So check the repository and then
-
update everything. Now, there is another
-
version of this. Now, upgrade will just
-
upgrade your applications if they need
-
upgrading. Another one is full dash
-
upgrade.
-
Full upgrade will actually remove
-
previously installed applications
-
or packages that aren't required for the
-
upgrade, so maybe old versions of things.
-
Now, I do want to jump back to our old
-
guy d package real quick.
-
He does a lot of the stuff too. I'm not
-
going to go over everything, but just
-
giving an example.
-
Dpkg, if I do a dash 'l',
-
he'll also list all the install packages
-
on your system. I can do the same thing
-
as I did before with
-
mr apt by grepping his stuff and looking
-
for
-
anything that starts with nmap. That
-
didn't work, let's just try nmap.
-
There we go, and again, it has a lot of
-
the same switches and features. I'm not
-
going to do that again. So d package,
-
low-level, stupid. Apt, high-level, awesome.
-
But there's also one other thing worth
-
mentioning.
-
It's something called aptitude, which
-
starts with apt,
-
but just has a full word to it. This also
-
is high-level,
-
but it's sort of like apt on steroids a
-
bit, it does more. Now, I'm not going to go
-
too deep into it, but just give you an
-
example of what it might do, let's just
-
type in
-
aptitude- actually, I'll do sudo aptitude.
-
Just type that in just like that and hit enter.
-
Oh, fancy.
-
You kind of get a nice little
-
interactive GUI thing in your command
-
line. So that's fun. Anyways, I'm going to
-
quit, but that's also a package manager
-
that's high-level
-
that will get the job done for you. Now, I
-
told you, installing stuff in Linux
-
can be very easy, but there's a lot of
-
ways to do it. One very popular way that
-
I personally think is amazing
-
is called snap. Now, not like the previous
-
episode where Thanos
-
destroys users and stuff. No, no. This
-
thing called snap is also kind of a
-
package manager. When you install it if
-
you don't already have it installed, it's
-
actually called snapd.
-
But snap isn't really a
-
repository, it's more of like a store,
-
a snap store. And it works very similarly
-
to apt as far as actually using the
-
command line.
-
But the main difference here is that
-
when let's say you're a developer and
-
you make your app,
-
and you want people to be able to
-
install it easily right now on any Linux
-
system. It might take some time to get
-
your
-
app on a repository, especially one
-
that's already existing on the system
-
like Ubuntu's, ParrotOS's, Kali's, whatever.
-
A better way is to be able to add your
-
app to a store,
-
and then it becomes immediately
-
available just like in a snap, right? Is
-
that why it's called that? I don't know.
-
So that's what snap is for. They can add
-
their app to the snap store,
-
and it's available in a snap, right? [Laughs]
-
I don't know, so it's pretty easy, check
-
it out. So if you don't- again, if you
-
don't already have snap installed,
-
we do on the system, but you'd just do apt
-
install snapd.
-
You would- [Laughs] You would use apt to install
-
another package manager.
-
But anyways, a lot of the modern apps do
-
this. So let's install something like
-
I don't know, VS Code. I love VS Code.
-
It's my favorite IDE, code editor, whatever it
-
is,
-
whatever you want to call it. So let's
-
try sudo snap. This is all it is. It's
-
just like apt. Install and then your app.
-
Now, for VS Code, they do require the dash
-
dash classic
-
switch, but then we just put in the
-
package name, which in this case will be
-
code for VS Code, and that's it, just
-
press enter.
-
And it's going to start doing it. Snapd
-
going at it. Coffee break. [Sips Coffee]
-
Oh coffee's cold, I've been doing this
-
too long. And bam, it's installed. If i
-
just type in
-
code, I think, it should launch, I think.
-
Yeah, there it is.
-
Okay. So snap is pretty cool. I can see
-
this being one of the main ways we get
-
our apps now.
-
No, we're not quite done yet. There's more
-
ways to get
-
apps in Linux. Now, we've covered the main
-
ways, but the next few ways are
-
interesting because they're based on
-
Python and Ruby and more like
-
specific to a programming language. What
-
do I mean? Well, for example, when you run
-
a Python script,
-
there may be some specific dependencies
-
it needs, certain libraries, certain just
-
things that help it to work
-
or, you know, packages. Python has its own
-
package manager called
-
pip. We absolutely will be using this in
-
a moment when we
-
talk about Git so bu-
-
I almost said button your seat belts.
-
Buckle your seat belts unless your seat
-
belts have buttons, I don't know, that's
-
weird. Another one
-
would be Ruby. Ruby's a programming
-
language that's very popular.
-
And that will use a package manager
-
called RubyGems.
-
And the command you actually use is
-
called gems. You'll use gem
-
install, so similar syntax as every other
-
package manager we've seen,
-
but it's specific to Ruby. So you might
-
install rails. Never heard of Ruby on
-
Rails?
-
Well, you would actually do gem install
-
rails to, you know, mess with the rails.
-
But now, let's get to Git. Get to Git, okay.
-
Let's get it. I use
-
GitHub all the time to install hacking
-
scripts,
-
scripts that other hackers might create.
-
And they're amazing, they help you do all
-
kinds of amazing things. In fact, I've
-
done a number of tutorials that involve
-
using Git to go off to GitHub and grab
-
the information so you can use it on
-
your system.
-
But how do you do that? Now, first, a
-
requirement is that you would need to
-
have a Git
-
installed. So use your favorite package
-
manager, we've already learned about this.
-
Sudo apt install git. Now, thankfully we
-
already have Git installed on our system.
-
How do you-
-
yeah, quiz. How do you see that?
-
Comment below. What's the command? So here
-
we go a scenario. Let's say you find this
-
amazing hacking tool.
-
There's one I actually found, it's pretty
-
neat. Let's go look at it right now. It's
-
called
-
turbolist3r, and what it will do is look
-
at a website and list all the sub
-
domains of that website. It'll go and
-
do it in kind of a passive way, very cool.
-
But here I am on GitHub, and I want to
-
use this tool, but
-
what do I do? Let's do it. So the first
-
thing you'll do is kind of just
-
get the URL at the top here. So it's
-
github.com/fleetcaptain/turbolist3r,
-
I'll put a link in the description. I'm
-
just gonna grab that link,
-
and that's the repository link. So copy
-
that, I'll go over here and the command
-
will be
-
get clone, we're gonna clone that
-
repository. We're basically taking their
-
code
-
and copying it to our Linux machine here
-
which is super cool.
-
So I'm going to paste that URL right
-
after clone.
-
And that's it. It's going to do something
-
really cool, you ready? And also, it's
-
going to clone it to whatever
-
directory I'm in, the working directory.
-
So right now you can see I'm in
-
downloads. So I'm going to hit enter,
-
and it did it. That's so cool. So if I do
-
ls to list the contents of my current
-
directory,
-
there she is, turbolist3r ready to go.
-
So I'm gonna cd into turbolist3r, the
-
directory there.
-
Type in ls to see what's inside there,
-
and I've got a few things going on. Now,
-
specifically to this project, it's a
-
Python project,
-
and to use this tool, I would use this
-
Python script right here, turbolist3r.py.
-
But there's one big thing. Before we
-
can do that,
-
just like every other application we
-
install on our system, just like any
-
script you might use in Python,
-
there are some requirements that we have
-
to meet. We have to make sure we have the
-
Python libraries and packages installed
-
to make this thing work.
-
Now,, if only there were a tool that could
-
help us do that. What do you think it is?
-
It's pip. So right here while we're in
-
this directory, we can actually just
-
very quickly install all the
-
requirements. Let me show you the command.
-
The command will be
-
pip3. Now, I'm saying pip3 because
-
we're actually using Python three
-
versus python two, which would use just
-
the command pip. So Python three,
-
pip3. Pip3 install
-
dash 'r', and then we'll put in
-
requirements.txt.
-
So with this command, pip3 is going to go
-
huh, let's look inside
-
the requirements.txt file, which is right
-
here, and see what dependencies this
-
script needs. It'll go through it,
-
install them, and then we're ready to go.
-
So let's try it. I'm going to go ahead
-
and hit enter on this.
-
And fingers crossed, coffee break, oh that
-
was quick man, and let me tell you
-
something.
-
That was pretty much it. Like as far as
-
downloading a script or
-
an application or a hacking tool from
-
GitHub, you download the repository,
-
you install the requirements, then you
-
run the thing. You run the script.
-
Let's just do it real quick. So the
-
command will be for this
-
python3, and then the script name which
-
was turbolist3r, yeah there it was. Now, like
-
most things, if you don't know what to do,
-
just type in dash
-
'h', and it will give you some help. But I
-
know what I want to do real quick.
-
I'm going to do dash 'd' for domain. And let's take
-
a look at Hack The Box's subdomains,
-
hackthebox.eu and hit enter.
-
Now, one thing I love about all these
-
scripting tools is that they have, you
-
know, some really cool ASCII script up
-
here, making it look really neat. But
-
anyways, it's going to go through all
-
these things and try to find the
-
subdomains of hackthebox.eu, which by the
-
way, is what we're using right now.
-
So it's kind of fun, inception. We're
-
attacking from the inside.
-
We're not attacking. It's just
-
passive reconnaissance. And
-
bam, there it is. Look at that. All these
-
sub domains have hackthebox. That's
-
kind of cool, right?
-
They have a lot. Goodness gracious. Now,
-
that was
-
a lot. We covered how to install stuff
-
in Linux and also remove it and all
-
kinds of stuff.
-
So real quick, quick review. 1000 foot
-
look at this.
-
The two main ways we install stuff on
-
Linux is with our package managers
-
d package or apt. D-package being the
-
low-level, dumb version, and apt being
-
high-level
-
and it's awesome, whereas d-package
-
requires you to download the dot
-
deb file, deb, hi deb. And then it also doesn't
-
install dependencies for you, what at
-
loser.
-
But apt, it just looks at a repository
-
when you reference a package, like hey,
-
install docker for me please, and it goes
-
out and gets it for us.
-
And it also installs all dependencies it
-
might need because packages need
-
packages on packages on packages.
-
There's a fancier version called
-
aptitude, which looks really cool.
-
I've never played with it, but it looks
-
fun. And then there's snap, which I think
-
is the best out of all of them because
-
the developers can just upload their new
-
applications they code
-
straight to a store, and you can just get
-
it in a snap
-
with the snap install command. And it
-
does work in a similar way to apt
-
except it's not looking at a repository
-
to pull information, it's looking at a
-
store. And then we had our programming
-
language-specific package managers. Now,
-
this is not exhaustive, but the main
-
ones we see right now are Python with
-
this pip or pip3 for Python 3.
-
Ruby has gem or that's the tool, it's
-
actually called RubyGems, and again, these
-
are both handy for installing
-
programming language-specific packages
-
to help you run your scripts and
-
apps. And then last but certainly not
-
least, we have Git.
-
It's a command line tool we can install
-
with another package manager like apt,
-
apt install git. And what Git allows us
-
to do is pull down stuff from places
-
like GitHub, which also is itself a
-
repository.
-
Don't get confused. So we demonstrated
-
how you might find an amazing hacking
-
tool that a hacker
-
another hacker developed, and you would
-
use Git to go get
-
that tool, download it to your Linux
-
machine, and in this case, we were using
-
a Python script, so we used pip3 to
-
install the requirements for that
-
because it did have some requirements.
-
And then we used that amazing turbo
-
list3r tool to
-
list sub-domains, super fun. So yeah, that
-
was a lot.
-
Let me know what you think of this video.
-
If you have any questions or comments or
-
anything, just comment below. I'll take a
-
look.
-
And also let's see how you did, like as
-
you went through this and you learned,
-
you took notes and practiced, you got
-
hands-on,
-
let's test your skills. I've got a quiz
-
in the link below. I also have a
-
walkthrough lab you can go through as
-
well to kind of reinforce these things.
-
Check it out, free sign up, no big deal.
-
And of course, sign up for Hack The Box
-
Academy dude. What we're doing here is
-
completely free,
-
and if you want to go down further and
-
become an even better hacker and
-
learn other stuff,
-
like hacking WordPress and all kinds of
-
weird things, you can subscribe as a
-
regular person or as a student,
-
and just do it. And yeah, that's
-
about it. This was episode 5
-
of Linux for hackers and everyone
-
because dude, everyone's got to learn
-
Linux.
-
And also, if you like this shirt, which is
-
a raspberry pi blueprint
-
or this mug, go check out my store
-
networkchuck.coffee. You can get all this
-
merch as well as
-
coffee of course, and yeah, seriously,
-
that's all I have today.
-
Thanks guys for watching this.
-
Continue the next episode if it's
-
already out, which it should be
-
hopefully. If not, well subscribe and hit
-
that notification bell because it'll
-
come out any day now, you never know.
-
Yeah, I'll catch you guys next time
-
[Music]