WEBVTT

00:00:00.000 --> 00:00:03.346 align:middle line:90%


00:00:03.346 --> 00:00:06.692 align:middle line:90%
[MUSIC PLAYING]

00:00:06.692 --> 00:00:10.050 align:middle line:90%


00:00:10.050 --> 00:00:13.890 align:middle line:84%
Searching for exploits
with SearchSploit.

00:00:13.890 --> 00:00:17.970 align:middle line:84%
In certain cases, you may not
have access to online exploits

00:00:17.970 --> 00:00:22.410 align:middle line:84%
or online exploit resources
like ExploitDB or Rapid7.

00:00:22.410 --> 00:00:25.020 align:middle line:84%
And as a result, you
must be able to utilize

00:00:25.020 --> 00:00:29.310 align:middle line:84%
the exploit sources or resources
available locally or offline.

00:00:29.310 --> 00:00:31.150 align:middle line:84%
Now, you might be
asking yourself, well,

00:00:31.150 --> 00:00:33.630 align:middle line:84%
how can we actually
have exploits offline

00:00:33.630 --> 00:00:35.490 align:middle line:90%
on our Kali Linux system?

00:00:35.490 --> 00:00:38.190 align:middle line:90%
Well, here's the great thing.

00:00:38.190 --> 00:00:41.160 align:middle line:84%
The entire ExploitDB
database of exploits

00:00:41.160 --> 00:00:43.440 align:middle line:84%
comes pre-packaged
with Kali Linux,

00:00:43.440 --> 00:00:46.410 align:middle line:84%
consequently providing
you with all the exploits

00:00:46.410 --> 00:00:48.750 align:middle line:90%
available on ExploitDB locally.

00:00:48.750 --> 00:00:51.270 align:middle line:84%
So whenever you
set up Kali Linux

00:00:51.270 --> 00:00:53.850 align:middle line:84%
or you install the default
version of Kali Linux,

00:00:53.850 --> 00:00:57.810 align:middle line:84%
that version comes pre-packaged
with the entire database,

00:00:57.810 --> 00:01:01.350 align:middle line:84%
or rather the entire ExploitDB
database of exploits.

00:01:01.350 --> 00:01:04.860 align:middle line:84%
So all of those exploits
that we are searching

00:01:04.860 --> 00:01:07.980 align:middle line:84%
for in the previous video
are available offline

00:01:07.980 --> 00:01:09.400 align:middle line:90%
on your Kali Linux system.

00:01:09.400 --> 00:01:11.970 align:middle line:84%
So as I said, in
certain scenarios

00:01:11.970 --> 00:01:15.120 align:middle line:84%
you may not be in a position
where you can, essentially,

00:01:15.120 --> 00:01:19.410 align:middle line:84%
access online resources to,
essentially, download exploits.

00:01:19.410 --> 00:01:23.640 align:middle line:84%
And you must have the ability
to, essentially, search for

00:01:23.640 --> 00:01:26.700 align:middle line:84%
and identify the exploit
code that you are looking for

00:01:26.700 --> 00:01:29.280 align:middle line:84%
or that is relevant
to the vulnerability

00:01:29.280 --> 00:01:30.750 align:middle line:90%
that you're trying to exploit.

00:01:30.750 --> 00:01:33.280 align:middle line:84%
And you must be able
to do this locally.

00:01:33.280 --> 00:01:36.000 align:middle line:84%
Now, given the fact that
the entire ExploitDB

00:01:36.000 --> 00:01:38.940 align:middle line:84%
database of exploits is
available offline on your Kali

00:01:38.940 --> 00:01:41.610 align:middle line:84%
Linux system, you
need a way of actually

00:01:41.610 --> 00:01:44.070 align:middle line:84%
searching for the exploits
that you're looking for.

00:01:44.070 --> 00:01:46.500 align:middle line:84%
And this is where the
SearchSploit utility

00:01:46.500 --> 00:01:48.090 align:middle line:90%
comes into play, all right?

00:01:48.090 --> 00:01:51.000 align:middle line:84%
So the ExploitDB offline
database of exploits

00:01:51.000 --> 00:01:54.640 align:middle line:84%
can be accessed and queried
with a tool called SearchSploit,

00:01:54.640 --> 00:01:55.140 align:middle line:90%
all right?

00:01:55.140 --> 00:01:58.200 align:middle line:84%
So SearchSploit is part
of the ExploitDB package.

00:01:58.200 --> 00:02:00.900 align:middle line:84%
And we'll actually
take a look at that

00:02:00.900 --> 00:02:03.453 align:middle line:84%
during the practical
demonstration, which is what

00:02:03.453 --> 00:02:04.620 align:middle line:90%
we're going to be doing now.

00:02:04.620 --> 00:02:07.980 align:middle line:84%
So this video doesn't have a
lab environment attached to it.

00:02:07.980 --> 00:02:11.280 align:middle line:84%
All I'm really showcasing
is the actual technique

00:02:11.280 --> 00:02:13.740 align:middle line:84%
or the various techniques
involved in relation

00:02:13.740 --> 00:02:17.220 align:middle line:84%
to utilizing SearchSploit
to find or to search

00:02:17.220 --> 00:02:19.950 align:middle line:84%
for the exploits stored
locally or to search

00:02:19.950 --> 00:02:21.570 align:middle line:84%
for exploits that
you're interested

00:02:21.570 --> 00:02:25.000 align:middle line:84%
in from the local ExploitDB
database of exploits,

00:02:25.000 --> 00:02:25.500 align:middle line:90%
all right?

00:02:25.500 --> 00:02:27.810 align:middle line:84%
So I'll switch over
to my Kali Linux VM,

00:02:27.810 --> 00:02:29.115 align:middle line:90%
and we can get started.

00:02:29.115 --> 00:02:31.660 align:middle line:90%


00:02:31.660 --> 00:02:33.990 align:middle line:84%
All right, so I'm back
on my Kali Linux VM.

00:02:33.990 --> 00:02:35.820 align:middle line:84%
And the first step
will essentially

00:02:35.820 --> 00:02:40.290 align:middle line:84%
involve updating or installing
the ExploitDB package

00:02:40.290 --> 00:02:42.420 align:middle line:84%
if you don't have it
installed already.

00:02:42.420 --> 00:02:46.680 align:middle line:84%
As I said, if you're using the
latest version of Kali Linux--

00:02:46.680 --> 00:02:48.420 align:middle line:90%
the default version--

00:02:48.420 --> 00:02:52.680 align:middle line:84%
that could either be the
ISO image or the VM file

00:02:52.680 --> 00:02:55.980 align:middle line:84%
or the VM image for both
VirtualBox and VMware,

00:02:55.980 --> 00:02:57.930 align:middle line:84%
the ExploitDB
package should come

00:02:57.930 --> 00:02:59.700 align:middle line:90%
prepackaged or pre-installed.

00:02:59.700 --> 00:03:02.400 align:middle line:84%
However, it is always
recommended to keep it updated.

00:03:02.400 --> 00:03:04.950 align:middle line:84%
So in order to update
it or install it,

00:03:04.950 --> 00:03:06.950 align:middle line:90%
we can update our repository.

00:03:06.950 --> 00:03:09.420 align:middle line:84%
So I'm going to say
sudo apt get update.

00:03:09.420 --> 00:03:16.200 align:middle line:84%
And I can then say sudo
apt get install ExploitDB.

00:03:16.200 --> 00:03:17.220 align:middle line:90%
That's the package.

00:03:17.220 --> 00:03:19.348 align:middle line:90%
And I'll hit Enter.

00:03:19.348 --> 00:03:19.890 align:middle line:90%
There we are.

00:03:19.890 --> 00:03:22.380 align:middle line:84%
So it's going to
update my repositories.

00:03:22.380 --> 00:03:24.310 align:middle line:84%
And I'll give this
a couple of seconds.

00:03:24.310 --> 00:03:25.685 align:middle line:84%
And it should tell
me that I have

00:03:25.685 --> 00:03:28.470 align:middle line:84%
the latest version installed
as it says right over here.

00:03:28.470 --> 00:03:30.690 align:middle line:84%
So ExploitDB is already
the newest version.

00:03:30.690 --> 00:03:31.350 align:middle line:90%
Fantastic.

00:03:31.350 --> 00:03:34.240 align:middle line:84%
In your case, you may
need to update yours.

00:03:34.240 --> 00:03:36.540 align:middle line:84%
So now that we have
the ExploitDB package

00:03:36.540 --> 00:03:38.790 align:middle line:84%
updated, let's get
an understanding

00:03:38.790 --> 00:03:42.850 align:middle line:84%
of where this local database
of exploits is stored.

00:03:42.850 --> 00:03:48.150 align:middle line:84%
So the ExploitDB database
or collection of exploits

00:03:48.150 --> 00:03:52.290 align:middle line:84%
is stored under user,
share, exploitdb.

00:03:52.290 --> 00:03:54.930 align:middle line:84%
So if I Enter, you can see
that this folder contains

00:03:54.930 --> 00:03:55.890 align:middle line:90%
two folders.

00:03:55.890 --> 00:03:59.400 align:middle line:84%
It contains exploits and
shell code, all right?

00:03:59.400 --> 00:04:01.950 align:middle line:84%
Now, as I said, this
directory is essentially

00:04:01.950 --> 00:04:03.310 align:middle line:90%
where everything is stored.

00:04:03.310 --> 00:04:06.030 align:middle line:84%
So all the exploits
available on ExploitDB

00:04:06.030 --> 00:04:08.250 align:middle line:84%
are available within
the exploits directory.

00:04:08.250 --> 00:04:11.460 align:middle line:84%
And then the shellcode directory
contains all the shellcode

00:04:11.460 --> 00:04:13.590 align:middle line:90%
available on ExploitDB.

00:04:13.590 --> 00:04:15.150 align:middle line:84%
All right, so the
exploit directory

00:04:15.150 --> 00:04:17.220 align:middle line:84%
is further sorted
and categorized

00:04:17.220 --> 00:04:20.459 align:middle line:84%
based on the target operating
system, architecture,

00:04:20.459 --> 00:04:23.130 align:middle line:84%
and the actual development
language that was

00:04:23.130 --> 00:04:25.590 align:middle line:90%
used to develop that exploit.

00:04:25.590 --> 00:04:27.870 align:middle line:84%
You can, again,
manually check or search

00:04:27.870 --> 00:04:30.420 align:middle line:84%
for exploits within this
directory if you want to.

00:04:30.420 --> 00:04:32.280 align:middle line:84%
But this is really
not efficient,

00:04:32.280 --> 00:04:35.290 align:middle line:84%
and that's why these search
exploit utility was developed.

00:04:35.290 --> 00:04:41.520 align:middle line:84%
So if we just take a peek
around the exploits directory--

00:04:41.520 --> 00:04:47.820 align:middle line:84%
let's see, that is under
user, share ExploitDB.

00:04:47.820 --> 00:04:50.190 align:middle line:84%
And under the
exploits you should

00:04:50.190 --> 00:04:52.440 align:middle line:84%
be able to see that
we'll be able to sort

00:04:52.440 --> 00:04:55.690 align:middle line:84%
through the actual
operating system.

00:04:55.690 --> 00:04:57.870 align:middle line:84%
So if we're looking
for Windows exploits,

00:04:57.870 --> 00:04:59.310 align:middle line:90%
we can click on Windows.

00:04:59.310 --> 00:05:02.010 align:middle line:84%
And we can then specify
what type of exploit.

00:05:02.010 --> 00:05:06.030 align:middle line:84%
So again, all of these filters
or forms of categorization

00:05:06.030 --> 00:05:10.290 align:middle line:84%
are what we saw online when we
accessed the ExploitDB website.

00:05:10.290 --> 00:05:12.220 align:middle line:84%
If you take a look
at the filters,

00:05:12.220 --> 00:05:13.840 align:middle line:90%
this is what it is referring to.

00:05:13.840 --> 00:05:15.210 align:middle line:90%
So this is the type of exploit.

00:05:15.210 --> 00:05:17.190 align:middle line:84%
So if we're looking
for a remote exploit,

00:05:17.190 --> 00:05:19.890 align:middle line:84%
we can head over into
the remote directory.

00:05:19.890 --> 00:05:23.130 align:middle line:84%
So I can say remote, and
then within this, you

00:05:23.130 --> 00:05:26.340 align:middle line:84%
can see all the exploits
are listed not by their name

00:05:26.340 --> 00:05:27.720 align:middle line:90%
or by their title--

00:05:27.720 --> 00:05:29.880 align:middle line:84%
although that information
is also available--

00:05:29.880 --> 00:05:32.970 align:middle line:84%
they are sorted by
the ExploitDB ID.

00:05:32.970 --> 00:05:35.310 align:middle line:84%
And you can also
query this directory

00:05:35.310 --> 00:05:38.430 align:middle line:84%
if you've identified an exploit
and you know the exploit ID.

00:05:38.430 --> 00:05:40.830 align:middle line:84%
As I said, that
information was important

00:05:40.830 --> 00:05:42.030 align:middle line:90%
in the previous video.

00:05:42.030 --> 00:05:44.130 align:middle line:90%
And this is why it's important.

00:05:44.130 --> 00:05:47.370 align:middle line:84%
So that is where the
actual exploits are stored.

00:05:47.370 --> 00:05:49.620 align:middle line:84%
And of course, as
I said, the tool

00:05:49.620 --> 00:05:52.830 align:middle line:84%
we are going to be utilizing
to search for specific exploits

00:05:52.830 --> 00:05:56.250 align:middle line:84%
as we would if we were
utilizing the ExploitDB website

00:05:56.250 --> 00:05:57.990 align:middle line:90%
is SearchSploit.

00:05:57.990 --> 00:06:01.375 align:middle line:84%
Now, SearchSploit--
again, I'll just

00:06:01.375 --> 00:06:02.500 align:middle line:90%
type it in right over here.

00:06:02.500 --> 00:06:04.200 align:middle line:90%
So SearchSploit, hit Enter.

00:06:04.200 --> 00:06:08.220 align:middle line:84%
It'll provide you with very
useful documentation regarding

00:06:08.220 --> 00:06:09.490 align:middle line:90%
the actual syntax.

00:06:09.490 --> 00:06:11.280 align:middle line:84%
So you can see right
over here-- usage.

00:06:11.280 --> 00:06:15.720 align:middle line:84%
You specify the
SearchSploit operator.

00:06:15.720 --> 00:06:19.980 align:middle line:84%
You then specify options, then
your term, the actual title,

00:06:19.980 --> 00:06:23.730 align:middle line:84%
or it could just be the
banner of the service you're

00:06:23.730 --> 00:06:24.828 align:middle line:90%
trying to exploit.

00:06:24.828 --> 00:06:26.370 align:middle line:84%
And we'll take a
look at all of this.

00:06:26.370 --> 00:06:30.700 align:middle line:84%
And it then provides
you with examples here.

00:06:30.700 --> 00:06:34.650 align:middle line:84%
So you can see, if you're
looking for exploits related

00:06:34.650 --> 00:06:39.900 align:middle line:84%
to Apache Struts 2.0.0,
that is the actual search

00:06:39.900 --> 00:06:41.220 align:middle line:90%
query you would run.

00:06:41.220 --> 00:06:44.110 align:middle line:84%
And then, you have various
options right over here.

00:06:44.110 --> 00:06:48.090 align:middle line:84%
Now, before we
actually get started

00:06:48.090 --> 00:06:52.860 align:middle line:84%
with searching for exploits,
this right over here

00:06:52.860 --> 00:06:55.770 align:middle line:84%
under the nonsearching,
this option U for update,

00:06:55.770 --> 00:06:59.220 align:middle line:84%
this is very important because
this option will essentially

00:06:59.220 --> 00:07:03.160 align:middle line:84%
check for and install any
ExploitDB package updates.

00:07:03.160 --> 00:07:06.930 align:middle line:84%
So as I said, ExploitDB
is updated every day.

00:07:06.930 --> 00:07:09.600 align:middle line:84%
So you can see that
the latest exploit

00:07:09.600 --> 00:07:13.320 align:middle line:84%
added was on the 19th
of January, 2022.

00:07:13.320 --> 00:07:15.210 align:middle line:84%
This is when I'm
recording this video.

00:07:15.210 --> 00:07:18.690 align:middle line:84%
And in order to obtain
the latest exploits,

00:07:18.690 --> 00:07:21.780 align:middle line:84%
you actually need to update
the ExploitDB package.

00:07:21.780 --> 00:07:24.900 align:middle line:84%
And again, this is not
the ExploitDB package

00:07:24.900 --> 00:07:26.970 align:middle line:90%
that we updated previously.

00:07:26.970 --> 00:07:28.650 align:middle line:84%
You actually need
to manually do this

00:07:28.650 --> 00:07:32.610 align:middle line:84%
using the SearchSploit
utility and the U option

00:07:32.610 --> 00:07:33.460 align:middle line:90%
right over here.

00:07:33.460 --> 00:07:36.450 align:middle line:84%
Now, it's important to
note that if you have not

00:07:36.450 --> 00:07:40.560 align:middle line:84%
updated your ExploitDB
database repository if you

00:07:40.560 --> 00:07:43.740 align:middle line:84%
will in a while, then
the actual download

00:07:43.740 --> 00:07:45.340 align:middle line:90%
size will be quite large.

00:07:45.340 --> 00:07:46.510 align:middle line:90%
So I'll give you an example.

00:07:46.510 --> 00:07:51.100 align:middle line:84%
I haven't updated mine probably
for I think a few months.

00:07:51.100 --> 00:07:54.360 align:middle line:84%
So if I type in
SearchSploit U for update,

00:07:54.360 --> 00:07:57.155 align:middle line:84%
it's going to, again,
update the repository.

00:07:57.155 --> 00:07:57.780 align:middle line:90%
So that we are.

00:07:57.780 --> 00:07:59.190 align:middle line:90%
Give that a couple of seconds.

00:07:59.190 --> 00:08:02.550 align:middle line:84%
And in my case, I have a couple
of additional repositories

00:08:02.550 --> 00:08:05.160 align:middle line:90%
that's why it's taking a while.

00:08:05.160 --> 00:08:06.060 align:middle line:90%
So there we are.

00:08:06.060 --> 00:08:08.370 align:middle line:84%
You can see apt
update is finished.

00:08:08.370 --> 00:08:11.580 align:middle line:84%
It's then going to update via
the apt or the aptitude package

00:08:11.580 --> 00:08:12.690 align:middle line:90%
manager.

00:08:12.690 --> 00:08:14.850 align:middle line:84%
And we'll give this
a couple of seconds.

00:08:14.850 --> 00:08:16.810 align:middle line:84%
And you'll actually
see the entire size.

00:08:16.810 --> 00:08:18.390 align:middle line:84%
So you can see
that it requires me

00:08:18.390 --> 00:08:21.000 align:middle line:84%
to download about
three gigabytes,

00:08:21.000 --> 00:08:23.830 align:middle line:84%
which, again, in my case, I'm
not really going to do now.

00:08:23.830 --> 00:08:25.830 align:middle line:84%
But that's something that
is always recommended.

00:08:25.830 --> 00:08:30.330 align:middle line:84%
Ensure that you keep your
ExploitDB archive of exploits

00:08:30.330 --> 00:08:34.179 align:middle line:84%
or the ExploitDB package
updated to the latest version

00:08:34.179 --> 00:08:36.240 align:middle line:84%
so that you have the
latest vulnerabilities that

00:08:36.240 --> 00:08:37.402 align:middle line:90%
were added, all right?

00:08:37.402 --> 00:08:39.360 align:middle line:84%
So that's one thing that
I wanted to highlight.

00:08:39.360 --> 00:08:42.120 align:middle line:84%
Now, in the previous
videos, we went

00:08:42.120 --> 00:08:44.190 align:middle line:84%
through how to
utilize SearchSploit

00:08:44.190 --> 00:08:46.440 align:middle line:90%
at a very basic level.

00:08:46.440 --> 00:08:48.120 align:middle line:84%
We essentially typed
in SearchSploit,

00:08:48.120 --> 00:08:51.510 align:middle line:84%
and then you can essentially
type in or specify the banner--

00:08:51.510 --> 00:08:53.430 align:middle line:84%
the service banner in
terms of the service

00:08:53.430 --> 00:08:55.800 align:middle line:84%
that you're trying to
identify exploits for.

00:08:55.800 --> 00:08:59.370 align:middle line:84%
And if we used the previous
examples like vsf tpd,

00:08:59.370 --> 00:09:01.320 align:middle line:84%
we can hit Enter,
and you can see

00:09:01.320 --> 00:09:04.830 align:middle line:84%
that this is very vague because
we're specifying the service

00:09:04.830 --> 00:09:06.330 align:middle line:90%
name but not the version.

00:09:06.330 --> 00:09:08.530 align:middle line:84%
And the version information
is very important.

00:09:08.530 --> 00:09:12.000 align:middle line:84%
So if we narrow down our
search to version 2.3.4,

00:09:12.000 --> 00:09:14.220 align:middle line:84%
you can see that it
limits the results

00:09:14.220 --> 00:09:18.270 align:middle line:84%
to only two exploits-- one of
which is a Metasploit module.

00:09:18.270 --> 00:09:21.660 align:middle line:84%
The other one is a Python
script or a Python file.

00:09:21.660 --> 00:09:23.760 align:middle line:84%
And the important
thing to note here

00:09:23.760 --> 00:09:25.740 align:middle line:84%
is once you've
performed a search,

00:09:25.740 --> 00:09:28.050 align:middle line:84%
the results will be
sorted into a table that

00:09:28.050 --> 00:09:29.520 align:middle line:90%
contains two columns.

00:09:29.520 --> 00:09:32.280 align:middle line:84%
You have your exploit
title and the path.

00:09:32.280 --> 00:09:34.590 align:middle line:84%
Now, you can see that
it's not referring

00:09:34.590 --> 00:09:37.020 align:middle line:84%
to an online link that
would essentially allow

00:09:37.020 --> 00:09:38.490 align:middle line:90%
you to download the exploit.

00:09:38.490 --> 00:09:40.810 align:middle line:84%
This exploit is
actually stored locally.

00:09:40.810 --> 00:09:45.060 align:middle line:84%
So again, if I head over
into the user share ExploitDB

00:09:45.060 --> 00:09:47.960 align:middle line:84%
directory under
exploits Unix remote,

00:09:47.960 --> 00:09:51.080 align:middle line:84%
I should be able to find
this Python exploit.

00:09:51.080 --> 00:09:55.640 align:middle line:84%
Now, if you ever want to copy an
exploit that you've identified

00:09:55.640 --> 00:09:58.410 align:middle line:84%
into your current working
directory-- so, for example,

00:09:58.410 --> 00:10:02.210 align:middle line:84%
you can see that I'm on
my desktop under exploits,

00:10:02.210 --> 00:10:04.160 align:middle line:84%
and that, of course, can
be verified by typing

00:10:04.160 --> 00:10:06.270 align:middle line:90%
in print working directory.

00:10:06.270 --> 00:10:08.870 align:middle line:84%
If I wanted to copy
this particular exploit

00:10:08.870 --> 00:10:10.740 align:middle line:84%
into my current
working directory,

00:10:10.740 --> 00:10:17.030 align:middle line:84%
I can do that really simply
by saying SearchSploit M,

00:10:17.030 --> 00:10:20.510 align:middle line:84%
and I can then specify
the actual exploit ID.

00:10:20.510 --> 00:10:22.650 align:middle line:84%
And that is the
exploit database ID.

00:10:22.650 --> 00:10:26.540 align:middle line:90%
So I can just say 49757.

00:10:26.540 --> 00:10:28.430 align:middle line:84%
And I don't need to
specify the extension

00:10:28.430 --> 00:10:32.390 align:middle line:84%
because each exploit has
a unique Exploit Database

00:10:32.390 --> 00:10:35.360 align:middle line:90%
ID or EDID.

00:10:35.360 --> 00:10:40.310 align:middle line:84%
So if I type in SearchSploit
M and the actual ID

00:10:40.310 --> 00:10:42.680 align:middle line:84%
and hit Enter, you
can see that it's

00:10:42.680 --> 00:10:44.330 align:middle line:84%
going to give you
information regarding

00:10:44.330 --> 00:10:46.020 align:middle line:90%
that exploit, the path.

00:10:46.020 --> 00:10:48.710 align:middle line:84%
So as I said, it's going to
be under use share ExploitDB

00:10:48.710 --> 00:10:53.030 align:middle line:84%
exploits Unix remote
and then the ID there.

00:10:53.030 --> 00:10:54.710 align:middle line:84%
And it's going to
copy it over to

00:10:54.710 --> 00:10:56.190 align:middle line:90%
your current working directory.

00:10:56.190 --> 00:10:58.650 align:middle line:84%
So if I list out the
contents of this directory,

00:10:58.650 --> 00:11:01.070 align:middle line:84%
you can see I have the
Pythons exploit here.

00:11:01.070 --> 00:11:01.880 align:middle line:90%
Fantastic.

00:11:01.880 --> 00:11:04.890 align:middle line:84%
So I can actually then
move into modifying it.

00:11:04.890 --> 00:11:06.020 align:middle line:90%
So I can say--

00:11:06.020 --> 00:11:09.140 align:middle line:84%
I can utilize vim and open
this up and hit Enter.

00:11:09.140 --> 00:11:12.150 align:middle line:84%
And you can see I have the
entire exploit available.

00:11:12.150 --> 00:11:13.760 align:middle line:84%
So this is really,
really awesome

00:11:13.760 --> 00:11:15.440 align:middle line:84%
because if I'm in
an environment that

00:11:15.440 --> 00:11:20.390 align:middle line:84%
doesn't have a very good online
connection or a stable internet

00:11:20.390 --> 00:11:22.730 align:middle line:84%
connection, then
this is a lifesaver

00:11:22.730 --> 00:11:26.930 align:middle line:84%
because I can essentially access
the entire database of exploits

00:11:26.930 --> 00:11:29.370 align:middle line:90%
locally on my Kali Linux system.

00:11:29.370 --> 00:11:32.540 align:middle line:90%
So I'll just quit and exit.

00:11:32.540 --> 00:11:36.350 align:middle line:84%
Now, let's talk a little bit
about the SearchSploit search

00:11:36.350 --> 00:11:40.700 align:middle line:84%
terms that allow you to narrow
down or essentially narrow down

00:11:40.700 --> 00:11:43.580 align:middle line:84%
your searches based on
what you're looking for.

00:11:43.580 --> 00:11:46.550 align:middle line:84%
One of the great
features is the fact

00:11:46.550 --> 00:11:48.890 align:middle line:84%
that SearchSploit
allows you to perform

00:11:48.890 --> 00:11:50.630 align:middle line:90%
case-sensitive searches.

00:11:50.630 --> 00:11:54.770 align:middle line:84%
So for example, if I wanted to
perform a case-sensitive search

00:11:54.770 --> 00:11:58.580 align:middle line:84%
for the banner or for
the service openSSH,

00:11:58.580 --> 00:12:00.920 align:middle line:84%
I can utilize the
hyphen C option.

00:12:00.920 --> 00:12:02.450 align:middle line:84%
And I'll just zoom
in a little bit

00:12:02.450 --> 00:12:04.820 align:middle line:84%
here so you can see
what's going on.

00:12:04.820 --> 00:12:05.510 align:middle line:90%
There we are.

00:12:05.510 --> 00:12:08.600 align:middle line:84%
And I can say C
for case sensitive,

00:12:08.600 --> 00:12:11.870 align:middle line:90%
and then I can say openSSH.

00:12:11.870 --> 00:12:13.820 align:middle line:84%
I hit Enter, and
that'll bring up

00:12:13.820 --> 00:12:17.360 align:middle line:84%
all the exploits pertinent
to the actual keyword

00:12:17.360 --> 00:12:19.700 align:middle line:84%
or the string that
I just specified.

00:12:19.700 --> 00:12:23.420 align:middle line:84%
And you can see that I've not
specified the service version,

00:12:23.420 --> 00:12:24.800 align:middle line:90%
but it provides me--

00:12:24.800 --> 00:12:28.490 align:middle line:84%
and it actually color
codes the actual string

00:12:28.490 --> 00:12:32.060 align:middle line:84%
or query that I provided to
SearchSploit right over here

00:12:32.060 --> 00:12:33.680 align:middle line:90%
and shows all the matches.

00:12:33.680 --> 00:12:39.740 align:middle line:84%
And you can see that this
is quite important or quite

00:12:39.740 --> 00:12:40.320 align:middle line:90%
accurate.

00:12:40.320 --> 00:12:43.220 align:middle line:84%
Now, if I launched a
case-sensitive search

00:12:43.220 --> 00:12:46.940 align:middle line:84%
for openSSH and typed
it in in lowercase,

00:12:46.940 --> 00:12:49.520 align:middle line:84%
you can see that I've not
obtained the same results

00:12:49.520 --> 00:12:54.590 align:middle line:84%
that I would have had I used
the actual case-sensitive option

00:12:54.590 --> 00:12:57.500 align:middle line:84%
and specified the
service banner correctly.

00:12:57.500 --> 00:13:00.350 align:middle line:84%
So the reason why I'm
using the openSSH example

00:13:00.350 --> 00:13:04.920 align:middle line:84%
is because openSSH is typically
referred to as "as is."

00:13:04.920 --> 00:13:09.410 align:middle line:84%
So this is the case that is
typically utilized for openSSH,

00:13:09.410 --> 00:13:13.830 align:middle line:84%
and it's very rarely
referred to in lowercase.

00:13:13.830 --> 00:13:16.880 align:middle line:84%
So again, if I got rid of
the case-sensitive search,

00:13:16.880 --> 00:13:20.030 align:middle line:84%
then I would essentially obtain
the results I obtained earlier.

00:13:20.030 --> 00:13:22.010 align:middle line:84%
So you can see that
right over there.

00:13:22.010 --> 00:13:29.570 align:middle line:84%
So the case-sensitive
search is not really useful

00:13:29.570 --> 00:13:33.560 align:middle line:84%
if you don't want to ensure
that the actual exploits

00:13:33.560 --> 00:13:36.750 align:middle line:84%
of the title of the
exploit are case sensitive.

00:13:36.750 --> 00:13:38.840 align:middle line:90%
So be very careful with that.

00:13:38.840 --> 00:13:43.440 align:middle line:84%
As I said, only use that
if you actually need to.

00:13:43.440 --> 00:13:47.760 align:middle line:84%
The other option or
the other search term

00:13:47.760 --> 00:13:51.400 align:middle line:84%
that you can use to filter your
searches at a very basic level,

00:13:51.400 --> 00:13:53.070 align:middle line:90%
is the title search, right?

00:13:53.070 --> 00:13:54.570 align:middle line:84%
Now, the title
search essentially

00:13:54.570 --> 00:13:56.520 align:middle line:84%
searches for the
keyword that you

00:13:56.520 --> 00:13:59.460 align:middle line:84%
specify within the
title of the exploit.

00:13:59.460 --> 00:14:02.400 align:middle line:84%
So for example, if
I wanted to search

00:14:02.400 --> 00:14:06.150 align:middle line:84%
for the keyword within the
title of all the exploits,

00:14:06.150 --> 00:14:09.360 align:middle line:84%
I can say SearchSploit
hyphen T. And then

00:14:09.360 --> 00:14:12.570 align:middle line:90%
I can say vsf tpd and hit Enter.

00:14:12.570 --> 00:14:15.210 align:middle line:84%
And that is going to
bring up all exploits that

00:14:15.210 --> 00:14:19.650 align:middle line:84%
contain vsf tpd within the title
as you can see right over here.

00:14:19.650 --> 00:14:24.620 align:middle line:84%
And this will essentially
ensure that the information

00:14:24.620 --> 00:14:26.880 align:middle line:84%
that you're trying
to query is only

00:14:26.880 --> 00:14:29.130 align:middle line:84%
stored within the
title as opposed

00:14:29.130 --> 00:14:30.930 align:middle line:84%
to any other
parameter associated

00:14:30.930 --> 00:14:34.800 align:middle line:84%
with a particular
exploit or exploit code.

00:14:34.800 --> 00:14:36.570 align:middle line:84%
So again, this can
be very helpful

00:14:36.570 --> 00:14:39.390 align:middle line:84%
if you are trying to
identify a specific keyword

00:14:39.390 --> 00:14:40.960 align:middle line:90%
within the exploit title.

00:14:40.960 --> 00:14:43.860 align:middle line:84%
And this is not just
limited to the service

00:14:43.860 --> 00:14:45.840 align:middle line:90%
banner or the service version.

00:14:45.840 --> 00:14:48.630 align:middle line:84%
I can also identify
or find exploits

00:14:48.630 --> 00:14:50.800 align:middle line:84%
pertinent to a type
of vulnerability.

00:14:50.800 --> 00:14:54.300 align:middle line:84%
So for example, if I'm
looking for buffer overflow

00:14:54.300 --> 00:14:57.420 align:middle line:84%
vulnerabilities, I can
type in buffer overflow,

00:14:57.420 --> 00:15:03.090 align:middle line:84%
and I can essentially bring up
all buffer overflow exploits.

00:15:03.090 --> 00:15:05.400 align:middle line:84%
And these are not
pertinent or relative

00:15:05.400 --> 00:15:07.320 align:middle line:90%
to a particular service.

00:15:07.320 --> 00:15:09.730 align:middle line:84%
But again, you can see
how robust this is.

00:15:09.730 --> 00:15:11.460 align:middle line:84%
So it'll essentially
search or find

00:15:11.460 --> 00:15:14.190 align:middle line:84%
all exploits that contain
the keyword "buffer

00:15:14.190 --> 00:15:16.740 align:middle line:90%
overflow" in the title.

00:15:16.740 --> 00:15:19.440 align:middle line:84%
All right, so that is how
to utilize the T option

00:15:19.440 --> 00:15:21.160 align:middle line:90%
or the title search option.

00:15:21.160 --> 00:15:22.357 align:middle line:90%
You can then perform--

00:15:22.357 --> 00:15:23.940 align:middle line:84%
and this is one of
the most important.

00:15:23.940 --> 00:15:26.440 align:middle line:90%
This is the exact search option.

00:15:26.440 --> 00:15:29.380 align:middle line:84%
So if I open up the
search exploit help menu,

00:15:29.380 --> 00:15:32.040 align:middle line:84%
you can see that we have
the exact search term

00:15:32.040 --> 00:15:32.770 align:middle line:90%
right over here.

00:15:32.770 --> 00:15:35.130 align:middle line:84%
So this will perform
an exact and order

00:15:35.130 --> 00:15:37.140 align:middle line:90%
match on the exploit title.

00:15:37.140 --> 00:15:42.960 align:middle line:84%
So an example of this would be
if I wanted to search exactly

00:15:42.960 --> 00:15:47.820 align:middle line:84%
for a specific service
banner that I obtained

00:15:47.820 --> 00:15:51.490 align:middle line:84%
during the banner grabbing
phase of a penetration test--

00:15:51.490 --> 00:15:54.390 align:middle line:84%
so again, just to use
a simple example here,

00:15:54.390 --> 00:15:55.890 align:middle line:90%
I can say SearchSploit.

00:15:55.890 --> 00:16:00.060 align:middle line:84%
And if I want exact matches, I
can put it in quotation marks

00:16:00.060 --> 00:16:03.250 align:middle line:90%
and say Windows XP, for example.

00:16:03.250 --> 00:16:05.370 align:middle line:84%
So I can say, Windows
XP, hit Enter.

00:16:05.370 --> 00:16:07.380 align:middle line:90%
And this is going to bring all--

00:16:07.380 --> 00:16:10.050 align:middle line:84%
this is going to display a
list of all exploits that

00:16:10.050 --> 00:16:14.680 align:middle line:84%
contain Windows XP within
the title right over here.

00:16:14.680 --> 00:16:18.780 align:middle line:84%
So you can see it's not just
relative to Windows XP exploits

00:16:18.780 --> 00:16:22.380 align:middle line:84%
but also services that
run on top of Windows XP.

00:16:22.380 --> 00:16:24.280 align:middle line:90%
So this is very, very helpful.

00:16:24.280 --> 00:16:28.110 align:middle line:84%
And of course, you can also
limit this or essentially

00:16:28.110 --> 00:16:30.780 align:middle line:84%
filter through this by
using the grep option.

00:16:30.780 --> 00:16:32.040 align:middle line:90%
So I can say grep.

00:16:32.040 --> 00:16:36.280 align:middle line:84%
And I want to match a pattern,
and the pattern in this case,

00:16:36.280 --> 00:16:39.690 align:middle line:84%
I can probably limit it
to Microsoft Windows XP.

00:16:39.690 --> 00:16:44.460 align:middle line:84%
So I can say Microsoft
Windows XP and hit Enter.

00:16:44.460 --> 00:16:48.120 align:middle line:84%
And in this case, it
looks like it is not

00:16:48.120 --> 00:16:50.980 align:middle line:90%
giving me what I'm looking for.

00:16:50.980 --> 00:16:55.710 align:middle line:84%
So what I can do is probably
limit the results to Microsoft.

00:16:55.710 --> 00:16:56.950 align:middle line:90%
Let's see if that works.

00:16:56.950 --> 00:16:57.730 align:middle line:90%
There we are.

00:16:57.730 --> 00:17:01.620 align:middle line:84%
And you can now see that it
will only display exploits

00:17:01.620 --> 00:17:04.440 align:middle line:90%
pertinent to Windows XP.

00:17:04.440 --> 00:17:05.069 align:middle line:90%
Fantastic.

00:17:05.069 --> 00:17:08.980 align:middle line:84%
So that is how to use
the exact search option.

00:17:08.980 --> 00:17:10.450 align:middle line:84%
And of course, you
can also do this

00:17:10.450 --> 00:17:13.300 align:middle line:84%
for other banners
or other services

00:17:13.300 --> 00:17:15.170 align:middle line:84%
if you're looking
for an exact match.

00:17:15.170 --> 00:17:21.520 align:middle line:84%
So I can say openSSH 7.2 P2
and close quotation marks.

00:17:21.520 --> 00:17:22.929 align:middle line:90%
Give that a couple of seconds.

00:17:22.929 --> 00:17:29.650 align:middle line:90%


00:17:29.650 --> 00:17:32.860 align:middle line:84%
Once complete, you can see
that the actual exploits

00:17:32.860 --> 00:17:36.010 align:middle line:84%
pertinent to the version
that we specified

00:17:36.010 --> 00:17:37.550 align:middle line:90%
will be highlighted in red.

00:17:37.550 --> 00:17:40.480 align:middle line:84%
And that's something that really
is great when it comes down

00:17:40.480 --> 00:17:43.780 align:middle line:84%
to SearchSploit,
and it's essentially

00:17:43.780 --> 00:17:46.120 align:middle line:90%
makes things easier to spot.

00:17:46.120 --> 00:17:49.087 align:middle line:90%
So that is the exact search.

00:17:49.087 --> 00:17:50.920 align:middle line:84%
So I'm just going to
clear out the terminal.

00:17:50.920 --> 00:17:54.250 align:middle line:84%
And let's take a look at the
final piece of functionality

00:17:54.250 --> 00:17:55.750 align:middle line:90%
that I wanted to highlight.

00:17:55.750 --> 00:17:58.810 align:middle line:84%
And that is the ability
to utilize filters

00:17:58.810 --> 00:18:02.860 align:middle line:84%
that you typically use
on the ExploitDB website.

00:18:02.860 --> 00:18:05.560 align:middle line:84%
So filters can be
used to fine tune

00:18:05.560 --> 00:18:08.320 align:middle line:84%
your results similar to
the ExploitDB website.

00:18:08.320 --> 00:18:10.990 align:middle line:84%
And they allow you to
essentially filter through

00:18:10.990 --> 00:18:14.410 align:middle line:84%
based on the following
categories-- so type, platform,

00:18:14.410 --> 00:18:16.990 align:middle line:84%
and/or port or service
filters, right?

00:18:16.990 --> 00:18:20.380 align:middle line:84%
And all of this is going
to be used to search for--

00:18:20.380 --> 00:18:23.830 align:middle line:84%
or all of the information you
provide in terms of the search

00:18:23.830 --> 00:18:26.200 align:middle line:84%
filters will all
be used to search

00:18:26.200 --> 00:18:30.400 align:middle line:84%
for relative or exploits
that have that information

00:18:30.400 --> 00:18:31.540 align:middle line:90%
within the title.

00:18:31.540 --> 00:18:34.340 align:middle line:84%
So let me show you
what this looks like.

00:18:34.340 --> 00:18:36.970 align:middle line:84%
So if I just open up the
SearchSploit documentation

00:18:36.970 --> 00:18:41.880 align:middle line:84%
page, you can see that we
should have the ability

00:18:41.880 --> 00:18:45.760 align:middle line:84%
to essentially specify from
the example right over here.

00:18:45.760 --> 00:18:49.900 align:middle line:84%
You can see that this one may
be a bit confusing because it's

00:18:49.900 --> 00:18:53.440 align:middle line:84%
not really searching
for a specific service

00:18:53.440 --> 00:18:56.020 align:middle line:84%
version or a piece
of software that

00:18:56.020 --> 00:18:58.660 align:middle line:84%
could be vulnerable like
this one right over here.

00:18:58.660 --> 00:19:02.450 align:middle line:84%
Instead it's specifying
AFD Windows Local.

00:19:02.450 --> 00:19:04.370 align:middle line:84%
So let me show you
how that works.

00:19:04.370 --> 00:19:07.450 align:middle line:84%
So if I wanted to search
for all exploits that

00:19:07.450 --> 00:19:09.890 align:middle line:84%
meet a certain parameter--
so for example,

00:19:09.890 --> 00:19:14.440 align:middle line:84%
if I wanted to search for
remote exploits for Windows

00:19:14.440 --> 00:19:18.220 align:middle line:84%
operating systems that target
the SMB port or the SMB

00:19:18.220 --> 00:19:21.400 align:middle line:84%
service, I could do that
by saying SearchSploit,

00:19:21.400 --> 00:19:27.600 align:middle line:84%
and then I can say
remote Windows SMB.

00:19:27.600 --> 00:19:29.310 align:middle line:90%
So I hope that makes sense.

00:19:29.310 --> 00:19:32.770 align:middle line:84%
We're looking for remote
exploits and these, of course,

00:19:32.770 --> 00:19:34.680 align:middle line:90%
have to be Windows exploits.

00:19:34.680 --> 00:19:38.220 align:middle line:84%
And they are targeting the
SMB service or the SMB port

00:19:38.220 --> 00:19:39.240 align:middle line:90%
if you will--

00:19:39.240 --> 00:19:41.610 align:middle line:84%
but really the SMB
service because SMB

00:19:41.610 --> 00:19:44.070 align:middle line:84%
will be included within
the exploit titles.

00:19:44.070 --> 00:19:45.330 align:middle line:90%
So I'll hit Enter.

00:19:45.330 --> 00:19:49.080 align:middle line:84%
And you can see that this will
bring up a list of all Windows

00:19:49.080 --> 00:19:53.610 align:middle line:84%
exploits pertinent to the
parameters or the options

00:19:53.610 --> 00:19:54.670 align:middle line:90%
we specified here.

00:19:54.670 --> 00:19:56.860 align:middle line:84%
So these are all
remote exploits,

00:19:56.860 --> 00:20:00.030 align:middle line:84%
which means they will allow
us to exploit a Windows system

00:20:00.030 --> 00:20:00.840 align:middle line:90%
remotely.

00:20:00.840 --> 00:20:03.580 align:middle line:84%
And they all target
the SMB service.

00:20:03.580 --> 00:20:09.360 align:middle line:84%
So again, now, at
this point, you'll

00:20:09.360 --> 00:20:13.360 align:middle line:84%
pretty much need to sort through
the exploit that you will be--

00:20:13.360 --> 00:20:15.900 align:middle line:84%
that actually meets
the requirements

00:20:15.900 --> 00:20:17.460 align:middle line:84%
in terms of the
version of Windows

00:20:17.460 --> 00:20:18.730 align:middle line:90%
that is running on a target.

00:20:18.730 --> 00:20:20.910 align:middle line:84%
So this has narrowed
down our search.

00:20:20.910 --> 00:20:25.350 align:middle line:84%
So for example, if I was looking
for remote Windows SMB exploits

00:20:25.350 --> 00:20:29.880 align:middle line:84%
for Windows XP, I could
utilize the search filters

00:20:29.880 --> 00:20:31.420 align:middle line:90%
that I've just typed in.

00:20:31.420 --> 00:20:33.750 align:middle line:84%
And I can head over,
and you can see

00:20:33.750 --> 00:20:35.670 align:middle line:84%
we have one right
over here for XP--

00:20:35.670 --> 00:20:38.520 align:middle line:84%
that is SMB authentication
remote overflow.

00:20:38.520 --> 00:20:42.210 align:middle line:84%
And that really isn't an
exploit code or exploit

00:20:42.210 --> 00:20:43.290 align:middle line:90%
file that can be run.

00:20:43.290 --> 00:20:45.480 align:middle line:84%
That is a text
file that probably

00:20:45.480 --> 00:20:47.760 align:middle line:84%
contains information
regarding how

00:20:47.760 --> 00:20:49.990 align:middle line:90%
the exploit can be performed.

00:20:49.990 --> 00:20:51.580 align:middle line:90%
We then have a few others here.

00:20:51.580 --> 00:20:55.380 align:middle line:84%
So again, just using the
example of Windows XP,

00:20:55.380 --> 00:20:59.040 align:middle line:84%
let's see if we can identify
any XP exploits here.

00:20:59.040 --> 00:21:00.180 align:middle line:90%
No, we cannot.

00:21:00.180 --> 00:21:05.610 align:middle line:84%
So we weren't able to obtain
any XP exploits there.

00:21:05.610 --> 00:21:08.440 align:middle line:84%
And, yeah, that's
perfectly fine.

00:21:08.440 --> 00:21:11.160 align:middle line:84%
But what we could
do is, if we say--

00:21:11.160 --> 00:21:13.620 align:middle line:84%
we can get rid of
the SMB option.

00:21:13.620 --> 00:21:18.300 align:middle line:84%
And we can then say, for
example, buffer and hit Enter.

00:21:18.300 --> 00:21:22.320 align:middle line:84%
And this is going to display all
buffer overflows for Windows.

00:21:22.320 --> 00:21:25.600 align:middle line:84%
But again, that is really
expanding our searches.

00:21:25.600 --> 00:21:27.630 align:middle line:84%
So what we could
do, for example--

00:21:27.630 --> 00:21:31.450 align:middle line:84%
let's try and utilize another
example in the case of Linux.

00:21:31.450 --> 00:21:36.540 align:middle line:84%
So let's say I'm looking for
remote Linux exploits that

00:21:36.540 --> 00:21:38.070 align:middle line:90%
target the SSH service.

00:21:38.070 --> 00:21:42.600 align:middle line:84%
And I'm not specifying the
actual service itself or this

00:21:42.600 --> 00:21:45.870 align:middle line:84%
the service name, which I
could do by saying openSSH here

00:21:45.870 --> 00:21:47.790 align:middle line:84%
for example, and
that'll bring it up.

00:21:47.790 --> 00:21:51.450 align:middle line:84%
But if I get rid of
openSSH, I can hit Enter,

00:21:51.450 --> 00:21:55.620 align:middle line:84%
and you can see this is going
to bring up all SSH exploits

00:21:55.620 --> 00:21:57.340 align:middle line:90%
for Linux that are remote.

00:21:57.340 --> 00:22:00.330 align:middle line:84%
So again, they're not
just limited to openSSH.

00:22:00.330 --> 00:22:02.010 align:middle line:90%
There's libSSH.

00:22:02.010 --> 00:22:03.850 align:middle line:90%
We have DropBearSSH.

00:22:03.850 --> 00:22:08.410 align:middle line:84%
We have Debian openSSH
as well as a few others.

00:22:08.410 --> 00:22:10.525 align:middle line:84%
So you can see how
useful this is.

00:22:10.525 --> 00:22:12.150 align:middle line:84%
And of course, this
is not just limited

00:22:12.150 --> 00:22:14.910 align:middle line:90%
to Windows and Linux platforms.

00:22:14.910 --> 00:22:17.620 align:middle line:84%
You can also do this
for web applications.

00:22:17.620 --> 00:22:20.250 align:middle line:84%
So let's say we have
identified a web server that's

00:22:20.250 --> 00:22:23.940 align:middle line:84%
running WordPress and I'm
looking for remote WordPress

00:22:23.940 --> 00:22:24.840 align:middle line:90%
exploits.

00:22:24.840 --> 00:22:30.150 align:middle line:84%
I can say SearchSploit, and
then specify remote web apps,

00:22:30.150 --> 00:22:33.230 align:middle line:90%
and I can specify WordPress.

00:22:33.230 --> 00:22:36.680 align:middle line:84%
And this will bring us
all remote exploits.

00:22:36.680 --> 00:22:39.080 align:middle line:84%
However, because this
is a web application,

00:22:39.080 --> 00:22:42.290 align:middle line:84%
remote file inclusion
exploits will actually

00:22:42.290 --> 00:22:43.400 align:middle line:90%
be brought up here.

00:22:43.400 --> 00:22:49.220 align:middle line:84%
So we could additionally or
also utilize other keywords

00:22:49.220 --> 00:22:53.210 align:middle line:84%
to essentially limit our results
to what we're looking for.

00:22:53.210 --> 00:22:55.590 align:middle line:90%
So we could also be--

00:22:55.590 --> 00:23:00.530 align:middle line:84%
we could be only looking for
remote code execution exploits,

00:23:00.530 --> 00:23:04.130 align:middle line:84%
and we would then essentially
provide or specify

00:23:04.130 --> 00:23:06.200 align:middle line:84%
the code execution
or remote code

00:23:06.200 --> 00:23:09.870 align:middle line:84%
execution keyword if that's
what we were looking for.

00:23:09.870 --> 00:23:12.560 align:middle line:84%
So again, this is not
just limited to WordPress.

00:23:12.560 --> 00:23:16.503 align:middle line:84%
We can try and look for
exploits that affect Drupal.

00:23:16.503 --> 00:23:17.045 align:middle line:90%
There we are.

00:23:17.045 --> 00:23:20.630 align:middle line:84%
You can see that this will
bring up all Drupal exploits--

00:23:20.630 --> 00:23:21.560 align:middle line:90%
remote exploits.

00:23:21.560 --> 00:23:24.800 align:middle line:84%
That's something that needs to
be taken into consideration.

00:23:24.800 --> 00:23:27.380 align:middle line:84%
Again, this is not
just limited to remote.

00:23:27.380 --> 00:23:28.940 align:middle line:90%
We can also specify local.

00:23:28.940 --> 00:23:31.670 align:middle line:84%
For example, if we were looking
for privilege escalation

00:23:31.670 --> 00:23:33.860 align:middle line:90%
exploits for Windows--

00:23:33.860 --> 00:23:37.340 align:middle line:84%
so if I was looking for
local exploits for Windows,

00:23:37.340 --> 00:23:38.690 align:middle line:90%
I can hit Enter.

00:23:38.690 --> 00:23:43.580 align:middle line:84%
And in this case, you
can see that it's only

00:23:43.580 --> 00:23:44.870 align:middle line:90%
the information--

00:23:44.870 --> 00:23:47.360 align:middle line:84%
all the exploits
being displayed here

00:23:47.360 --> 00:23:50.570 align:middle line:84%
have Windows specified right
over here, so Windows Local.

00:23:50.570 --> 00:23:55.730 align:middle line:84%
And they really aren't
pertinent to Windows

00:23:55.730 --> 00:23:57.530 align:middle line:84%
because they are
essentially showing--

00:23:57.530 --> 00:24:01.400 align:middle line:84%
these are all privilege
escalation exploits

00:24:01.400 --> 00:24:03.740 align:middle line:84%
for various services
or programs.

00:24:03.740 --> 00:24:07.700 align:middle line:84%
So we can utilize grep to
fine tune this by saying grep.

00:24:07.700 --> 00:24:11.300 align:middle line:84%
And we can then
search for Microsoft

00:24:11.300 --> 00:24:14.810 align:middle line:84%
to only show Microsoft
products or services.

00:24:14.810 --> 00:24:16.550 align:middle line:90%
So Microsoft, hit Enter.

00:24:16.550 --> 00:24:21.320 align:middle line:84%
And this will now show us all
local privilege escalation

00:24:21.320 --> 00:24:23.378 align:middle line:90%
exploits for Windows.

00:24:23.378 --> 00:24:24.920 align:middle line:84%
And of course, you
can then fine tune

00:24:24.920 --> 00:24:27.780 align:middle line:84%
based on the version of Windows
that you're looking for.

00:24:27.780 --> 00:24:31.400 align:middle line:84%
So again, SearchSploit is
quite robust in regards

00:24:31.400 --> 00:24:34.940 align:middle line:90%
to looking for what you are--

00:24:34.940 --> 00:24:37.710 align:middle line:84%
essentially, finding what
you're looking for specifically.

00:24:37.710 --> 00:24:42.950 align:middle line:84%
So that is what you can do
there in terms of utilizing

00:24:42.950 --> 00:24:44.810 align:middle line:90%
the various search filters.

00:24:44.810 --> 00:24:47.480 align:middle line:84%
As I've already covered,
you can utilize grep

00:24:47.480 --> 00:24:49.620 align:middle line:90%
to fine tune your results.

00:24:49.620 --> 00:24:51.920 align:middle line:84%
Now, one thing that I
wanted to highlight here

00:24:51.920 --> 00:24:54.710 align:middle line:84%
is the ability to
list the online links

00:24:54.710 --> 00:24:56.180 align:middle line:90%
for the exploit code.

00:24:56.180 --> 00:25:00.890 align:middle line:84%
So let's say you wanted to
learn more about the exploit

00:25:00.890 --> 00:25:04.670 align:middle line:84%
itself and access it
through ExploitDB online.

00:25:04.670 --> 00:25:06.200 align:middle line:84%
How would you how
would you actually

00:25:06.200 --> 00:25:09.290 align:middle line:84%
get the URL pertinent to
that particular exploit?

00:25:09.290 --> 00:25:12.140 align:middle line:84%
Well, let's say I'm looking
for the EternalBlue exploit.

00:25:12.140 --> 00:25:17.690 align:middle line:84%
So I can say SearchSploit
remote and Windows SMB.

00:25:17.690 --> 00:25:20.060 align:middle line:84%
I can then grep and
say I want to limit

00:25:20.060 --> 00:25:22.940 align:middle line:84%
the results to only
display those that contain

00:25:22.940 --> 00:25:25.160 align:middle line:90%
the keyword EternalBlue.

00:25:25.160 --> 00:25:28.425 align:middle line:84%
And in addition
to this-- or let's

00:25:28.425 --> 00:25:30.050 align:middle line:84%
actually hit Enter,
and let me show you

00:25:30.050 --> 00:25:31.008 align:middle line:90%
what I'm talking about.

00:25:31.008 --> 00:25:34.280 align:middle line:84%
So when I hit Enter, you can
see that this will bring up

00:25:34.280 --> 00:25:37.340 align:middle line:84%
all the exploits that
contain the keywords that we

00:25:37.340 --> 00:25:39.980 align:middle line:84%
specified-- so EternalBlue,
EternalBlue, EternalBlue.

00:25:39.980 --> 00:25:42.950 align:middle line:84%
But by default, it'll
display the local path

00:25:42.950 --> 00:25:45.110 align:middle line:90%
to that exploit stored locally.

00:25:45.110 --> 00:25:48.500 align:middle line:84%
If we want to get the links
to these exploits online,

00:25:48.500 --> 00:25:51.770 align:middle line:84%
we can use the W option
right over there.

00:25:51.770 --> 00:25:54.410 align:middle line:84%
And you can see that instead
of the local paths being

00:25:54.410 --> 00:25:56.540 align:middle line:84%
displayed, we get
the ExploitDB links.

00:25:56.540 --> 00:25:59.030 align:middle line:84%
And we can access all of
these exploits online.

00:25:59.030 --> 00:26:02.120 align:middle line:84%
So you can open it up to learn
more about it for example--

00:26:02.120 --> 00:26:05.533 align:middle line:84%
to learn more about
that specific exploit.

00:26:05.533 --> 00:26:06.200 align:middle line:90%
So there we are.

00:26:06.200 --> 00:26:09.290 align:middle line:84%
You Can see this will give
you information regarding

00:26:09.290 --> 00:26:13.340 align:middle line:84%
the author that you typically
would not be able to access

00:26:13.340 --> 00:26:14.840 align:middle line:90%
via SearchSploit.

00:26:14.840 --> 00:26:17.360 align:middle line:84%
And you can see
it's edb verified.

00:26:17.360 --> 00:26:19.790 align:middle line:84%
So this is a great way of
actually checking and seeing

00:26:19.790 --> 00:26:22.442 align:middle line:84%
whether a particular
exploit has been verified.

00:26:22.442 --> 00:26:23.900 align:middle line:84%
And then, of course,
you can either

00:26:23.900 --> 00:26:27.530 align:middle line:84%
download it from here,
from the website itself,

00:26:27.530 --> 00:26:30.830 align:middle line:84%
or copy it with SearchSploit to
your current working directory,

00:26:30.830 --> 00:26:32.420 align:middle line:90%
which I've already covered.

00:26:32.420 --> 00:26:35.430 align:middle line:84%
Now, you also have the ability
of copying it manually.

00:26:35.430 --> 00:26:39.020 align:middle line:90%
So again, if we wanted to copy--

00:26:39.020 --> 00:26:41.060 align:middle line:84%
I'll just get rid
of the W option.

00:26:41.060 --> 00:26:43.910 align:middle line:84%
If we wanted to copy
this exploit here,

00:26:43.910 --> 00:26:47.990 align:middle line:84%
instead of using the
SearchSploit M option

00:26:47.990 --> 00:26:50.010 align:middle line:84%
and then specifying
the exploit ID

00:26:50.010 --> 00:26:52.400 align:middle line:84%
as we did previously,
what we could do

00:26:52.400 --> 00:26:54.570 align:middle line:90%
is we could copy it manually.

00:26:54.570 --> 00:27:00.218 align:middle line:84%
So I'll say sudo copy user
share ExploitDB exploits.

00:27:00.218 --> 00:27:01.760 align:middle line:84%
And then, I would
go to the path that

00:27:01.760 --> 00:27:09.285 align:middle line:84%
is under Windows and remote and
the name or the exploit ID is--

00:27:09.285 --> 00:27:10.660 align:middle line:84%
and in this case,
we need to copy

00:27:10.660 --> 00:27:14.560 align:middle line:90%
the entire file-- so 42031.py.

00:27:14.560 --> 00:27:17.540 align:middle line:84%
And then I can copy it into
my current working directory.

00:27:17.540 --> 00:27:18.190 align:middle line:90%
There we are.

00:27:18.190 --> 00:27:20.680 align:middle line:84%
I'm just going to provide
my password there.

00:27:20.680 --> 00:27:24.140 align:middle line:84%
And you can see that I have that
exploit copied successfully.

00:27:24.140 --> 00:27:26.650 align:middle line:84%
So there's multiple
ways you can do this.

00:27:26.650 --> 00:27:28.720 align:middle line:84%
All right, so that
is going to conclude

00:27:28.720 --> 00:27:31.150 align:middle line:84%
the practical demonstration
side of this video.

00:27:31.150 --> 00:27:34.240 align:middle line:84%
This information might not seem
pertinent or important right

00:27:34.240 --> 00:27:38.330 align:middle line:84%
now, but it certainly will
be in the upcoming sections,

00:27:38.330 --> 00:27:41.920 align:middle line:84%
especially when we'll be going
through the Windows and Linux

00:27:41.920 --> 00:27:43.670 align:middle line:90%
black box penetration test.

00:27:43.670 --> 00:27:47.930 align:middle line:84%
So that's going to be it for
the practical demonstration.

00:27:47.930 --> 00:27:51.640 align:middle line:84%
All right, so that concludes the
searching for exploit section

00:27:51.640 --> 00:27:52.690 align:middle line:90%
of this course.

00:27:52.690 --> 00:27:56.890 align:middle line:84%
In the next section, we'll move
on to the fixing or modifying

00:27:56.890 --> 00:28:00.730 align:middle line:84%
exploit section where we'll be
covering the process of copying

00:28:00.730 --> 00:28:02.950 align:middle line:84%
over exploits that
we've identified

00:28:02.950 --> 00:28:06.400 align:middle line:84%
or that are pertinent to the
service that we're exploiting.

00:28:06.400 --> 00:28:09.430 align:middle line:84%
We'll then take a look at how
to modify them because in most

00:28:09.430 --> 00:28:13.870 align:middle line:84%
cases, what you'll find is
that exploits cannot be run

00:28:13.870 --> 00:28:17.590 align:middle line:84%
immediately after been copied
and require some or quite a lot

00:28:17.590 --> 00:28:20.600 align:middle line:84%
of modification in
order to work correctly.

00:28:20.600 --> 00:28:22.340 align:middle line:90%
So we'll get started with that.

00:28:22.340 --> 00:28:25.810 align:middle line:84%
And we'll also take a look
at how to compile exploits--

00:28:25.810 --> 00:28:27.850 align:middle line:90%
both Windows and Linux exploits.

00:28:27.850 --> 00:28:31.110 align:middle line:84%
So I'll see you in
the next section.

00:28:31.110 --> 00:28:32.034 align:middle line:90%